Manages AMO pages

This commit is contained in:
Laurent Espitallier 2017-08-09 20:38:35 +02:00
parent ca5a5f32a6
commit f6c889a09d

View File

@ -55,7 +55,7 @@ browser.contextMenus.create({
onclick: function(){ onclick: function(){
browser.tabs.query({ currentWindow: true, active: true }, function(tabs) { browser.tabs.query({ currentWindow: true, active: true }, function(tabs) {
tab = tabs[0]; tab = tabs[0];
if(tab.url.includes("about:reader?url=") == true){ if((tab.url.includes("about:reader?url=") == true) || (tab.url.includes("https://addons.mozilla.org/") == true)){
shareURL("",tab); shareURL("",tab);
} }
else else
@ -75,7 +75,7 @@ browser.browserAction.onClicked.addListener((tab) => {
} }
else else
{ {
browser.tabs.sendMessage(tab.id, {method: "getSelection"}).then(response => { if((tab.url.includes("about:reader?url=") == true) || (tab.url.includes("https://addons.mozilla.org/") == true)){
shareURL(response.response,tab); shareURL(response.response,tab);
}).catch(onError); }).catch(onError);
} }