javascript - Open external program using URI Scheme without creating new tabs -


i want pass url external program (open url program), without creating new tab/window. used "chrome.contextmenus.create" open url program: right-click link & "open external program": http://postimg.org/image/usj1yb8gj/

i wrote next code chrome-extension:

chrome.runtime.oninstalled.addlistener(function() {     chrome.contextmenus.create({         title: 'open program',         id: 'nameofprogram',         contexts: ['link'],     }); }); chrome.contextmenus.onclicked.addlistener(function(info, tab) {     if (info.menuitemid === "nameofprogram") {          //var win = window.open("nameofurischeme://" + info.linkurl, '_blank'); // '_self' - doesn't work...          chrome.tabs.create({ url: "nameofurischeme://" + info.linkurl },function(tab){settimeout(function(){chrome.tabs.remove(tab.id);}, 1000);});         } }); 

but opens new tab 1 second open url. can uri-scheme:adress (when uri associated specific program) open without creating new tab when opens using contexts menu?

omg. need change creat update chrome.tabs.update({...});


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -