
invoking bookmarklet with keyword is prevented
Re: invoking bookmarklet with keyword is prevented
You're right, it does work - I changed all the noscript settings back to default, which fixed it. I had noscript.global=true for some reason (I'm not even sure what that does). But after I changed it to the default false, the bookmarklets worked. Thanks
I should have thought of changing everything to defaults earlier.

Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20100101 Firefox/10.0.2
- GµårÐïåñ
- Lieutenant Colonel
- Posts: 3370
- Joined: Fri Mar 20, 2009 5:19 am
- Location: PST - USA
- Contact:
Re: invoking bookmarklet with keyword is prevented
Even without changing anything and using a profile that has been continually updated without a reset for months, it worked fine for me.
~.:[ Lï£ê ï§ å Lêmðñ åñÐ Ì Wåñ† M¥ Mðñê¥ ßå¢k ]:.~
________________ .: [ Major Mike's ] :. ________________
________________ .: [ Major Mike's ] :. ________________
Mozilla/5.0 (Windows NT 6.1; rv:10.0.2) Gecko/20100101 Firefox/10.0.2
Re: invoking bookmarklet with keyword is prevented
I have the same issue after installing Custom Button with this code (it opens all the links in new tabs):
And it seems this script and NS are conflicting.
My bookmarklets work while being invoked with click but with keyword they don't.
It only occurres on the sites that are not whitelisted.
Is there any solution?
May be any settings of the NS should be changed?
These parameters are set as follows:
user_pref("noscript.allowBookmarkletImports", true);
user_pref("noscript.allowURLBarImports",true);
user_pref("noscript.allowURLBarJS", true);
user_pref("noscript.forbidBookmarklets",false);
Or may be it is possible to make some changes to above javascript?
Code: Select all
// Bookmarks/History/Homepage/URL/Search open all in new tab ......................................
eval("whereToOpenLink = " + whereToOpenLink.toString()
.replace(/return "current";/g, "{"+(function() {
var node = e && e.originalTarget;
while (node) {
switch (node.id) {
case "bookmarksMenuPopup":
case "goPopup":
case "appmenu_bookmarksPopup":
case "appmenu_historyMenupopup":
case "personal-bookmarks":
case "bookmarks-menu-button":
case "historymenu_history":
case "home-button":
case "page-proxy-stack":
case "go-button":
case "urlbar-go-button":
case "PopupAutoCompleteRichResult":
case "searchbar":
case "PopupAutoComplete":
return "tab";
}
node = node.parentNode;
}
return "current";
}).toString().replace(/^.*{|}$/g, "")+"}")
);
//Bookmarklet
eval("openLinkIn = " + openLinkIn.toString()
.replace(/(?=if \(where == "save"\))/, 'if (url.substr(0, 11) == "javascript:") where = "current";')
.replace(/(?=var loadInBackground)/, 'if (w.gBrowser.currentURI.spec == "about:blank" && !w.gBrowser.mCurrentTab.hasAttribute("busy")) where = "current";')
);
document.getElementById("sidebar-box").addEventListener("load", function(event) {
var document = event.target;
if (document.location == "chrome://browser/content/bookmarks/bookmarksPanel.xul"
|| document.location == "chrome://browser/content/history/history-panel.xul") {
eval("document.defaultView.whereToOpenLink = " + document.defaultView.whereToOpenLink.toString()
.replace(/return "current";/g, 'return "tab";')
);
eval("document.defaultView.openLinkIn = " + document.defaultView.openLinkIn.toString()
.replace(/(?=if \(where == "save"\))/, 'if (url.substr(0, 11) == "javascript:") where = "current";')
.replace(/(?=var loadInBackground)/, 'if (w.gBrowser.currentURI.spec == "about:blank" && !w.gBrowser.mCurrentTab.hasAttribute("busy")) where = "current";')
);
}
}, true);
//
eval("gURLBar.handleCommand = " + gURLBar.handleCommand.toString()
.replace(/aTriggeringEvent\s*&&\s*aTriggeringEvent.altKey/, "!($&)")
.replace("aTriggeringEvent.preventDefault();", "")
.replace("aTriggeringEvent.stopPropagation();", "")
);
My bookmarklets work while being invoked with click but with keyword they don't.
It only occurres on the sites that are not whitelisted.
Is there any solution?
May be any settings of the NS should be changed?
These parameters are set as follows:
user_pref("noscript.allowBookmarkletImports", true);
user_pref("noscript.allowURLBarImports",true);
user_pref("noscript.allowURLBarJS", true);
user_pref("noscript.forbidBookmarklets",false);
Or may be it is possible to make some changes to above javascript?
Mozilla/5.0 (Windows NT 5.1; rv:10.0.4) Gecko/20100101 Firefox/10.0.4
Re: invoking bookmarklet with keyword is prevented
Help me please!!Guest wrote:I have the same issue after installing Custom Button with this code (it opens all the links in new tabs): ......................................
......................................
Is there any solution?
May be any settings of the NS should be changed?
Or may be it is possible to make some changes to above javascript?
Mozilla/5.0 (Windows NT 5.1; rv:10.0.4) Gecko/20100101 Firefox/10.0.4
- GµårÐïåñ
- Lieutenant Colonel
- Posts: 3370
- Joined: Fri Mar 20, 2009 5:19 am
- Location: PST - USA
- Contact:
Re: invoking bookmarklet with keyword is prevented
Giorgio is currently unavailable. When he gets back, I will have him take a look.
~.:[ Lï£ê ï§ å Lêmðñ åñÐ Ì Wåñ† M¥ Mðñê¥ ßå¢k ]:.~
________________ .: [ Major Mike's ] :. ________________
________________ .: [ Major Mike's ] :. ________________
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.1.0.0 Safari/537.36
- Giorgio Maone
- Site Admin
- Posts: 9527
- Joined: Wed Mar 18, 2009 11:22 pm
- Location: Palermo - Italy
- Contact:
Re: invoking bookmarklet with keyword is prevented
The code above replaces browser code, which has already been patched by NoScript in order to allow bookmarklets to work, throwing away NoScript's patches.
Therefore yes, it conflicts with NoScript breaking its ability to emulate bookmarklets.
If the code is yours, please try to debug it especially checking how it changes the gURLBar.handleCommand function.
Therefore yes, it conflicts with NoScript breaking its ability to emulate bookmarklets.
If the code is yours, please try to debug it especially checking how it changes the gURLBar.handleCommand function.
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:23.0) Gecko/20100101 Firefox/23.0
Re: invoking bookmarklet with keyword is prevented
The code isn't mine and unfortunately I'm not good at this stuff so I can't debug or something...Giorgio Maone wrote:...If the code is yours, please try to debug it especially checking how it changes the gURLBar.handleCommand function.
Anyway thank you for your reply.
Mozilla/5.0 (Windows NT 5.1; rv:20.0) Gecko/20100101 Firefox/20.0