Page 1 of 1

noscript conflict with localhost script

Posted: Mon May 23, 2011 9:58 am
by mingfish
noscript conflict with localhost script;

i want to use jquery ,the js from google works,but not work from http://localhost;
when i turn off the Noscript plugin, localhost script works;

how to fix this problem?

Code: Select all

// ==UserScript==
// @name           test2
// @namespace      test2
// @include        *
// ==/UserScript==

(function() {  
	var load = function() {  
		var scriptTag = document.createElement('script');  
		scriptTag.src = 'http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js';  
		// the code bellow does not work when the Noscript is on
		// scriptTag.src = 'http://localhost/laji/jquery.min.js';  
		scriptTag.type = 'text/javascript';  
		document.getElementsByTagName('head')[0].appendChild(scriptTag); 

		load = function() {  
			if(typeof unsafeWindow.jQuery == 'undefined') { window.setTimeout(load,100); }  
			else { $ = unsafeWindow.jQuery; main(); }  
		};  
		return load(); 
	};
	load();  
	function main(){
		$("body").css("background-color","#000000") //let page background be black
	}
  })();

Re: noscript conflict with localhost script

Posted: Mon May 23, 2011 10:01 am
by linjuming
i want to know too!

Re: noscript conflict with localhost script

Posted: Mon May 23, 2011 8:27 pm
by dhouwn
Huh? So you have an issue with the default ABE rule for preventing internet sites to access things on your LAN?

Re: noscript conflict with localhost script

Posted: Tue May 24, 2011 2:07 am
by linjuming
great! it works !

Image