From adc4aee80f7cd3242f65f0b316af2b560a64712c Mon Sep 17 00:00:00 2001 From: Knah Tsaeb Date: Wed, 7 Dec 2016 11:58:25 +0100 Subject: Change templates set through administration UI --- tpl/default/tools.html | 104 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 tpl/default/tools.html (limited to 'tpl/default/tools.html') diff --git a/tpl/default/tools.html b/tpl/default/tools.html new file mode 100644 index 00000000..e06d239d --- /dev/null +++ b/tpl/default/tools.html @@ -0,0 +1,104 @@ + + +{include="includes"} + + +{include="page.footer"} + + -- cgit v1.2.3 From b848615c52660f9e3173ab7eedab29af0c49a4fc Mon Sep 17 00:00:00 2001 From: Christophe HENRY Date: Wed, 22 Feb 2017 14:55:52 +0100 Subject: Removes spaces before and after bookmarklet's name Carriage returns turns into space in some cases. The name of the bookmarklet, once in the browser bookmarks, is surrounded by spaces. --- tpl/default/tools.html | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'tpl/default/tools.html') diff --git a/tpl/default/tools.html b/tpl/default/tools.html index e06d239d..c36aa5b5 100644 --- a/tpl/default/tools.html +++ b/tpl/default/tools.html @@ -30,9 +30,7 @@ '&source=bookmarklet','_blank','menubar=no,height=390,width=600,toolbar=no,scrollbars=no,status=no,dialog=1' ); } - )();"> - ✚Shaare link - + )();">✚Shaare link ⇐ Drag this link to your bookmarks toolbar (or right-click it and choose Bookmark This Link....).
@@ -41,9 +39,7 @@


- ✚Add Note - + href="?private=1&post=">✚Add Note ⇐ Drag this link to your bookmarks toolbar (or right-click it and choose Bookmark This Link....).
@@ -52,9 +48,7 @@


{if="$sslenabled"} - - ✚Add to Firefox social - + ✚Add to Firefox social ⇐ Click on this button to add Shaarli to the "Share this page" button in Firefox.

-- cgit v1.2.3 From 009ce9358168cc06c76fc2f4162829e552e633a3 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Sat, 14 Jan 2017 15:51:30 +0100 Subject: Move default template to vintage folder --- tpl/default/tools.html | 98 -------------------------------------------------- 1 file changed, 98 deletions(-) delete mode 100644 tpl/default/tools.html (limited to 'tpl/default/tools.html') diff --git a/tpl/default/tools.html b/tpl/default/tools.html deleted file mode 100644 index c36aa5b5..00000000 --- a/tpl/default/tools.html +++ /dev/null @@ -1,98 +0,0 @@ - - -{include="includes"} - - -{include="page.footer"} - - -- cgit v1.2.3 From 402b03464812aaec76bc841ca7dacb775baf1e03 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Sat, 14 Jan 2017 15:52:17 +0100 Subject: Introduce the new default Shaarli template --- tpl/default/tools.html | 179 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 179 insertions(+) create mode 100644 tpl/default/tools.html (limited to 'tpl/default/tools.html') diff --git a/tpl/default/tools.html b/tpl/default/tools.html new file mode 100644 index 00000000..b9df32d9 --- /dev/null +++ b/tpl/default/tools.html @@ -0,0 +1,179 @@ + + + + {include="includes"} + + +{include="page.header"} + +
+
+
+

{'Settings'|t}

+ + + {if="!$openshaarli"} + + {/if} + + + + + {loop="$tools_plugin"} +
+ {$value} +
+ {/loop} +
+ + +
+
+ +
+
+
+

Bookmarklets

+

+ {'Drag one of these button to your bookmarks toolbar or right-click it and "Bookmark This Link"'|t}, + {'then click on the bookmarklet in any page you want to share.'|t} +

+ + +
+
+ +{if="$sslenabled"} +
+
+
+

Firefox Social API

+

{'You need to browse your Shaarli over HTTPS to use this functionality.'|t}

