aboutsummaryrefslogtreecommitdiffhomepage
path: root/tpl/default/tools.html
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2016-12-18 14:23:24 +0100
committerArthurHoaro <arthur@hoa.ro>2016-12-18 14:23:24 +0100
commit79a0dfe9cc658cbfafebac0aa9f1c2953faff777 (patch)
tree39ff0456f6032c6ebcb4549ecfff8f586869b95a /tpl/default/tools.html
parent4b0838e698f7811a42b7dc02cda276d3f9d83855 (diff)
downloadShaarli-79a0dfe9cc658cbfafebac0aa9f1c2953faff777.tar.gz
Shaarli-79a0dfe9cc658cbfafebac0aa9f1c2953faff777.tar.zst
Shaarli-79a0dfe9cc658cbfafebac0aa9f1c2953faff777.zip
Apply v0.8.2 changes, add opensearch tpl, add favicon
Diffstat (limited to 'tpl/default/tools.html')
-rw-r--r--tpl/default/tools.html68
1 files changed, 36 insertions, 32 deletions
diff --git a/tpl/default/tools.html b/tpl/default/tools.html
index ae794ce9..3f2cf0f1 100644
--- a/tpl/default/tools.html
+++ b/tpl/default/tools.html
@@ -76,7 +76,7 @@
76 '{$pageabsaddr}?post='%20+%20encodeURIComponent(url)+ 76 '{$pageabsaddr}?post='%20+%20encodeURIComponent(url)+
77 '&amp;title='%20+%20encodeURIComponent(title)+ 77 '&amp;title='%20+%20encodeURIComponent(title)+
78 '&amp;description='%20+%20encodeURIComponent(document.getSelection())+ 78 '&amp;description='%20+%20encodeURIComponent(document.getSelection())+
79 '&amp;source=bookmarklet','_blank','menubar=no,height=390,width=600,toolbar=no,scrollbars=no,status=no,dialog=1' 79 '&amp;source=bookmarklet','_blank','menubar=no,height=800,width=600,toolbar=no,scrollbars=yes,status=no,dialog=1'
80 ); 80 );
81 } 81 }
82 )();"> 82 )();">
@@ -94,20 +94,22 @@
94 </div> 94 </div>
95</div> 95</div>
96 96
97<div class="pure-g"> 97{if="$sslenabled"}
98 <div class="pure-u-lg-1-3 pure-u-1-8"></div> 98 <div class="pure-g">
99 <div class="pure-u-lg-1-3 pure-u-3-4 page-form page-form-light"> 99 <div class="pure-u-lg-1-3 pure-u-1-8"></div>
100 <h2 class="window-title">Firefox Social API</h2> 100 <div class="pure-u-lg-1-3 pure-u-3-4 page-form page-form-light">
101 <p>{'You need to browse your Shaarli over <strong>HTTPS</strong> to use this functionality.'|t}</p> 101 <h2 class="window-title">Firefox Social API</h2>
102 <p>{'You need to browse your Shaarli over <strong>HTTPS</strong> to use this functionality.'|t}</p>
102 103
103 <div class="tools-item"> 104 <div class="tools-item">
104 <a title="{'Click on this button to add Shaarli to the 'Share this page' button in Firefox" 105 <a title="{'Click on this button to add Shaarli to the 'Share this page' button in Firefox"
105 onclick="activateFirefoxSocial(this)"> 106 onclick="activateFirefoxSocial(this)">
106 <span class="pure-button pure-u-lg-2-3 pure-u-3-4">✚ {'Add to'|t} Firefox Social</span> 107 <span class="pure-button pure-u-lg-2-3 pure-u-3-4">✚ {'Add to'|t} Firefox Social</span>
107 </a> 108 </a>
109 </div>
108 </div> 110 </div>
109 </div> 111 </div>
110</div> 112{/if}
111 113
112<div class="pure-g"> 114<div class="pure-g">
113 <div class="pure-u-lg-1-3 pure-u-1-8"></div> 115 <div class="pure-u-lg-1-3 pure-u-1-8"></div>
@@ -128,31 +130,33 @@
128</div> 130</div>
129 131
130{include="page.footer"} 132{include="page.footer"}
131<script>
132 function activateFirefoxSocial(node) {
133 var loc = location.href;
134 var baseURL = loc.substring(0, loc.lastIndexOf("/"));
135 133
136 // Keeping the data separated (ie. not in the DOM) so that it's maintainable and diffable. 134<script>
137 var data = { 135 {if="$sslenabled"}
138 name: "{$shaarlititle}", 136 function activateFirefoxSocial(node) {
139 description: "The personal, minimalist, super-fast, database free, bookmarking service by the Shaarli community.", 137 var loc = location.href;
140 author: "Shaarli", 138 var baseURL = loc.substring(0, loc.lastIndexOf("/"));
141 version: "1.0.0",
142 139
143 iconURL: baseURL + "/images/favicon.ico", 140 // Keeping the data separated (ie. not in the DOM) so that it's maintainable and diffable.
144 icon32URL: baseURL + "/images/favicon.ico", 141 var data = {
145 icon64URL: baseURL + "/images/favicon.ico", 142 name: "{$shaarlititle}",
143 description: "The personal, minimalist, super-fast, database free, bookmarking service by the Shaarli community.",
144 author: "Shaarli",
145 version: "1.0.0",
146 146
147 shareURL: baseURL + "{noparse}?post=%{url}&title=%{title}&description=%{text}&source=firefoxsocialapi{/noparse}", 147 iconURL: baseURL + "/images/favicon.ico",
148 homepageURL: baseURL 148 icon32URL: baseURL + "/images/favicon.ico",
149 }; 149 icon64URL: baseURL + "/images/favicon.ico",
150 node.setAttribute("data-service", JSON.stringify(data));
151 150
152 var activate = new CustomEvent("ActivateSocialFeature"); 151 shareURL: baseURL + "{noparse}?post=%{url}&title=%{title}&description=%{text}&source=firefoxsocialapi{/noparse}",
153 node.dispatchEvent(activate); 152 homepageURL: baseURL
154 } 153 };
154 node.setAttribute("data-service", JSON.stringify(data));
155 155
156 var activate = new CustomEvent("ActivateSocialFeature");
157 node.dispatchEvent(activate);
158 }
159 {/if}
156 function alertBookmarklet() { 160 function alertBookmarklet() {
157 alert({"'Drag this link to your bookmarks toolbar, or right-click it and choose Bookmark This Link'"|t}); 161 alert({"'Drag this link to your bookmarks toolbar, or right-click it and choose Bookmark This Link'"|t});
158 return false; 162 return false;