From e87f57c75890fe619e454fed3d7077a2eb63ac0d Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Fri, 17 Nov 2017 19:09:49 +0100 Subject: Remove Firefox Social API shaare Firefox Social support has been dropped in Firefox 57. Related to #1023 --- assets/default/js/base.js | 33 --------------------------------- tpl/default/tools.html | 17 ----------------- tpl/vintage/tools.html | 32 -------------------------------- 3 files changed, 82 deletions(-) diff --git a/assets/default/js/base.js b/assets/default/js/base.js index 5cf037c2..8bf79d3e 100644 --- a/assets/default/js/base.js +++ b/assets/default/js/base.js @@ -98,29 +98,6 @@ function htmlEntities(str) { return str.replace(/[\u00A0-\u9999<>&]/gim, i => `&#${i.charCodeAt(0)};`); } -function activateFirefoxSocial(node) { - const loc = location.href; - const baseURL = loc.substring(0, loc.lastIndexOf('/') + 1); - - const data = { - name: document.title, - description: document.getElementById('translation-delete-link').innerHTML, - author: 'Shaarli', - version: '1.0.0', - - iconURL: `${baseURL}/images/favicon.ico`, - icon32URL: `${baseURL}/images/favicon.ico`, - icon64URL: `${baseURL}/images/favicon.ico`, - - shareURL: `${baseURL}?post=%{url}&title=%{title}&description=%{text}&source=firefoxsocialapi`, - homepageURL: baseURL, - }; - node.setAttribute('data-service', JSON.stringify(data)); - - const activate = new CustomEvent('ActivateSocialFeature'); - node.dispatchEvent(activate); -} - /** * Add the class 'hidden' to city options not attached to the current selected continent. * @@ -433,16 +410,6 @@ function init(description) { }); }); - /** - * Firefox Social - */ - const ffButton = document.getElementById('ff-social-button'); - if (ffButton != null) { - ffButton.addEventListener('click', (event) => { - activateFirefoxSocial(event.target); - }); - } - const continent = document.getElementById('continent'); const city = document.getElementById('city'); if (continent != null && city != null) { diff --git a/tpl/default/tools.html b/tpl/default/tools.html index 20060994..6b4d7bec 100644 --- a/tpl/default/tools.html +++ b/tpl/default/tools.html @@ -120,23 +120,6 @@ -{if="$sslenabled"} -
-
-
-

Firefox Social API

-

{'You need to browse your Shaarli over HTTPS to use this functionality.'|t}

- - -
-
-{/if} -
diff --git a/tpl/vintage/tools.html b/tpl/vintage/tools.html index 3194844a..1cef726e 100644 --- a/tpl/vintage/tools.html +++ b/tpl/vintage/tools.html @@ -55,13 +55,6 @@

- {if="$sslenabled"} - ✚Add to Firefox social - - ⇐ Click on this button to add Shaarli to the "Share this page" button in Firefox. -

- {/if} - {loop="$tools_plugin"} {$value} {/loop} @@ -69,31 +62,6 @@