summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorseanfuller2016-08-16 18:23:19 -0700
committermicropat2016-08-16 18:23:19 -0700
commitd9a11343615e12f60f037eb1089d713a5c14d478 (patch)
tree69629b6fd84e11db51ca3c5bca37313adf64679f
parent45d0615735c63d9b2bdb98fe791a735cb2f867f5 (diff)
Issue #2785151 by seanbfuller: SSL check for javascript referencing sometimes failing7.x-4.13
-rw-r--r--addtoany.module4
1 files changed, 1 insertions, 3 deletions
diff --git a/addtoany.module b/addtoany.module
index b045d78..77fdcbc 100644
--- a/addtoany.module
+++ b/addtoany.module
@@ -155,8 +155,6 @@ function addtoany_page_alter(&$page) {
if ( ! $_addtoany_init)
return;
- $script_url = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https://static.addtoany.com/menu/page.js' : 'http://static.addtoany.com/menu/page.js';
-
$javascript_header = "window.a2a_config=window.a2a_config||{};"
. "window.da2a={done:false,"
. "html_done:false,"
@@ -165,7 +163,7 @@ function addtoany_page_alter(&$page) {
. "var a=document.createElement('script'),"
. "s=document.getElementsByTagName('script')[0];"
. "a.type='text/javascript';a.async=true;"
- . "a.src='" . $script_url . "';"
+ . "a.src='https://static.addtoany.com/menu/page.js';"
. "s.parentNode.insertBefore(a,s);"
. "da2a.script_load=function(){};"
. "},"