]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - themes/baggy/_head.twig
Merge pull request #1207 from vpmalley/dev
[github/wallabag/wallabag.git] / themes / baggy / _head.twig
index b9f1e5d9d5c65d7b58a04153721b9815f3656525..9ca51cd2d21ff50997ac5d31d21fa0758725e167 100755 (executable)
         <script src="{{ poche_url }}themes/_global/js/popupForm.js"></script>
         <script src="{{ poche_url }}themes/_global/js/keyboard.js"></script>
         <script src="{{ poche_url }}themes/{{theme}}/js/closeMessage.js"></script>
+        
+        <!-- Enable Firefox Social Services
+        script put there because of the call to poche_url -->
+
+        <script>
+        var baseurl = "{{ poche_url }}";
+        console.log(baseurl);
+        var data = {
+
+                "name": "wallabag",
+                "iconURL": baseurl + "/themes/_global/img/appicon/firefox-service-icon-16.png",
+                "icon32URL": baseurl + "/themes/_global/img/appicon/firefox-service-icon-32.png",
+                "icon64URL": baseurl + "/themes/_global/img/appicon/firefox-service-icon-64.png",
+
+                "shareURL": baseurl + "/index.php?action=add&plainurl=%{url}",
+
+                "description": "wallabag Extension for Firefox - The (soon to become) best way to save articles, videos and more",
+                "author": "Thomas Citharel",
+                "homepageURL": "http://doc.wallabag.org/en/User/save_your_first_article.html#firefox-social-api-service",
+                "origin": "https://wallabag.org",
+                "postActivationURL": "http://doc.wallabag.org/en/User/save_your_first_article.html#firefox-social-api-service",
+
+                "version": "0.1"
+        };
+        function activateSocialFeature(node) {
+                var event = new CustomEvent("ActivateSocialFeature");
+                node.setAttribute("data-service", JSON.stringify(data));
+                node.dispatchEvent(event);
+        }
+        </script>