Page 2 of 2

Re: !@ surrogate not running on iframe when js is enabled

Posted: Thu Aug 12, 2010 8:54 pm
by Giorgio Maone
al_9x wrote:Is there a reliable way to detect this url inheriting to avoid executing the surrogate?
Not that I know.

Re: !@ surrogate not running on iframe when js is enabled

Posted: Thu Aug 12, 2010 9:57 pm
by al_9x
Giorgio Maone wrote:
al_9x wrote:Is there a reliable way to detect this url inheriting to avoid executing the surrogate?
Not that I know.
Surely it's possible to detect that a frame is written rather than navigated, and by whom? If you don't think it's worth pursuing, I am not going to argue, but could you explain it a bit more?

Re: !@ surrogate not running on iframe when js is enabled

Posted: Thu Aug 12, 2010 10:12 pm
by Giorgio Maone
al_9x wrote:Surely it's possible to detect that a frame is written rather than navigated, and by whom?
Probably I could watch for network traffic and associate it somehow to the creation of the new JS global (no traffic = document.write), but it would be far from trivial (different contexts, different notification sources and different lifecycles) and probably pointless, since I can see more reasons for executing surrogates in such a case, rather than precluding this possibility.
If your concern is the different structure of the page, you can easily check for it during the surrogate execution and act differently if needed.

Re: !@ surrogate not running on iframe when js is enabled

Posted: Fri Aug 13, 2010 12:17 am
by al_9x
Incidentally, !@ surrogate is not executing on written iframe. Is that expected? There is no domcontentloaded?

Now that the !@ bug is fixed, here's a hotmail ad remover surrogate

Code: Select all

user_pref("noscript.surrogate.hotmail_ad.sources", "!@.mail.live.com/mail/InboxLight.aspx");
user_pref("noscript.surrogate.hotmail_ad.replacement", "var ad_div = document.getElementById('SkyscraperContent'); if (ad_div) ad_div.parentNode.removeChild(ad_div); var class_div = document.getElementById('contentRight'); if (class_div) class_div.classList.remove('WithSkyscraper'); if (typeof InboxPage !== 'undefined') InboxPage.hasSkyscraper = false;");