add adblock detection in admin panel, because of blocked config pages in case of activated adblocker
This commit is contained in:
parent
dae9810ec8
commit
61b1cd95d1
Binary file not shown.
@ -29,4 +29,19 @@ class d3_cfg_googleanalytics extends d3_cfg_mod_
|
||||
$this->addTplParam('sMainClass', 'd3_cfg_googleanalytics_main');
|
||||
return parent::render();
|
||||
}
|
||||
|
||||
public function getAdditionalHeadContent()
|
||||
{
|
||||
$oViewConf = oxRegistry::getConfig()->getActiveView()->getViewConfig();
|
||||
$sScriptUrl = $oViewConf->getModuleUrl('d3_googleanalytics', 'out/src/d3_googleanalytics_test.js');
|
||||
|
||||
return parent::getAdditionalHeadContent().'
|
||||
<script src="'.$sScriptUrl.'"></script>
|
||||
<script type="text/javascript">
|
||||
if(null === document.getElementById("SePiRENuJOBWx")){
|
||||
alert("'.oxRegistry::getLang()->translateString('D3_GOOGLEANALYTICS_ADBLOCKER', null, true).'");
|
||||
}
|
||||
</script>
|
||||
';
|
||||
}
|
||||
}
|
||||
|
9
copy_this/modules/d3/d3_googleanalytics/out/src/d3_googleanalytics_test.js
vendored
Normal file
9
copy_this/modules/d3/d3_googleanalytics/out/src/d3_googleanalytics_test.js
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
if (null === document.body) {
|
||||
// add body tag, if it's missing because framesets
|
||||
var b=document.createElement('body');
|
||||
document.getElementsByTagName('html')[0].appendChild(b);
|
||||
}
|
||||
var e=document.createElement('div');
|
||||
e.id='SePiRENuJOBWx';
|
||||
e.style.display='none';
|
||||
document.body.appendChild(e);
|
@ -408,6 +408,9 @@ $aLang = array(
|
||||
'Sie in der <a href="https://www.google.de/search?q=Analytics+_opt+out+script" target="gahelp">Google-Suche'.
|
||||
'</a>.</p>',
|
||||
|
||||
'D3_GOOGLEANALYTICS_ADBLOCKER' => 'AdBlocker entdeckt - Bitte deaktivieren Sie diesen für diese Seite, da sonst '.
|
||||
'Teile des Admin-Bereichs nicht richtig geladen werden können.',
|
||||
|
||||
// Erweiterung des Links in der Fussnote "Hilfe Starten"
|
||||
'D3_GOOGLEANALYTICS_HELPLINK' => 'Fragen-zu-speziellen-Modulen/Google-Analytics/',
|
||||
);
|
||||
|
@ -408,6 +408,9 @@ $aLang = array(
|
||||
'Sie in der <a href="https://www.google.de/search?q=Analytics+_opt+out+script" target="gahelp">Google-Suche'.
|
||||
'</a>.</p>',
|
||||
|
||||
'D3_GOOGLEANALYTICS_ADBLOCKER' => 'AdBlocker detected - Please deactivate it for this page, because otherwise '.
|
||||
'parts of the admin area can not be loaded correctly.',
|
||||
|
||||
// Erweiterung des Links in der Fussnote "Hilfe Starten"
|
||||
'D3_GOOGLEANALYTICS_HELPLINK' => 'Fragen-zu-speziellen-Modulen/Google-Analytics/',
|
||||
);
|
||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user