diff --git a/extension/_locales/en/messages.json b/extension/_locales/en/messages.json new file mode 100644 index 0000000000000000000000000000000000000000..b4f672fca009ab18519391db8a3a7ba525a11a4e --- /dev/null +++ b/extension/_locales/en/messages.json @@ -0,0 +1,11 @@ +{ + "extensionDescription": { + "message": "Clean up display of links rewritten by Microsoft Defender for Office 365 Safe Links, so it is easy to see and copy the original link.", + "description": "Description of the extension." + }, + + "copyLinkMenuTitle": { + "message": "Copy original link", + "description": "Title of the copy original link menu item." + } +} diff --git a/extension/_locales/sv/messages.json b/extension/_locales/sv/messages.json new file mode 100644 index 0000000000000000000000000000000000000000..b5572a0e00c2da2e9d6ce09b244ad6de80763f7e --- /dev/null +++ b/extension/_locales/sv/messages.json @@ -0,0 +1,11 @@ +{ + "extensionDescription": { + "message": "Ändra visning av länkar omskrivna av Microsoft Defender för Office 365 Safe Links, så det är enkelt att se och kopiera den ursrpungliga länken.", + "description": "Description of the extension." + }, + + "copyLinkMenuTitle": { + "message": "Kopiera ursprunglig länk", + "description": "Title of the copy original link menu item." + } +} diff --git a/extension/background.js b/extension/background.js index 1618c3afc49235f488bd27fe940a6c97acbb6cd7..2db81a7458ae3d339a2812616fb0b19b835a6355 100644 --- a/extension/background.js +++ b/extension/background.js @@ -9,9 +9,12 @@ browser.messageDisplayScripts.register({ }); +console.log(browser); +console.log(browser.i18n); + browser.menus.create({ id: "liu-safelinks-copy", - title: "Copy original link", + title: browser.i18n.getMessage("copyLinkMenuTitle"), contexts: ["link"], visible: true, targetUrlPatterns: ["*://*.safelinks.protection.outlook.com/*"], diff --git a/extension/manifest.json b/extension/manifest.json index 5164f281a36ce8e8d0e4b8676e9a56955e55ab3c..cd14e0542a727944ca198b116cf41f64ae6bc905 100644 --- a/extension/manifest.json +++ b/extension/manifest.json @@ -1,10 +1,11 @@ { "manifest_version": 2, - "name": "Safelinks Cleaner", - "description": "Clean up display of Microsoft Advanced Threat Protection Safe Links", + "name": "Safe Links Cleaner", + "description": "__MSG_extensionDescription__", "version": "1.0", "author": "David Byers", - "homepage_url": "https://gitlab.liu.se/davby02/safelinkscleaner/", + "homepage_url": "https://safelinks.gitlab-pages.liu.se/safelinks-cleaner-mailextension/", + "default_locale": "en", "icons": { "48": "icon.svg", "96": "icon.svg", @@ -27,8 +28,5 @@ "messagesModify", "clipboardWrite", "menus" - ], - "web_accessible_resources": [ - "assets/*.png" ] } diff --git a/extension/style.css b/extension/style.css index 47f6371fb0d22f9ba0b275f32c8752f385e3f6eb..df4e5138cd52da3259d79171c8a29859454a9569 100644 --- a/extension/style.css +++ b/extension/style.css @@ -4,10 +4,9 @@ a:hover .liu_safelinks_tooltip { .liu_safelinks_tooltip { display: none; - background: #fffff0 url(assets/shield.png) no-repeat 3px; - background-size: 14px 14px; + background: #fffff8; color: black; - padding: 3px 3px 4px 22px; + padding: 3px 3px 4px 3px; position: absolute; z-index: 1000; border: 1px solid black;