Bug correction

This commit is contained in:
Laurent Espitallier 2017-08-09 21:00:23 +02:00
parent f6c889a09d
commit 7b51fb3064

View File

@ -70,12 +70,12 @@ browser.contextMenus.create({
}); });
browser.browserAction.onClicked.addListener((tab) => { browser.browserAction.onClicked.addListener((tab) => {
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
{ {
if((tab.url.includes("about:reader?url=") == true) || (tab.url.includes("https://addons.mozilla.org/") == true)){ browser.tabs.sendMessage(tab.id, {method: "getSelection"}).then(response => {
shareURL(response.response,tab); shareURL(response.response,tab);
}).catch(onError); }).catch(onError);
} }