Post Reply 
New popup test pages
Apr. 10, 2009, 08:38 PM (This post was last modified: Apr. 16, 2009 10:38 PM by sidki3003.)
Post: #1
New popup test pages
I've added two pages to the "Testcases" section at sidki.proxfilter.net (doing the linking and GeoCities update later done):
- Body Event Popups
- Event Listener Popups

Could someone running Chrome or Safari please modify proxjs-full.js as detailed below, and then do these tests. A quick confirmation whether they fail in IE7/IE8 (which i strongly assume) would also be nice.

Old:
Code:
window.open = function (url, enam, atr, hist) {

    // Make sure that popup windows have desired browser controls.

New:
Code:
window.open = function (url, enam, atr, hist) {

//Test start
    function dummyWin() {
      // Grab the PopUp URL for notification function.
      prxO.oInt.inPopURL(url);

      return {
        focus : function () {}, blur : function () {}, close : function () {},
        moveTo : function () {}, resizeTo : function () {}
      };
    }

    var cArg;
    if (window.event) cArg = window.event.currentTarget || window.event.srcElement;
    else {
      var cCaller, bCaller = arguments.callee;
      while ((bCaller = bCaller.caller)) cCaller = bCaller;
      if (cCaller)
        // "deprecated" strict warning in Fx for cCaller.arguments .
        for (var i = 0, dArg = cCaller.arguments; i < dArg.length; i++)
          if (dArg[i] && (cArg = dArg[i].currentTarget)) break;
    }
    if (cArg && (window.HTMLDocument && cArg instanceof HTMLDocument ||
      window.Window && cArg instanceof Window ||
      cArg.tagName && cArg.tagName.toLowerCase() == "body")) return dummyWin();
//Test end

    // Make sure that popup windows have desired browser controls.


The only one of my browsers where the new routine performs cleanly is Opera 9.
For Firefox 3 i had to resort to a deprecated - nonetheless still supported - method in order to access the root caller's arguments.
I wasn't able to find any corresponding method for IE.


P.S.: Kye-U, if you're still running Chromium and Safari Beta, please check.

edit 4/17: Two bugfixes
Add Thank You Quote this message in a reply
Apr. 10, 2009, 09:43 PM
Post: #2
RE: New popup test pages
(Apr. 10, 2009 08:38 PM)sidki3003 Wrote:  A quick confirmation whether they fail in IE7/IE8 (which i strongly assume) would also be nice.

IE8 -

Body Event Popups -
click in page -
onmousedown is blocked, icon shows in corner
onmouseup is blocked, icon shows in corner
onclick is NOT blocked

click manually open -
two new icons in corner
body-onclick opens
body-onrequest opens


Event Listener Popups -
click in page -
body-click popup opens
document-click popup opens
no icons show in corner

click manually open -
no icons appear, all three pop-ups open (body-click, document-click, request-click)
Add Thank You Quote this message in a reply
Apr. 10, 2009, 09:54 PM
Post: #3
RE: New popup test pages
Okay, at least some success ("listener -> document -> click" being the most common offender in the wild, though).
Thanks Smile!
Add Thank You Quote this message in a reply
Apr. 11, 2009, 03:31 AM (This post was last modified: Apr. 11, 2009 03:42 AM by Kye-U.)
Post: #4
RE: New popup test pages
Chromium

Body Event Popups:
Clicking - all popups are prevented from opening
"Open Manually" - popup loads successfully

Event Listener Popups:
Clicking - all popups are prevented from opening
"Open Manually" - popup loads successfully

EDIT: Same results for Safari 4 =]
Visit this user's website
Add Thank You Quote this message in a reply
Apr. 11, 2009, 12:41 PM
Post: #5
RE: New popup test pages
Cool!! Thanks for testing.
Add Thank You Quote this message in a reply
Apr. 16, 2009, 12:35 AM (This post was last modified: Apr. 16, 2009 12:38 AM by linkodz.)
Post: #6
RE: New popup test pages
Using chrome first pop up test page, clicking on page opens two pop ups
Second pop up test page, clicking on page opens three pop ups.

Not working here.... 2.0.173.1
on IE 8, same thing only difference is I only have one pop up opening up in both pages.
In Opera 10, first page tries to download a .wav file.... second page succesfully block three pop ups
Add Thank You Quote this message in a reply
Apr. 16, 2009, 02:50 AM
Post: #7
RE: New popup test pages
Not much success here, using the latest sidki config, and FF 3.0.8.

Body-Onclick
Body-Onmouseup
Window-click
Document-click
Body-click

... all pop up here.
Add Thank You Quote this message in a reply
Apr. 16, 2009, 10:33 PM (This post was last modified: Apr. 16, 2009 10:35 PM by sidki3003.)
Post: #8
RE: New popup test pages
Toppy, these popups don't get blocked by the last released config, no matter what browser you use. You have to modify proxjs-full.js, as mentioned above.

*After* modifying that script accordingly, clearing the cache, restarting the browser (if Opera/Chrome), etc., it does work in Firefox 3 and Opera 9. I was testing these browsers high and low.


linkodz, thanks, but maybe check again. I just went to my Vista VM and tested in Chrome 1.0.154.53. The popups get blocked. In fact, Chrome understands both, the Opera (window.event) and Firefox (caller.arguments) way. Unless the JS console / DOM inspector is open (huh?). It apparently works for Kye-U as well, who - i would think - is using something like a Chrome dev release.

What Opera 10 is doing with the wav file - a.k.a. sound notification - depends on your multimedia plugin setup, hence isn't config related. You may uncheck ". + Sound Notification" in the webfilter window's "CONFIG CONTROL" section, of course.

It wasn't expected to work in IE8. I'm still hoping that it does work for the current stable, maybe also beta, releases of Chrome and Safari, however.


I will edit the first post now, to correct two (non-critical) bugs in the JS code.
Add Thank You Quote this message in a reply
Apr. 17, 2009, 12:33 AM (This post was last modified: Apr. 17, 2009 12:39 AM by linkodz.)
Post: #9
RE: New popup test pages
Sidki I checked again, I am using also the dev version of chrome so I always run the latest releases... Check video below:

http://screencast.com/t/DGS4FI3A

I am running Chrome 2.0.174 and I modified the js to the code you provide in this thread and also the advanced mode in proxomitron.
Okay, now I edited the full.js file again with the two changes you have made and it is working fine now in Chrome and Opera 10 alpha also.
Add Thank You Quote this message in a reply
Apr. 17, 2009, 12:48 AM
Post: #10
RE: New popup test pages
[Image: happy0034.gif]
Add Thank You Quote this message in a reply
Apr. 24, 2009, 07:40 PM (This post was last modified: Apr. 24, 2009 08:20 PM by leecovuk.)
Post: #11
RE: New popup test pages
Thanks Sidki,

I just noticed this and find it works for me on 2 porn sites in Firefox, namely empornium and puretna. They seem to do something like an on-click popunder (popundr?) which, mainly as a little challenge, I have been attempting to block.

Previously my best solution (within my grasp) was to use Noscript to block scripting on those sites, but yours is better because I can keep scripting active for the purpose of getting a Greasemonkey autologin script to work.
Not that any of that is especially important, of course.

I should probably have first looked here for a solution, rather than just now!

Previously I have routinely not used the popup blocking in the Prox Sidki config, out of concerns it would silently block them all and not alert me. I haven't looked into it to be honest and have just been using the Firefox popup blocker.
Now, I've switched the Firefox one off and have turned on the popup blocking in the Prox Sidki config to successfully test the code in this topic. I am yet to test the Sidki config popup blocking generally (I am about to) but presumably there is some kind of significant alert when a popup is blocked, so you can choose whether to allow it.

Lee
UK
Hello again,

Am I right in finding that the Sidki config needs at least Standard Mode for the icon and audio notifications of popups to work? I have them working but I routinely use Light Mode. Is there any way to get them working in Light Mode?

Thanks a lot,
Lee
Add Thank You Quote this message in a reply
Apr. 24, 2009, 09:01 PM (This post was last modified: Apr. 24, 2009 09:19 PM by sidki3003.)
Post: #12
RE: New popup test pages
(Apr. 24, 2009 07:40 PM)leecovuk Wrote:  I just noticed this and find it works for me on 2 porn sites in Firefox, namely empornium and puretna. They seem to do something like an on-click popunder (popundr?) which, mainly as a little challenge, I have been attempting to block.

That's probably because in Light Mode you aren't bothered with Proxomitron generated buttons, etc. At least the popups on both frontpages are easy to catch because the respective function clearly shows what it is up to.

In Standard Mode you would get a "listen:click" button with a flyover:
Code:
scope: [object HTMLDocument] -- capture: false -- match: Open:
function checkTarget(e) {
  if (!getCookie("popundr")) {
    var e = e || window.event;
    var win = doOpen("http:...");
    setCookie("popundr", 1, 86400000);
  }
}

The problematic sites are those that hide the actual function, mostly by plugging it into jQuery. That is exactly what above linked second testcase is doing as well. Now, if you would block jQuery onclick events, you'd break thousands of other pages.


Quote:Am I right in finding that the Sidki config needs at least Standard Mode for the icon and audio notifications of popups to work? I have them working but I routinely use Light Mode. Is there any way to get them working in Light Mode?

Yes. No. Haven't we talked about that before?

Anyway, what you can do is copying your config to, say, "lightstd.ptron". Then you select Standard Mode. Then you enter "l.3" in the "Find:" box of the header and webfilter windows (at the very bottom). Then you uncheck everything that you don't want. Then you save the config.
Add Thank You Quote this message in a reply
Apr. 28, 2009, 12:27 PM
Post: #13
RE: New popup test pages
The discussion about how to customize the config has been split:
http://prxbx.com/forums/showthread.php?tid=1352
Add Thank You Quote this message in a reply
May. 06, 2009, 06:52 AM
Post: #14
RE: New popup test pages
http://www.cnproxy.com/popkillertest/test18.html
The popup window is blocked under IE8 and FF3.5B4 but not under Opera 9.64 or 10.0 alpha.
Add Thank You Quote this message in a reply
May. 06, 2009, 01:21 PM (This post was last modified: May. 06, 2009 01:27 PM by sidki3003.)
Post: #15
RE: New popup test pages
This page is calling two popups.

The first one technically isn't a popup but a simulated click on a legit <a href> link. Hence, this isn't a job for the popup blocking code. IE is apparently limiting such use of link.click(). Firefox doesn't support it at all.

The second one is a real popup (window.open'ed, again by simulated click). It also gets blocked in Opera (you should here a sound, if activated).


Anyway, i think it's worth a try to intercept onload event handlers doing this. It needs to be tested, since .click() *might* also be used by harmless functions.

Old code in proxjs-full.js:
Code:
var ldIn = /^\n*function SymOnLoad|^[^;]*((popu(p|nder)|track)\w*|print ?\()|\.location(\.href)? ?=[^=]|Math\.random|float *[^:]|expires ?=/i;

New:
Code:
var ldIn = /^\n*function SymOnLoad|^[^;]*(?:popu(?:p|nder)|track)\w*|location(?:\.href)? ?=(?!=)|Math\.random|float(?! *:)|expires ?=|(?:\.click|print) ?\(/i;
Add Thank You Quote this message in a reply
Post Reply 


Forum Jump: