diff options
author | ArthurHoaro <arthur@hoa.ro> | 2018-08-11 14:15:47 +0200 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2018-08-11 14:15:47 +0200 |
commit | e0a77f2cceba5295b04add1ab177020c8b028df5 (patch) | |
tree | 586a02a4274471e435f4de8c6427c1ce6b527d62 /assets | |
parent | 32ee32517c9e999e61bda2a018c899e4b6fbd528 (diff) | |
parent | 9e3a97b36e17559e11768516749bd3f65ab971a5 (diff) | |
download | Shaarli-e0a77f2cceba5295b04add1ab177020c8b028df5.tar.gz Shaarli-e0a77f2cceba5295b04add1ab177020c8b028df5.tar.zst Shaarli-e0a77f2cceba5295b04add1ab177020c8b028df5.zip |
Merge tag 'v0.10.1' into latest
Release v0.10.1
Diffstat (limited to 'assets')
-rw-r--r-- | assets/default/js/base.js | 33 |
1 files changed, 0 insertions, 33 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) { | |||
98 | return str.replace(/[\u00A0-\u9999<>&]/gim, i => `&#${i.charCodeAt(0)};`); | 98 | return str.replace(/[\u00A0-\u9999<>&]/gim, i => `&#${i.charCodeAt(0)};`); |
99 | } | 99 | } |
100 | 100 | ||
101 | function activateFirefoxSocial(node) { | ||
102 | const loc = location.href; | ||
103 | const baseURL = loc.substring(0, loc.lastIndexOf('/') + 1); | ||
104 | |||
105 | const data = { | ||
106 | name: document.title, | ||
107 | description: document.getElementById('translation-delete-link').innerHTML, | ||
108 | author: 'Shaarli', | ||
109 | version: '1.0.0', | ||
110 | |||
111 | iconURL: `${baseURL}/images/favicon.ico`, | ||
112 | icon32URL: `${baseURL}/images/favicon.ico`, | ||
113 | icon64URL: `${baseURL}/images/favicon.ico`, | ||
114 | |||
115 | shareURL: `${baseURL}?post=%{url}&title=%{title}&description=%{text}&source=firefoxsocialapi`, | ||
116 | homepageURL: baseURL, | ||
117 | }; | ||
118 | node.setAttribute('data-service', JSON.stringify(data)); | ||
119 | |||
120 | const activate = new CustomEvent('ActivateSocialFeature'); | ||
121 | node.dispatchEvent(activate); | ||
122 | } | ||
123 | |||
124 | /** | 101 | /** |
125 | * Add the class 'hidden' to city options not attached to the current selected continent. | 102 | * Add the class 'hidden' to city options not attached to the current selected continent. |
126 | * | 103 | * |
@@ -433,16 +410,6 @@ function init(description) { | |||
433 | }); | 410 | }); |
434 | }); | 411 | }); |
435 | 412 | ||
436 | /** | ||
437 | * Firefox Social | ||
438 | */ | ||
439 | const ffButton = document.getElementById('ff-social-button'); | ||
440 | if (ffButton != null) { | ||
441 | ffButton.addEventListener('click', (event) => { | ||
442 | activateFirefoxSocial(event.target); | ||
443 | }); | ||
444 | } | ||
445 | |||
446 | const continent = document.getElementById('continent'); | 413 | const continent = document.getElementById('continent'); |
447 | const city = document.getElementById('city'); | 414 | const city = document.getElementById('city'); |
448 | if (continent != null && city != null) { | 415 | if (continent != null && city != null) { |