Page 1 of 1

execute an external script?

Posted: Fri Jul 25, 2014 2:19 pm
by TooCrooked
is it possible to execute an "external" script using noscript and some ajax? for example, i use this template for the majority of all my replacement scripts:

Code: Select all

document.addEventListener("DOMContentLoaded", function(){...}, false)
where the "..." is, i'd create an AJAX request that would eval the resposeText. the payload would come from a txt file on my machine.

will noscript handle a text file in the same directory as my prefs.js which implements noscript? ultimately, i dont want to have to "compact" my code in order to put it in as a surrogate.

Re: execute an external script?

Posted: Fri Jul 25, 2014 4:35 pm
by barbaz
TooCrooked wrote:ultimately, i dont want to have to "compact" my code in order to put it in as a surrogate.
You can use surrogates the way you want. Rather than minify the code, set the replacement pref to a file: URL pointing to your script file.