https://chrome.google.com/webstore/deta ... iccfohbnmh
Here's all the source code that runs it:
manifest.json
Code: Select all
{ "manifest_version": 2, "name": "Right-click no actions", "description": "Right click any URL to open it without javascript. Close the tab and reopen to undo effect", "version": "1.5.1", "permissions": [ "contextMenus", "tabs", "contentSettings" ], "background": { "scripts": ["noaction.js"] } }
Javascript:
Code: Select all
var link=""
var pattern=""
function linkOnClick(info, tab) {
r = /:\/\/(.[^/]+)/;
link=info.linkUrl
pattern="http://"+link.match(r)[1]+"/*"
chrome.contentSettings.javascript.set(
{'primaryPattern':pattern,
'setting': "block",
'scope':'regular'},
function(){
window.open(link)
chrome.contentSettings.javascript.set({
'primaryPattern':pattern,
'setting': "allow",
'scope':'regular'
})
});
}
chrome.contextMenus.create({title: "Load with no Javascript", contexts:["link"], onclick: linkOnClick});