Block only selected JS

Ask for help about NoScript, no registration needed to post
NoScriptUser180713
Posts: 4
Joined: Fri Jul 13, 2018 8:35 am

Block only selected JS

Post by NoScriptUser180713 »

There is the site
If you scroll down the page the script will PLAY video on it with the sound. I can block this video with some extension like ABP, but if I reload the page and scroll it down, there is no video, but the sound still persists.
With the help of NoScript I can block ALL scripts on this page, but I need to block only PLAYER script (eagleplayer-container eagleplayer-loader).
Is there a way to do it?
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0
skriptimaahinen
Master Bug Buster
Posts: 244
Joined: Wed Jan 10, 2018 7:37 am

Re: Block only selected JS

Post by skriptimaahinen »

Do not allow "media" on eaglecdn.com (or just remove all rights from any domain starting with "eagle"). Does that work for you?
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0
User avatar
therube
Ambassador
Posts: 7924
Joined: Thu Mar 19, 2009 4:17 pm
Location: Maryland USA

Re: Block only selected JS

Post by therube »

If no eagle* are allowed, no video.

Dealing only with eaglepatform.com (because that is what I see first, before any other eagle*), it is not Media that allows or disallows the media playback, but rather Fetch (whatever Fetch is, does?). In order for Fetch to have any bearing, JavaScript also has to be allowed. So with both JavaScript & Fetch you get the media clip. With only JavaScript, you get a "placeholder" (but nothing like NoScript 5's placeholder that actually affords you the ability to play the video clip). With JavaScript & Fetch, you get video playback.

No other eagle* are needed for video playback.


Just what is Fetch?
And why does Media not play in to the playing of "media" content here?

Does NoScript 10 actually have a "real" media placeholder?
Or does that only apply if it is a "Media" block rather then a Fetch block?
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball NoScript FlashGot AdblockPlus
Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:52.0) Gecko/20100101 Firefox/52.0 SeaMonkey/2.49.4
skriptimaahinen
Master Bug Buster
Posts: 244
Joined: Wed Jan 10, 2018 7:37 am

Re: Block only selected JS

Post by skriptimaahinen »

If I allow only

Code: Select all

lenta.ru 			script
eagleplatform.com	script fetch
I do see the player, but get an error and no video.
therube wrote: Just what is Fetch?
Fetch is for XHR requests. Used to "fetch" content (any data: text, html, scripts, media, streams, etc.) from a server. When you allow "fetch" for a domain, you are not allowing that domain to fetch stuff from elsewhere, but allowing other domains to fetch from there.
therube wrote: And why does Media not play in to the playing of "media" content here?
That is indeed good question. Not seeing that happening here though.
therube wrote: Does NoScript 10 actually have a "real" media placeholder?
Yes, NS does have media placeholder. For video-elements and MediaSource streams. The latest RCs have some fixes in that regard.
therube wrote: Or does that only apply if it is a "Media" block rather then a Fetch block?
No, the placeholders are not for fetch.
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0
NoScriptUser180713
Posts: 4
Joined: Fri Jul 13, 2018 8:35 am

Re: Block only selected JS

Post by NoScriptUser180713 »

skriptimaahinen wrote:If I allow only

Code: Select all

lenta.ru 			script
eagleplatform.com	script fetch
I do see the player, but get an error and no video.
Can you show please a screenshot with setting for this page. I cannot stop this video playing.
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0
NoScriptUser180713
Posts: 4
Joined: Fri Jul 13, 2018 8:35 am

Re: Block only selected JS

Post by NoScriptUser180713 »

I think, I had old settings. When I opened NoScript Options and reset "Preset customization (for all the sites sharing a preset)", the "Default" level became the next:

Code: Select all

Allow Frame and Fetch
so now when I open default site like lenta.ru, I have no video autoplay!
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0
Post Reply