Using the ‘new Date()’ constructor or modifying Firefox in some other way (Firefox programming wise), would anyone know if there’s a way to momentarily modify the current Date/Time refreshed value from the operating system? I’m experiment against artificial web timers and know this could inherently break things. I plan to turn this into an add-on, but any pointers in to how Time is dealt with in Firefox would be awesome.
Wow this sounds very low level. I never reached that far. But i heard its possible to override javascript things, I saw someone do it with the navigation object: http://stackoverflow.com/a/1307088/1828637
I wish it was that easy, because most normal functions would be. The problem with Date(), is that its a constructor and its built-in, i ran into this with the webrtc api constructors like mozRTCpeerconnection.
What i think i need to do is Monkey Patch the Date, so i found some stackoverflows:
I wasn’t able to fix the answers for a PageMod content-script though.
I tried overwriting them with unsafeWindow, and with the new api’s that are to replace unsafeWindow.
i was closer with 22400161, the site was calling Date.getTime() and the count down number on sourceforge was changed from an integer to NaN, but it still didn’t work.