Hi,
I am using a self developed add-on that, in a nutshell, passes a selected/highlighted string on a webpage and passes it to a HKEY_CLASSES_ROOT link that opens a cmd file. I am passing the string by opening a new tab and calling the URL. Looks something like this:
function get_original_tab_id(info,tab) {
var cur_index = browser.tabs.query({currentWindow: true, active: true});
var old_id = tab.id;
return old_id;
};
function close_new_tab (old_id) {
browser.tabs.query({currentWindow: true, active:true}).then(queryInfo => {
browser.tabs.get(queryInfo[0].id).then(tab => {
//console.log('New ID is : '+tab.id);
browser.tabs.remove(tab.id);
browser.tabs.update(old_id, {active: true});
//console.log('OLD_ID is: '+old_id);
});
});
}
function contextMenuAction(info, tab) {
var old_id = get_original_tab_id(info,tab);
switch (info.menuItemId) {
case "1 SQLPLUS":
browser.tabs.create({index: 1,url: "sqlpluscmd://"+info.selectionText.trim()+"/"});
close_new_tab (old_id);
break;
}
sqlpluscmd is the name HKEY_CLASSES_ROOT that will execute specific .cmd file.
Again, worked perfectly well until the most recent update (84). Now it simply does nothing anymore, meaning it is not calling the url.
When testing the add-on using web-ext run, it prompts me exactly one time for permission to open the link (see screenshot)
Sorry, it’s in German, but I can’t seem to force firefox to use EN. But I’m guessing you’re getting the idea…
Once I allow the execution, it will execute the link for every new call, without asking. I am using a context menu with other options and other links. No other link will work though once I gave permission to the first link I was calling.
Also, when I cancel the very first prompt and repeat the exact same call it will never prompt me gain. Not for that or any other URL.
In the normal runtime I am not getting prompted at all.
Any idea what this might be caused by?
Many thanks