!@ surrogate not running on iframe when js is enabled

Bug reports and enhancement requests
User avatar
Giorgio Maone
Site Admin
Posts: 9524
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

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

Post 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.
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8
al_9x
Master Bug Buster
Posts: 931
Joined: Thu Mar 19, 2009 4:52 pm

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

Post 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?
Last edited by al_9x on Sat Aug 14, 2010 4:16 pm, edited 1 time in total.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8
User avatar
Giorgio Maone
Site Admin
Posts: 9524
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

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

Post 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.
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8
al_9x
Master Bug Buster
Posts: 931
Joined: Thu Mar 19, 2009 4:52 pm

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

Post 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;");
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8
Post Reply