NSFW! xnxx.com
Cookie based popunder is fired when playing via HTML5 player. It will check for a cookie named ~~wpn-popunder~~ wpn-popupunder and if it is not present a popunder will be fired. Popunder code is mixed with the player so it cannot be directly blocked.
test case - http://www.xnxx.com/video-f42rld6/italian_pornstar_with_big_tits_fucked_hard_on_the_sun
Popunder code - http://static-hw.xvideos.com/v-2a5d7651e9f/v3/js/skins/min/player.html5.static.js
PS - If you have flash, then flash player will load and the popunder will load but that can be patched via xnxx.com##script:inject(noeval.js)
Did you found a way to grab the URL of the media file? We can just replace the player if we have that.

I grabbed it through the logger.
There you go - http://xvideos-im-40e9ad00-25384449-mp4.s.loris.llnwd.net/videos…mp4?e=1488569825&ri=1024&rs=85&h=569b76494ec7d95ba0e703ed2c4393e2
MP4 - http://xvideos-im-40e9ad00-25384449-mp4.s.loris.llnwd.net/videos/mp4/3/9/0/xvideos.com_3900ff5655577e97cb86993018590b9c.mp4
We would need a way to grab the URL from Script.
grabbing URL with script
How do you mean exactly ?
Can't you patch it like you did with pornhub.com and others ?
Hum... Yea, we can try that. I'll have a look when I have time.
If you are still interested in grabbing videos from above sites it's easy: window.open(html5player.url_high).focus()
@szymon1118
Wow nice! I'll see if there is a faster way (patching player is rather slow), your solution will be our ultimate solution in case patching open() doesn't work.
Looks like it's a pop-up instead of pop-under, it doesn't go through open(). How about just locking the cookie? If they start to change the name of the cookie we'll respond with replacing their player.
OK, I locked the cookie. Not sure how long will this fix last. If it turns out that they change the name of the cookie often, then we'll use our next solution.
Not a favourable solution since we're giving in their cookie game, but will do at the moment. Can you not patch it like you did with hanime.tv ? Sorry I was asleep and not awake when you posted this.
@uBlock-user No, because their code abuses the real mouse event so the pop-up doesn't go through open().
Well can the mouse event be patched ?
@uBlock-user Probably...
Try it if you can, I tried killing cookieCheck by making it readOnly and tried NoAccess, didn't work. I will try few other tricks I can think and then I will leave it at that.
Well, a.readOnly() and a.noAccess() only work for global variables, if their function is defined in a closure, there is no easy way to patch it (without beforescriptexecute).
What about window.wpn_categories and/or window.openpop ? Can one of these be killed ?
Yep, that does work 😄 I added both solution to Script.
Next time I should check keywords from window's properties first...
Note: Run this in console to dump window's properties: JSON.stringify(Object.keys(window));
I had a feeling that one of those should patch it. Finally. Works perfectly now, no popups even when I blocked all cookies via Chrome. This one can be closed now.
@jspenguin2017 Can we use the same rule for xvideos.com and xvideos.works ?
this cookie wpn-popupunder is on these websites
test link http://www.xvideos.com/video5061155/nerd_girlfriend_talks_sex_and_fingers_upskirt_in_stairwell http://www.xvideos.works/video5061155/nerd_girlfriend_talks_sex_and_fingers_upskirt_in_stairwell
xvideos.com##.sponsor-popup
https://user-images.githubusercontent.com/27441315/27887954-ac354af0-61e3-11e7-8f04-c88e89d35c09.png
Added. The "sponsor popup" div is to be reported to EasyList.