Can't copy text on "about:" pages. This is a webextension or Firefox limitation.
This commit is contained in:
parent
4940b0b874
commit
c2535beac9
@ -55,16 +55,28 @@ 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:") == true){
|
||||||
|
shareURL("",tab);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
browser.tabs.sendMessage(tab.id, {method: "getSelection"}).then(response => {
|
browser.tabs.sendMessage(tab.id, {method: "getSelection"}).then(response => {
|
||||||
shareURL(response.response,tab);
|
shareURL(response.response,tab);
|
||||||
}).catch(onError);
|
}).catch(onError);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
contexts: ["all"]
|
contexts: ["all"]
|
||||||
});
|
});
|
||||||
|
|
||||||
browser.browserAction.onClicked.addListener((tab) => {
|
browser.browserAction.onClicked.addListener((tab) => {
|
||||||
|
if(tab.url.includes("about:") == true){
|
||||||
|
shareURL("",tab);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
browser.tabs.sendMessage(tab.id, {method: "getSelection"}).then(response => {
|
browser.tabs.sendMessage(tab.id, {method: "getSelection"}).then(response => {
|
||||||
shareURL(response.response,tab);
|
shareURL(response.response,tab);
|
||||||
}).catch(onError);
|
}).catch(onError);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"manifest_version" : 2,
|
"manifest_version" : 2,
|
||||||
"name": "Add to (Semantic)Scuttle",
|
"name": "Add to (Semantic)Scuttle",
|
||||||
"version" : "0.7.1",
|
"version" : "0.7.2",
|
||||||
"description" : "Add bookmarks to a (Semantic)Scuttle instance, a social bookmarking tool experimenting with tags and collaborative tag descriptions.",
|
"description" : "Add bookmarks to a (Semantic)Scuttle instance, a social bookmarking tool experimenting with tags and collaborative tag descriptions.",
|
||||||
"homepage_url" : "https://addons.mozilla.org/fr/firefox/addon/add-to-semantic-scuttle/",
|
"homepage_url" : "https://addons.mozilla.org/fr/firefox/addon/add-to-semantic-scuttle/",
|
||||||
"icons" : {
|
"icons" : {
|
||||||
|
Loading…
Reference in New Issue
Block a user