noscript conflict with localhost script

Ask for help about NoScript, no registration needed to post
mingfish

noscript conflict with localhost script

Post 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
	}
  })();
Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.2.13) Gecko/20101130 Firefox/3.6.13
linjuming
Posts: 2
Joined: Mon May 23, 2011 9:49 am

Re: noscript conflict with localhost script

Post by linjuming »

i want to know too!
Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.2.13) Gecko/20101130 Firefox/3.6.13
dhouwn
Bug Buster
Posts: 968
Joined: Thu Mar 19, 2009 12:51 pm

Re: noscript conflict with localhost script

Post by dhouwn »

Huh? So you have an issue with the default ABE rule for preventing internet sites to access things on your LAN?
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20100101 Firefox/5.0
linjuming
Posts: 2
Joined: Mon May 23, 2011 9:49 am

Re: noscript conflict with localhost script

Post by linjuming »

great! it works !

Image
Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.2.13) Gecko/20101130 Firefox/3.6.13
Post Reply