From: ArthurHoaro Date: Sun, 11 Jun 2017 12:09:42 +0000 (+0200) Subject: Fix Firefox Social button in the default theme X-Git-Tag: v0.9.1~1^2~15^2 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;ds=sidebyside;h=8eb6bac137d31b36ff2da5970f1ac398cf574435;p=github%2Fshaarli%2FShaarli.git Fix Firefox Social button in the default theme is no longer required since the JS function is now in . Also, include the trailing slash in the post URL. Fixes #895 --- diff --git a/tpl/default/js/shaarli.js b/tpl/default/js/shaarli.js index b120c91e..4f49affa 100644 --- a/tpl/default/js/shaarli.js +++ b/tpl/default/js/shaarli.js @@ -606,7 +606,7 @@ function htmlEntities(str) function activateFirefoxSocial(node) { var loc = location.href; - var baseURL = loc.substring(0, loc.lastIndexOf("/")); + var baseURL = loc.substring(0, loc.lastIndexOf("/") + 1); // Keeping the data separated (ie. not in the DOM) so that it's maintainable and diffable. var data = { @@ -619,7 +619,7 @@ function activateFirefoxSocial(node) { icon32URL: baseURL + "/images/favicon.ico", icon64URL: baseURL + "/images/favicon.ico", - shareURL: baseURL + "{noparse}?post=%{url}&title=%{title}&description=%{text}&source=firefoxsocialapi{/noparse}", + shareURL: baseURL + "?post=%{url}&title=%{title}&description=%{text}&source=firefoxsocialapi", homepageURL: baseURL }; node.setAttribute("data-service", JSON.stringify(data));