diff options
author | Thomas Citharel <tcit@tcit.fr> | 2015-05-12 15:46:39 +0200 |
---|---|---|
committer | Thomas Citharel <tcit@tcit.fr> | 2015-05-12 15:46:39 +0200 |
commit | 090957fe3e12ffe23d2f847f6007c72eb9ca072d (patch) | |
tree | afb459f2c5ff7d3fe4d8df57db2bd9a780972732 /themes/baggy/_head.twig | |
parent | 63fd39c3265af7f02bcc0ac09bc732b89cab50fb (diff) | |
download | wallabag-090957fe3e12ffe23d2f847f6007c72eb9ca072d.tar.gz wallabag-090957fe3e12ffe23d2f847f6007c72eb9ca072d.tar.zst wallabag-090957fe3e12ffe23d2f847f6007c72eb9ca072d.zip |
added Mozilla Social API Sharing method - better late than ever
Diffstat (limited to 'themes/baggy/_head.twig')
-rwxr-xr-x | themes/baggy/_head.twig | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/themes/baggy/_head.twig b/themes/baggy/_head.twig index b9f1e5d9..1546a7b9 100755 --- a/themes/baggy/_head.twig +++ b/themes/baggy/_head.twig | |||
@@ -39,3 +39,32 @@ | |||
39 | <script src="{{ poche_url }}themes/_global/js/popupForm.js"></script> | 39 | <script src="{{ poche_url }}themes/_global/js/popupForm.js"></script> |
40 | <script src="{{ poche_url }}themes/_global/js/keyboard.js"></script> | 40 | <script src="{{ poche_url }}themes/_global/js/keyboard.js"></script> |
41 | <script src="{{ poche_url }}themes/{{theme}}/js/closeMessage.js"></script> | 41 | <script src="{{ poche_url }}themes/{{theme}}/js/closeMessage.js"></script> |
42 | <!-- Enable Firefox Social Services | ||
43 | script put there because of the call to poche_url --> | ||
44 | |||
45 | <script> | ||
46 | var baseurl = "{{ poche_url }}"; | ||
47 | console.log(baseurl); | ||
48 | var data = { | ||
49 | |||
50 | "name": "wallabag", | ||
51 | "iconURL": baseurl + "/themes/_global/img/appicon/firefox-service-icon-16.png", | ||
52 | "icon32URL": baseurl + "/themes/_global/img/appicon/firefox-service-icon-32.png", | ||
53 | "icon64URL": baseurl + "/themes/_global/img/appicon/firefox-service-icon-64.png", | ||
54 | |||
55 | "shareURL": baseurl + "/index.php?action=add&plainurl=%{url}", | ||
56 | |||
57 | "description": "wallabag Extension for Firefox - The (soon to become) best way to save articles, videos and more", | ||
58 | "author": "Thomas Citharel", | ||
59 | "homepageURL": "https://wallabag.org", | ||
60 | "origin": "https://wallabag.org", | ||
61 | "postActivationURL": "https://wallabag.org", | ||
62 | |||
63 | "version": "0.1" | ||
64 | }; | ||
65 | function activateSocialFeature(node) { | ||
66 | var event = new CustomEvent("ActivateSocialFeature"); | ||
67 | node.setAttribute("data-service", JSON.stringify(data)); | ||
68 | node.dispatchEvent(event); | ||
69 | } | ||
70 | </script> | ||