Problem trying to include "" sharing buttons

(Wassame) #1

Hello everyone, I am trying to place the script in my discourse:

<script>document.write('<script src="//' + encodeURIComponent(document.location.href) + '"></scr' + 'ipt>');</script>

Original website:

I tried placing the code in the head, body and header and it works but once I enable the template, I cannot edit the code or css at all (like there is no textarea to write in), the solution is to disable the template first and then edit the code, but why does it break the code or something?

(Jens Maier) #2

Hm, I tried testing this, but refuses HTTPS connections. :no_mouth:

Anyways, for future reference, if you have problems with a customization, open in an empty browser tab. It’ll load the default admin interface without any customizations.

(Wassame) #3

Im not running the forum on HTTPS

(Jens Maier) #4

I figured. But it means that I can’t test the script because my forum does enforce HTTPS – as just about any website should, nowadays. :wink:

(Kane York) #5

Protocol-relative URLs are now an antipattern - use absolute https:// if the target site supports HTTPS.

(Jens Maier) #6

Yeah well, that’s the problem. They advertise their service with a JS-snippet with a protocol-relative URL, yet the webserver doesn’t even listen on port 443… :grin: