Page 1 of 1

??? function blocked silently

Posted: Mon Apr 29, 2013 9:56 am
by 江3如此多娇
// ==UserScript==
// @name url bar blur to revert
// @namespace blur2revert@zbinlin.gmail.com
// @filename blur2revert.uc.js
// @description url bar blur to revert (当地址栏失去焦点后,恢复原来的地址。)
// @author zbinlin
// @version 0.1.20110602.1
// @updateURL https://j.mozest.com/ucscript/script/39.meta.js
// ==/UserScript==

if (location == "chrome://browser/content/browser.xul") {

var ub = document.getElementById("urlbar");
ub.addEventListener("blur", function () {
this.handleRevert();
}, false);

}
============================
the above is a .uc.js file code used by this addon, which aims to restore the original URL in the addressbar automatically after lost the focus of addressbar.

the problem is NS block the action of the addressbar in new tab silently, in ohter words, I can not open an URL in blank tab through the URLbar.

I chacked all the possible patential opinion of NS, but failed to make it.

What`s the reason of that and Can I get a work-around? ;)

Re: ??? function blocked silently

Posted: Mon Apr 29, 2013 9:03 pm
by GµårÐïåñ
This isn't necessarily a NS blocking situation, you need to make sure that you are allowing scripts through the URL bar in the about:config otherwise it won't work.

Re: ??? function blocked silently

Posted: Tue Apr 30, 2013 3:02 am
by 江3如此多娇
GµårÐïåñ wrote:This isn't necessarily a NS blocking situation, you need to make sure that you are allowing scripts through the URL bar in the about:config otherwise it won't work.
after turn off NS,the script works normally, so I still think it is NS that block the script