Page 1 of 1

How to view what script an item uses?

Posted: Thu Nov 30, 2017 10:01 pm
by Brian_
If an item on a page doesn't work, is there a way, using maybe the developer tools, to see what script would enable that item? With a long list if scripts, it takes way to long to try each one.

Re: How to view what script an item uses?

Posted: Thu Nov 30, 2017 10:02 pm
by barbaz
Not technically possible. But you can reduce the amount of trial-and-error - https://forums.informaction.com/viewtop ... 314#p75314

Re: How to view what script an item uses?

Posted: Thu Nov 30, 2017 10:23 pm
by Pansa
Brian_ wrote:If an item on a page doesn't work, is there a way, using maybe the developer tools, to see what script would enable that item? With a long list if scripts, it takes way to long to try each one.
You can try to find it in the page source.
the entry that happens in the list (you allow) is usually what is written at the top of that sections script block with a src.
something like [script : src = webpage].

But generally this was always the try and error part with NS, trying to guess from the specific names whether they are ads or something you don't need (facebook for instance)
The general rule is to look and ignore "ad" in the name, and try to guess which cdn (content delivery network) is stuff you want. and to systematically allow things that have the page's you are visting name in it.
twtimg for twitters content, ttvnw for twitch's media stream and so on.

Re: How to view what script an item uses?

Posted: Thu Nov 30, 2017 11:11 pm
by Brian_
Pansa wrote: the entry that happens in the list (you allow) is usually what is written at the top of that sections script block with a src.
something like [script : src = webpage].
Sorry I can't understand what you're saying. Could you rephrase? Thanks!

Re: How to view what script an item uses?

Posted: Thu Nov 30, 2017 11:59 pm
by Pansa
Brian_ wrote:
Pansa wrote: the entry that happens in the list (you allow) is usually what is written at the top of that sections script block with a src.
something like [script : src = webpage].
Sorry I can't understand what you're saying. Could you rephrase? Thanks!
right click "view page source"
strg + f
search "src="whatevernoscriptaskstoallow"

can find entries that match the list when you click the no script button.

If no script asks for
http(s)://sub1.webpage1.com

there is a good chance that in the sourcetest there is a script tag that looks similar (but not equal to) <script type="text/javascript" src="=sub1.webpage1.com/folder/javasript.js"

But that is really more of an art form to read html and guess what it does.
It works better on simple pages than complex ones.
For instance if you post to this forum as a guest, the captcha can be found in the sourcecode as

Code: Select all

<script type="text/javascript" src="https://www.google.com/recaptcha/api/challenge?k=6LcM6QsAAAAAAJS48GY1b_JNHal1t5mJq7n-I-ws">
while Noscript would ask you for allowing just "https://www.google.com".