aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2018-01-20 18:40:31 +0100
committerMarc Alexander <admin@m-a-styles.de>2018-01-20 18:40:31 +0100
commit227e7cadbad7c4d15695cae7b0054dc53b4dd4e6 (patch)
treebd736db58685a3dba07de8c00e53c1104a2ca92d
parentadc75b700f0cf3d6d47689c00932fd1f41bc58e9 (diff)
parentce6adeea02067220720ac516fcbfb9510a5ef0ab (diff)
downloadforums-227e7cadbad7c4d15695cae7b0054dc53b4dd4e6.tar
forums-227e7cadbad7c4d15695cae7b0054dc53b4dd4e6.tar.gz
forums-227e7cadbad7c4d15695cae7b0054dc53b4dd4e6.tar.bz2
forums-227e7cadbad7c4d15695cae7b0054dc53b4dd4e6.tar.xz
forums-227e7cadbad7c4d15695cae7b0054dc53b4dd4e6.zip
Merge pull request #5096 from kasimi/ticket/15523
[ticket/15523] Fix AdBlocker causing JS error when using CookieConsent
-rw-r--r--phpBB/styles/prosilver/template/overall_footer.html35
1 files changed, 19 insertions, 16 deletions
diff --git a/phpBB/styles/prosilver/template/overall_footer.html b/phpBB/styles/prosilver/template/overall_footer.html
index 97a21f9a6e..b01b0bb213 100644
--- a/phpBB/styles/prosilver/template/overall_footer.html
+++ b/phpBB/styles/prosilver/template/overall_footer.html
@@ -62,24 +62,27 @@
<!-- IF S_COOKIE_NOTICE -->
<script src="{T_ASSETS_PATH}/cookieconsent/cookieconsent.min.js?assets_version={T_ASSETS_VERSION}"></script>
<script>
- window.addEventListener("load", function(){
- window.cookieconsent.initialise({
- "palette": {
- "popup": {
- "background": "#0F538A"
+ if (typeof window.cookieconsent === "object") {
+ window.addEventListener("load", function(){
+ window.cookieconsent.initialise({
+ "palette": {
+ "popup": {
+ "background": "#0F538A"
+ },
+ "button": {
+ "background": "#E5E5E5"
+ }
},
- "button": {
- "background": "#E5E5E5"
+ "theme": "classic",
+ "content": {
+ "message": "{LA_COOKIE_CONSENT_MSG}",
+ "dismiss": "{LA_COOKIE_CONSENT_OK}",
+ "link": "{LA_COOKIE_CONSENT_INFO}",
+ "href": "{LA_COOKIE_CONSENT_HREF}"
}
- },
- "theme": "classic",
- "content": {
- "message": "{LA_COOKIE_CONSENT_MSG}",
- "dismiss": "{LA_COOKIE_CONSENT_OK}",
- "link": "{LA_COOKIE_CONSENT_INFO}",
- "href": "{LA_COOKIE_CONSENT_HREF}"
- }
- })});
+ });
+ });
+ }
</script>
<!-- ENDIF -->