Commit a98b4b8a authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇

Add "document-share" icon for "Share..." context menu entry

At least on Firefox where context menu icons are supported
parent 60d07446
......@@ -85,11 +85,19 @@ function checkPurposeEnabled() {
function updatePurposeMenu() {
checkPurposeEnabled().then((enabled) => {
if (enabled && !hasPurposeMenu) {
chrome.contextMenus.create({
let props = {
id: purposeShareMenuId,
contexts: ["link", "page", "image", "audio", "video", "selection"],
title: chrome.i18n.getMessage("purpose_share")
}, () => {
};
if (IS_FIREFOX) {
props.icons = {
"16": "icons/document-share-symbolic.svg"
}
}
chrome.contextMenus.create(props, () => {
const error = chrome.runtime.lastError;
if (error) {
console.warn("Error creating purpose context menu", error.message);
......
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
<defs id="defs3051">
<style type="text/css" id="current-color-scheme">
.ColorScheme-Text {
color:#232629;
}
</style>
</defs>
<path style="fill:currentColor;fill-opacity:1;stroke:none"
d="M 11.5 2 C 10.671573 2 10 2.6715728 10 3.5 C 10 4.3284272 10.671573 5 11.5 5 C 12.328427 5 13 4.3284272 13 3.5 C 13 2.6715728 12.328427 2 11.5 2 z M 8.5 5 C 8.2238576 5 8 5.2238576 8 5.5 C 8 5.7761424 8.2238576 6 8.5 6 C 8.7761424 6 9 5.7761424 9 5.5 C 9 5.2238576 8.7761424 5 8.5 5 z M 6.5 6 C 6.2238576 6 6 6.2238576 6 6.5 C 6 6.7761424 6.2238576 7 6.5 7 C 6.7761424 7 7 6.7761424 7 6.5 C 7 6.2238576 6.7761424 6 6.5 6 z M 3.5 7 C 2.6715729 7 2 7.6715728 2 8.5 C 2 9.3284272 2.6715729 10 3.5 10 C 4.3284271 10 5 9.3284272 5 8.5 C 5 7.6715728 4.3284271 7 3.5 7 z M 6.5 10 C 6.2238576 10 6 10.223858 6 10.5 C 6 10.776142 6.2238576 11 6.5 11 C 6.7761424 11 7 10.776142 7 10.5 C 7 10.223858 6.7761424 10 6.5 10 z M 8.5 11 C 8.2238576 11 8 11.223858 8 11.5 C 8 11.776142 8.2238576 12 8.5 12 C 8.7761424 12 9 11.776142 9 11.5 C 9 11.223858 8.7761424 11 8.5 11 z M 11.5 11 C 10.671573 11 10 11.671573 10 12.5 C 10 13.328427 10.671573 14 11.5 14 C 12.328427 14 13 13.328427 13 12.5 C 13 11.671573 12.328427 11 11.5 11 z "
class="ColorScheme-Text"
/>
</svg>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment