tvn.pl and related
Hi, can you help me with this page?
http://dziendobry.tvn.pl/wideo,2064,n/proste-cwiczenia-na-poprawe-krazenia,3193.html
Please click here for updates on this issue: https://github.com/X01X012013/AdBlockProtector/issues/23#issuecomment-258627653
@X01X012013 I have modyfication of your script. http://pastebin.com/dMp1HpP8 It works if you choose quality of video. Can you fix it?
https://cloud.githubusercontent.com/assets/18214146/19934802/41ed2640-a118-11e6-960d-3fca4b73ec5a.PNG
Hi, I did try to lock that variable before, but that did not seem to work. I did patch your modification into 1.2.6, I'll so further testings to see what is going wrong here.
@X01X012013 can you do something to suppress the ads from showing on tvn.pl?
@MajkiIT I don't think simply locking that variable will work, did I do something wrong?
@xxcriticxx The player.js has over 50 thousand lines, and they seem to be constantly checking what's going on with the ads, it will be really hard to patch that script...
@X01X012013 this script is not my. Someone show me it. Also I'm not a programmer. I show you this script, because you will modify it.
@X01X012013 we got some instructions please read this over see if it make sense
Sadly I don't have enough time now but I looked quickly and the best way to do would be to replace the player file: http://s1-player5.cdntvn.pl/player.js to edit it and remove the addblock checker inside.
After you would have just to make a Userscript to stop the file from being loaded and replace player.js with the fixed player.js that don't check for addblocker.
This would only work with Firefox since it would be done with the checkForBadJavascripts() function. :octocat:
Here's a post that explain how it work to block a script and change it with another: http://stackoverflow.com/questions/10472569/changing-javascript-on-an-html-page-out-of-my-control.
Good Luck and let me know if you are successful, I'm curious to know :smiley_cat:
@xxcriticxx All we really need to to put http://s1-player5.cdntvn.pl/player.js into AdBlocker's blacklist, and load the good one from somewhere. The problem here is who want to modify that 50 thousand lines player.js.
The stackoverflow post is about in-line JavaScript, which can only be blocked using beforescriptexecute event that is only implemented into FireFox. However, http://s1-player5.cdntvn.pl/player.js is not in-line and can simply be blocked by blocking the source.
or you can check for checkForBadJavascripts() function whatever that means
@xxcriticxx
checkForBadJavascripts() function in that post is a custom function and is not built into any browser. It relies on beforescriptexecute event and therefore only work on FireFox, however, none of that is needed to replace player.js. What we need is the patched version of player.js.
@xxcriticxx
Maybe I'm lazy, but I really don't want to go over 50983 lines of code just to block some pre-rolls until player.js gets updated... Maybe I'll do it later if I feel like it...
@X01X012013 got it so we have workaround for right now with short 30 sec commercial
@xxcriticxx Yep, the rules in the second post from the top will do that, I will remove this website from the script so the rules will work. Would you really call this a workaround when your experience is almost as bad as when you are not using an AdBlocker...
@X01X012013 It was my idea to checkForBadJavascripts()since you can change both INLINE or remote JS script with this function with no need for an external blocker. It's more easy to debug IMO when you have everything in the same script. :money_mouth_face:
I was browsing this thread and I agree with you that 50K lines of code is a lot 😜.
But I was thinking if we could use a simple player version with less protection against adblocker maybe it will have only the player part of the code, so it would be lot less code... :octocat:
I said to myself let's try to find an old version of the player.js... so Google is my friend I found something interesting, 2 links:
http://playerjs.io/ https://github.com/embedly/player.js
it would be worth just to try to replacing the big bloated player.js with this one, it could be the original without protection against addblockers. 😊
I'm lot less pro-efficient than you with JS but let me know if it's work, I would install the whole files on host somewhere like https://infinityfree.net, I use them to host my JS scripts when I want them to be remote.
Anyway let me know how it turn ! ✌️
@mikhoul
checkForBadJavascripts() is great but it only work on FireFox, this project is designed for Opera and Chrome so checkForBadJavascripts() and beforescriptexecute cannot be used.
I didn't know there is a project called player.js so I thought *.tvn.pl made player.js themselves. If we start from here it is much simpler, but it is still a LOT of work since *.tvn.pl seems to have customized the player.js that they are using quite a bit.
I will first find a way to patch Function.prototype.toString() that might be required to fix timesofindia.indiatimes.com when it breaks again, then I will have a look at this issue.
sound like fun
@mikhoul Is that hosting service stable? Every single free dynamic website hosting service I tried is rather useless. I'm currently hosting everything on GitHub.
@X01X012013
Is that hosting service stable?
It seem really stable, before using this service I tried over the years 5-6 other "free" hosting service but all had to much limitations for me like: To keep your account you must log-in once a month or your account was deleted, or no support for PHP etc... :computer:
The only limitation I've seen from this one is the upload speed to prevent the sharing of Software/movies etc.. but it's enough for me. It support PHP, FTP and with FTP I use it with WinSCP so I can edit and save my file directly in Notepad++ and everything is updated in real time. :smile_cat:
I use it since a few months and everything is fine till today, the support is VERY good for a free service you got answer within few hours and it's quality support. :octocat:
Have a Great Day :sun_behind_small_cloud:
@mikhoul
The player.js from your links only have 1187 lines of code... Did I miss something?
@X01X012013 No I was surprised myself too but from what I've read it seem that "player.js" is a kind of standard between websites, so the code added seem just to be for advertisement/adblocker.
Even if it was not the same exactly I was telling to myself maybe it would be worth to replace the player completely and connect the new "clean" player directly to the stream of the video.
This way we could bypass the Evil... 😈