+ + +
+
+{/if} + + + +{include="page.footer"} + + + + + -- cgit v1.2.3 From b9b41d25e319f44f9fb8259a0237a8ee81ad394b Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Sun, 12 Mar 2017 12:45:32 +0100 Subject: Remove inline JS and add LibreJS headers in JS files Fixes #33 (wow!) Relates to #395 --- tpl/default/tools.html | 42 ++++++------------------------------------ 1 file changed, 6 insertions(+), 36 deletions(-) (limited to 'tpl/default/tools.html') diff --git a/tpl/default/tools.html b/tpl/default/tools.html index b9df32d9..baa033af 100644 --- a/tpl/default/tools.html +++ b/tpl/default/tools.html @@ -67,7 +67,7 @@ @@ -103,7 +103,7 @@ @@ -142,38 +142,8 @@ {include="page.footer"} - - + -- cgit v1.2.3 From bb8cf6d3620456d5026df667752b793192f44fe1 Mon Sep 17 00:00:00 2001 From: philipp-r Date: Mon, 27 Mar 2017 14:01:06 +0200 Subject: Add Note bookmarklet #580 --- tpl/default/tools.html | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'tpl/default/tools.html') diff --git a/tpl/default/tools.html b/tpl/default/tools.html index baa033af..6951ad28 100644 --- a/tpl/default/tools.html +++ b/tpl/default/tools.html @@ -86,8 +86,16 @@ @@ -146,4 +154,3 @@ value="{'Drag this link to your bookmarks toolbar, or right-click it and choose Bookmark This Link'|t}"> - -- cgit v1.2.3 From d6aec9e60b5dad7b6e64b62dc4aa8a9f403634dc Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Thu, 25 May 2017 16:45:08 +0200 Subject: Selection is now limited to 2k characters using bookmarklets to avoid having too large URL Fixes #528 --- tpl/default/tools.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tpl/default/tools.html') diff --git a/tpl/default/tools.html b/tpl/default/tools.html index 6951ad28..bf6b6ca3 100644 --- a/tpl/default/tools.html +++ b/tpl/default/tools.html @@ -75,7 +75,7 @@ window.open( '{$pageabsaddr}?post='%20+%20encodeURIComponent(url)+ '&title='%20+%20encodeURIComponent(title)+ - '&description='%20+%20encodeURIComponent(document.getSelection())+ + '&description='%20+%20encodeURIComponent(document.getSelection().toString().substr(0, 2000))+ '&source=bookmarklet','_blank','menubar=no,height=800,width=600,toolbar=no,scrollbars=yes,status=no,dialog=1' ); } @@ -91,7 +91,7 @@ function(){ window.open( '{$pageabsaddr}?private=1&post='+ - '&description='%20+%20encodeURIComponent(document.getSelection())+ + '&description='%20+%20encodeURIComponent(document.getSelection().toString().substr(0, 2000))+ '&source=bookmarklet','_blank','menubar=no,height=800,width=600,toolbar=no,scrollbars=yes,status=no,dialog=1' ); } -- cgit v1.2.3 From e2bcb9d915fdda15253dd730a6d172323a8e8564 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Sun, 28 May 2017 13:04:31 +0200 Subject: Bookmarklet size limit: increase to 4500 chars and add an alert warning --- tpl/default/tools.html | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'tpl/default/tools.html') diff --git a/tpl/default/tools.html b/tpl/default/tools.html index bf6b6ca3..35173d17 100644 --- a/tpl/default/tools.html +++ b/tpl/default/tools.html @@ -72,10 +72,15 @@ function(){ var%20url%20=%20location.href; var%20title%20=%20document.title%20||%20url; + var%20desc=document.getSelection().toString(); + if(desc.length>4000){ + desc=desc.substr(0,4000)+'...'; + alert('{function="str_replace(' ', '%20', t('The selected text is too long, it will be truncated.'))"}'); + } window.open( '{$pageabsaddr}?post='%20+%20encodeURIComponent(url)+ '&title='%20+%20encodeURIComponent(title)+ - '&description='%20+%20encodeURIComponent(document.getSelection().toString().substr(0, 2000))+ + '&description='%20+%20encodeURIComponent(desc)+ '&source=bookmarklet','_blank','menubar=no,height=800,width=600,toolbar=no,scrollbars=yes,status=no,dialog=1' ); } @@ -89,9 +94,14 @@ class="bookmarklet-link" href="javascript:( function(){ + var%20desc=document.getSelection().toString(); + if(desc.length>4000){ + desc=desc.substr(0,4000)+'...'; + alert("{function="str_replace(' ', '%20', t('The selected text is too long, it will be truncated.'))"}"); + } window.open( '{$pageabsaddr}?private=1&post='+ - '&description='%20+%20encodeURIComponent(document.getSelection().toString().substr(0, 2000))+ + '&description='%20+%20encodeURIComponent(desc)+ '&source=bookmarklet','_blank','menubar=no,height=800,width=600,toolbar=no,scrollbars=yes,status=no,dialog=1' ); } -- cgit v1.2.3 From 958fc15fecfe353a2cb2cf1cb4c7d10591ab74f9 Mon Sep 17 00:00:00 2001 From: Willi Eggeling Date: Thu, 24 Aug 2017 10:20:32 +0200 Subject: fixed note bookmarklet - the double quotes used in the alert() call of the note bookmarklet in the default template collided with the ones of the href tag - replaced the double quotes with single ones (just like the link bookmarklet) --- tpl/default/tools.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tpl/default/tools.html') diff --git a/tpl/default/tools.html b/tpl/default/tools.html index 35173d17..72fd58af 100644 --- a/tpl/default/tools.html +++ b/tpl/default/tools.html @@ -97,7 +97,7 @@ var%20desc=document.getSelection().toString(); if(desc.length>4000){ desc=desc.substr(0,4000)+'...'; - alert("{function="str_replace(' ', '%20', t('The selected text is too long, it will be truncated.'))"}"); + alert('{function="str_replace(' ', '%20', t('The selected text is too long, it will be truncated.'))"}'); } window.open( '{$pageabsaddr}?private=1&post='+ -- cgit v1.2.3