MediaWiki:Common.js: Unterschied zwischen den Versionen

Aus Gronkh-Wiki
Wechseln zu: Navigation, Suche
(NivoSlider)
 
(Adblock detection)
Zeile 6: Zeile 6:
 
scriptEl.src = "/nivoslider/jquery.nivo.slider.pack.js";
 
scriptEl.src = "/nivoslider/jquery.nivo.slider.pack.js";
 
bodyEl.appendChild(scriptEl);
 
bodyEl.appendChild(scriptEl);
 +
 +
function blockAdblockUser() {
 +
    if ($('#ads').height() == 0) {
 +
        $('#ads').html("Bitte deaktiviere AdBlock.");
 +
    }
 +
}
 +
 +
$(document).ready(function(){
 +
    blockAdblockUser();
 +
});

Version vom 6. September 2013, 15:08 Uhr

/* Das folgende JavaScript wird für alle Benutzer geladen. */

var bodyEl = document.body;
var scriptEl = document.createElement('script');
scriptEl.type = 'text/javascript';
scriptEl.src = "/nivoslider/jquery.nivo.slider.pack.js";
bodyEl.appendChild(scriptEl);

function blockAdblockUser() {
    if ($('#ads').height() == 0) {
        $('#ads').html("Bitte deaktiviere AdBlock.");
    }
}

$(document).ready(function(){
    blockAdblockUser();
});