Page 1 of 1

Can't use local files as surrogate scripts

Posted: Sat Dec 14, 2013 4:28 pm
by barbaz
From http://forums.informaction.com/viewtopi ... 973#p50973:
Giorgio Maone wrote:Rather than putting the code in the noscript.surrogate.xyz.replacement preference, put there a file:/// URL pointing at your local external script.
But that doesn't seem to work. Testcase:
NS 2.6.8.8rc1
create the following prefs:

Code: Select all

noscript.surrogate.foo.sources : @noscript.net
noscript.surrogate.foo.replacement : file:///full/path/to/Dummy.js
Dummy.js:

Code: Select all

alert("Cuckoo from local file");
No alert on noscript.net when scripts are allowed. Nothing related in the error console. Putting the code directly in the noscript.surrogate.foo.replacement preference was enough to make it work. Is this a bug, or am I doing something wrong?

Re: Can't use local files as surrogate scripts

Posted: Sat Dec 14, 2013 9:23 pm
by Giorgio Maone
Investigating, thank you.
I've already found a bug, but even fixing it I'm gets lots of "file access denied" errors. Looking into them.

Re: Can't use local files as surrogate scripts

Posted: Sat Feb 22, 2014 11:13 pm
by barbaz
Fixed in 2.6.8.15rc6, thanks