dean.edwards.name/weblog/2005/03/ie-emulator/

IE Emulator for GreaseMonkey

This is an exact copy of the JScript emulator in moz-behaviors.xml. A simple copy & paste job.:-)

After writing moz-behaviors, I found out that Erik Arvidsson had also written an IE emulator. Code bandit that I am, I took the best bits of both scripts to produce the final result. I’ve been maintaining the code ever since.

This GreaseMonkey user script ensures that Firefox identifies itself as Internet Explorer. It provides hefty JScript support but does not alter the page’s HTML or CSS. The idea is that you use it on those annoying sites that assume everyone uses IE. I’m not sure how useful this is going to be in reality as I was unable to find a single site that this script fixed!

Install the user script: ie-emulator.user.js

The moz-behaviors compatibility page contains a list of most of the extensions made by this script. It is slightly out of date as the GreaseMonkey script is based on an unreleased version of moz-behaviors. For a full list you’ll have to read the code!

Comments (13)

Leave a comment

A valiant effort, but I’m afraid this won’t work well since it doesn’t run until (essentially) onload. Most sites have probably made up their mind about supporting you by that point.

Still trying to find a way to get in earlier than that. thanks for reminding me.

  • Comment by: Aaron
  • Posted:

Yeah. It probably works best as a standalone script or as part of something like moz-behaviors…

Thanks for GreaseMonkey Aaron. It’s certainly the coolest scripty thing of the year so far!

  • Comment by: -dean
  • Posted:

[…] mente a nuestros gustos. Ejemplos de las posibilidades que nos ofrece Greasemonkey son la simulación del renderizado de Internet Explorer, añadir opciones para la reproducción de […]

Is there anyway to get Greasemonkey to trigger before any scripts load[1], and thus be able to succesfully trick the site?

====

[1] Opera’s user javascript implementation runs before the page scripts, and can also be driven by custom events — it would be really neat if the next version of greasemonkey can do something along the same lines {details}.

  • Comment by: Ian
  • Posted:

I just mailed Aaron about this. Here is his response:

That’s exactly what I’d like to do, but we have been unable to find a way to accomplish it. I’ve combed through the XUL references, the mozilla source code, trying to find a way to get access to the HTML stream before it goes to the browser :(.

I was recently introduced to a fellow who worked on parts of the mozilla networking layer and I’m gonna ask him about it today.

  • Comment by: -dean
  • Posted:

Hey Dean,

Can you use a similar approach to mimic the IE onbeforeprint and onafterprint events in Firefox? I’ve been working on some print specific fixes for IE using these events but would like to try to emulate the same event triggers in Firefox too. Any thoughts? Thanks.

Mike

  • Comment by: Mike
  • Posted:

Mike, It may be possible to fake these events using XBL. I’ve made a note of it as something to add to moz-behaviors (and this script).

  • Comment by: -dean
  • Posted:

That’s exactly what I’d like to do, but we have been unable to find a way to accomplish it. I’ve combed through the XUL references, the mozilla source code, trying to find a way to get access to the HTML stream before it goes to the browser:(.

What you’re looking for is mousehole!

http://redhanded.hobix.com/inspect/hereIsMousehole12.html

  • Comment by: Phil
  • Posted:

HI, I am trying to use the moz-behavior wrapper in mozilla, i am trying to use it with already made htc. I have changed those htcs to make them xml compatible, i’ve followed the tips yo mention in the usage of moz-behaviors. After i’ve done all that the behaviors aren’t working, can you please help me!

thanks

  • Comment by: martin
  • Posted:

Emulating IE in Firefox I have been playing around with James Marshall’s cgiproxy and using Dean Edward’s useful little IE emulator for Firefox (here). He made it as a Greasemonkey script but noted the problem of the script not being run fast enough. Well, in c…

I don’t know if that could be of any help but if you are using a mac, there is a browser that uses this trick. The “I-emulate-explorer” thing it’s built-in though, it’s not an add-on. May be you could learn a thing or two by checking the scrit. Anyway I just say this like that, I know nothing about scripting. Here’s the website

http://www.icab.de/dl.php

  • Comment by: Yann Rodrigue
  • Posted:

Will this work on Mac OS X?

  • Comment by: LL
  • Posted:

Is there any Firefox Emulator out there? Rombomb keeps forcing me to switch to a different browser other than Internet Explorer.

  • Comment by: triadwarfare
  • Posted:

Comments are closed.