Click here to Skip to main content
Click here to Skip to main content

CPHog for Internet Explorer

, 17 Jun 2005
Rate this:
Please Sign up or sign in to vote.
A translation of Shog9's GreaseMonkey script, useable in Internet Explorer with Trixie.

Introduction

Shog[^] has created a nifty little script that uses GreaseMonkey[^] to provide extra goodness to the CodeProject experience, when viewed through FireFox. My particular interest was drawn by the "quick reply" feature it adds to the CodeProject message boards. His original script can be found here[^].

Plug-in Required

As nice as that is, it doesn't work in Internet Explorer. Curious, I looked to see if there was a GreaseMonkey equivalent for Internet Explorer. There happen to be a few, but Trixie[^] looks to be the most reliable among those that I found. You must download and install it (or something similar) in order to use this script in this article.

Update - June 14, 2005: This link[^] shows that Trixie is no longer in development, in favor of Turnabout[^], which works just fine for this script.

Modified Script

The script attached to this article has no significant changes, other than those necessary to make Shog's GreaseMonkey script work inside Internet Explorer with Trixie. Download the script, and copy install it using the directions supplied with Trixie. Enjoy it, and let me know if you create any improvements or find errors.

If you want to explore the code, do a comparison of the JavaScript files. You'll find that I inserted code to replace GreaseMonkey's GM_GetValue and GM_SetValue functions. Also, since IE doesn't support document.evaluate, I had to replace those with a series of loops and "if" statements working through the results of getElementsByTag and getAttribute. (I did find JavaScript code that would implement document.evaluate, but it didn't handle everything, and it was very slow to load the CP Lounge pages.)

You will also notice a "hack" designed to prevent multiple-insertion of the quick-reply links and other features. Basically, we add a tag to the top of the document. If the tag is not already there, we do everything the plug-in needs to do. If the tag was there already, it avoids redoing the same work. Very important, if you want things to work properly. (Note, I didn't find out if this was a Trixie-only issue.)

Updates

  • June 10, 2005 - Corrected a multiple-insert problem when using CPHog in articles and some other parts of CodeProject.
  • June 14, 2005 - Added a link to Turnabout, and wrote up a description of the changes needed for Shog's script to work in Internet Explorer.
  • June 17, 2005 - Made a change to hopefully prevent the mis-attributed quote problem discovered by PJ Arends.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

John Fisher
Web Developer
United States United States
No Biography provided

Comments and Discussions

 
GeneralSaving Data PinmemberPJ Arends2-Jul-05 12:46 
GeneralRe: Saving Data PinmemberPJ Arends2-Jul-05 14:13 
GeneralRe: Saving Data PinmemberPJ Arends2-Jul-05 23:58 
GeneralWierdness PinmemberPJ Arends15-Jun-05 19:14 
GeneralRe: Wierdness PinmemberPJ Arends15-Jun-05 19:23 
GeneralRe: Wierdness PinmemberJohn Fisher17-Jun-05 7:32 
GeneralRe: Wierdness PinmemberJohn Fisher17-Jun-05 8:30 
GeneralRe: Wierdness PinmemberJohn Fisher17-Jun-05 8:31 
GeneralRe: Wierdness PinmemberJohn Fisher17-Jun-05 8:31 
GeneralRe: Wierdness PinmemberJohn Fisher17-Jun-05 8:37 
GeneralRe: Wierdness PinmemberPJ Arends17-Jun-05 18:17 
GeneralLUCKY Pinmembereggie510-Jun-05 14:42 
GeneralRe: LUCKY PinmemberJohn Fisher10-Jun-05 17:21 
GeneralKewl PinmemberPJ Arends10-Jun-05 10:18 
GeneralRe: Kewl PinmemberJohn Fisher10-Jun-05 11:11 
GeneralRe: Kewl PinmemberPJ Arends10-Jun-05 11:43 
GeneralRe: Kewl PinmemberJohn Fisher10-Jun-05 13:16 
GeneralRe: Kewl PinmemberJohn Fisher10-Jun-05 18:37 
GeneralRe: Kewl PinmemberPJ Arends11-Jun-05 7:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.141216.1 | Last Updated 17 Jun 2005
Article Copyright 2005 by John Fisher
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid