Explorar o código

Making sharethis ssl compatible

Amauri CHAMPEAUX %!s(int64=10) %!d(string=hai) anos
pai
achega
c00916e62e
Modificáronse 1 ficheiros con 3 adicións e 2 borrados
  1. 3 2
      tarteaucitron.services.js

+ 3 - 2
tarteaucitron.services.js

@@ -29,8 +29,9 @@ tarteaucitron.services.sharethis = {
         if (tarteaucitron.user.sharethisPublisher === undefined) {
             return;
         }
-        var switchTo5x = true;
-        tarteaucitron.addScript('http://w.sharethis.com/button/buttons.js', '', function () {
+        var switchTo5x = true,
+            uri = ('https:' === document.location.protocol ? 'https://ws' : 'http://w') + '.sharethis.com/button/buttons.js';
+        tarteaucitron.addScript(uri, '', function () {
             stLight.options({publisher: tarteaucitron.user.sharethisPublisher, doNotHash: false, doNotCopy: false, hashAddressBar: false});
         });
     }