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 | |
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')
-rwxr-xr-x | themes/baggy/_head.twig | 29 | ||||
-rwxr-xr-x | themes/baggy/config.twig | 3 |
2 files changed, 31 insertions, 1 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> | ||
diff --git a/themes/baggy/config.twig b/themes/baggy/config.twig index b4765602..8562f133 100755 --- a/themes/baggy/config.twig +++ b/themes/baggy/config.twig | |||
@@ -16,7 +16,8 @@ | |||
16 | </p> | 16 | </p> |
17 | <h3>{% trans "Browser Addons" %}</h3> | 17 | <h3>{% trans "Browser Addons" %}</h3> |
18 | <ul> | 18 | <ul> |
19 | <li><a href="https://addons.mozilla.org/firefox/addon/wallabag/" target="_blank">{% trans "Firefox Add-On" %}</a></li> | 19 | <li><a href="https://addons.mozilla.org/firefox/addon/wallabag/" target="_blank">{% trans "Standard Firefox Add-On" %}</a></li> |
20 | <li><button onclick="activateSocialFeature(this)">Mozilla Services Social API Extension</button> | ||
20 | <li><a href="https://chrome.google.com/webstore/detail/wallabag/bepdcjnnkglfjehplaogpoonpffbdcdj" target="_blank">{% trans "Chrome Extension" %}</a></li> | 21 | <li><a href="https://chrome.google.com/webstore/detail/wallabag/bepdcjnnkglfjehplaogpoonpffbdcdj" target="_blank">{% trans "Chrome Extension" %}</a></li> |
21 | </ul> | 22 | </ul> |
22 | <h3>{% trans "Mobile Apps" %}</h3> | 23 | <h3>{% trans "Mobile Apps" %}</h3> |