Lately, I've been working on a side project to bring the Greasemonkey concept of user scripts to Internet Explorer. Thus, GreasemonkIE. It's still in a very early state, and I haven't had a chance to get in all of the functionality that I'd like. However, I feel that it's far enough along that I can put out there for others to use. You can download it here. It's packaged as a Windows Installer. You'll need to restart IE after it's installed (you may need to close IE before installation). There's no gui interaction so once the progress dialog goes away, it's done.
- There's no nice way to install user scripts. For now, you'll have to do that by hand (see below). I'm working on adding an entry to the IE context menu for anchor tags, but that's not as clean as I'd like (only scripts can be added to IE context menus, so rather than adding an entry that calls a method in the BHO directly, I have to add an entry that calls a script that instantiates a COM class in the BHO that adds a script, and that's been causing some problems). Alternatively, I may just provide a GUI that will let you add already-downloaded scripts to GreasemonkIE.
- GreasemonkIE is written as a BHO, so you may get warnings from some anti-spyware software. If it prompts you for confirmation, allow it to install.
- Since GreasemonkIE is written in C#, you'll need to install the .NET framework if you don't already have it.
- Also because GreasemonkIE is written in C#, I haven't yet found a good way to stop explorer.exe from loading the BHO. This means that you may have problems uninstalling GreasemonkIE if you've opened any Explorer windows (iexplore.exe will release the assembly reference when it's closed, but explorer.exe will not because it doesn't close until you log out or reboot). Logging out or rebooting will allow you to uninstall GreasemonkIE.
- User scripts aren't re-applied if you refresh a web page. Internet Explorer doesn't fire the OnDocumentComplete event for page reloads, and I haven't had a chance to investigate other options.
Installing user scripts: GreasemonkIE should write an XML file under your user's application data directory ("C:\Documents and Settings\username\Application Data\GreasemonkIE\greasemonkie.xml", for example). If the folder or XML file doesn't exist, you can create them by hand. To install a new user script, add a new <script> node to greasemonkie.xml under the <scripts> node. For example, to install a user script "inline.player.user.js" that was downloaded to "C:\documents and settings\username\Application Data\GreasemonkIE\scripts\", add the following XML:
<script fileName="c:\documents and settings\username\Application Data\GreasemonkIE\scripts\inline.player.user.js" enabled="true" />GreasemonkIE will pick up any changes to the greasemonkie.xml file and load them on the next page load. Once you've installed some user scripts, you can manage them (includes, excludes, enabled, uninstall) from the "Manage User Scripts..." entry in IE's Tool menu.
Scripts that work:
- Inline MP3 Player - works flawlessly
- Linkify - painfully slow on large pages due to html-xpath.js performance issues, but it works
- Add Netflix links to IMDB - works well, but the new link has a target IE doesn't like. Shift-click the links to make them work (overrides the target)
- No Middle Man - works well
- Gmail: Adding Persistent Searches
- Google Suggest - A previous version worked using setTimeout, but this script was recently updated to use addEventListener instead, which IE's scripting model doesn't support. I ran into this on a few other scripts, and I may be able to build a work-around to support addEventListener.
- (I didn't try a whole lot of scripts, so just because this section is small doesn't mean most scripts work)