execute an external script?

Proposals for new surrogate scripts, updates/bug fixes to existing ones, tips and tricks to work around the lazy web.
Post Reply
TooCrooked
Posts: 19
Joined: Sun May 02, 2010 9:51 pm

execute an external script?

Post 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.
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:23.0) Gecko/20100101 Firefox/23.0
barbaz
Senior Member
Posts: 10847
Joined: Sat Aug 03, 2013 5:45 pm

Re: execute an external script?

Post 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.
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (X11; Linux i686; rv:34.0) Gecko/20100101 Firefox/34.0 SeaMonkey/2.30a1
Post Reply