aboutsummaryrefslogtreecommitdiffhomepage
path: root/tpl/default/js/shaarli.js
diff options
context:
space:
mode:
Diffstat (limited to 'tpl/default/js/shaarli.js')
-rw-r--r--tpl/default/js/shaarli.js15
1 files changed, 11 insertions, 4 deletions
diff --git a/tpl/default/js/shaarli.js b/tpl/default/js/shaarli.js
index 4f49affa..55656f80 100644
--- a/tpl/default/js/shaarli.js
+++ b/tpl/default/js/shaarli.js
@@ -275,8 +275,14 @@ window.onload = function () {
275 }; 275 };
276 function init () { 276 function init () {
277 function resize () { 277 function resize () {
278 /* Fix jumpy resizing: https://stackoverflow.com/a/18262927/1484919 */
279 var scrollTop = window.pageYOffset ||
280 (document.documentElement || document.body.parentNode || document.body).scrollTop;
281
278 description.style.height = 'auto'; 282 description.style.height = 'auto';
279 description.style.height = description.scrollHeight+10+'px'; 283 description.style.height = description.scrollHeight+10+'px';
284
285 window.scrollTo(0, scrollTop);
280 } 286 }
281 /* 0-timeout to get the already changed text */ 287 /* 0-timeout to get the already changed text */
282 function delayedResize () { 288 function delayedResize () {
@@ -401,14 +407,14 @@ window.onload = function () {
401 407
402 var message = 'Are you sure you want to delete '+ links.length +' links?\n'; 408 var message = 'Are you sure you want to delete '+ links.length +' links?\n';
403 message += 'This action is IRREVERSIBLE!\n\nTitles:\n'; 409 message += 'This action is IRREVERSIBLE!\n\nTitles:\n';
404 var ids = ''; 410 var ids = [];
405 links.forEach(function(item) { 411 links.forEach(function(item) {
406 message += ' - '+ item['title'] +'\n'; 412 message += ' - '+ item['title'] +'\n';
407 ids += item['id'] +'+'; 413 ids.push(item['id']);
408 }); 414 });
409 415
410 if (window.confirm(message)) { 416 if (window.confirm(message)) {
411 window.location = '?delete_link&lf_linkdate='+ ids +'&token='+ token.value; 417 window.location = '?delete_link&lf_linkdate='+ ids.join('+') +'&token='+ token.value;
412 } 418 }
413 }); 419 });
414 } 420 }
@@ -607,10 +613,11 @@ function htmlEntities(str)
607function activateFirefoxSocial(node) { 613function activateFirefoxSocial(node) {
608 var loc = location.href; 614 var loc = location.href;
609 var baseURL = loc.substring(0, loc.lastIndexOf("/") + 1); 615 var baseURL = loc.substring(0, loc.lastIndexOf("/") + 1);
616 var title = document.title;
610 617
611 // Keeping the data separated (ie. not in the DOM) so that it's maintainable and diffable. 618 // Keeping the data separated (ie. not in the DOM) so that it's maintainable and diffable.
612 var data = { 619 var data = {
613 name: "{$shaarlititle}", 620 name: title,
614 description: "The personal, minimalist, super-fast, database free, bookmarking service by the Shaarli community.", 621 description: "The personal, minimalist, super-fast, database free, bookmarking service by the Shaarli community.",
615 author: "Shaarli", 622 author: "Shaarli",
616 version: "1.0.0", 623 version: "1.0.0",