|
|
| (25 dazwischenliegende Versionen von 3 Benutzern werden nicht angezeigt) |
| Zeile 1: |
Zeile 1: |
| /* Jedes JavaScript hier wird für alle Benutzer für jede Seite geladen. */ | | /* Statcounter code for SkipperGuide.de |
| | http://www.skipperguide.de/wiki/Hauptseite on Media Wiki */ |
| | var sc_project=3309919; |
| | var sc_invisible=1; |
| | var sc_security="a2895d4f"; |
| | var script = document.createElement('script'); |
| | script.src = "https://secure.statcounter.com/counter/counter.js"; |
| | document.body.appendChild(script); |
| | /* End of Statcounter Code */ |
|
| |
|
| // ============================================================
| | /* GA4 */ |
| // BEGIN import Onlyifediting-functions
| | (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': |
| // SEE ALSO [[MediaWiki:Onlyifediting.js]]
| | new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], |
|
| | j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= |
| if (document.URL.indexOf("action=edit") > 0 || document.URL.indexOf("action=submit") > 0) {
| | 'https://www.googletagmanager.com/gtag/js?id='+i+dl;f.parentNode.insertBefore(j,f); |
| document.write('<script type="text/javascript" src="/wiki/index.php?title=MediaWiki:Onlyifediting.js&action=raw&ctype=text/javascript&dontcountme=s"></script>');
| | })(window,document,'script','dataLayer','G-398408700'); |
| }
| |
|
| |
| // END import Onlyifediting-functions
| |
| // ============================================================
| |
|
| |
|
| // ============================================================
| | window.dataLayer = window.dataLayer || []; |
| // BEGIN Dynamic Navigation Bars
| | function gtag(){dataLayer.push(arguments);} |
| // NEEDS Enable multiple onload functions
| | gtag('js', new Date()); |
| | gtag('config', 'G-398408700'); |
|
| |
|
| // set up the words in your language
| | /* adsense */ |
| var NavigationBarHide = 'Einklappen';
| | mw.loader.load( '//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js' ); |
| var NavigationBarShow = 'Ausklappen';
| | $( document ).ready( function() { |
| | var adsenseCode = '<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-9316016680305616" crossorigin="anonymous"></script>'; |
| | $( 'body' ).append( adsenseCode ); |
| | } ); |
|
| |
|
| // set up max count of Navigation Bars on page,
| | /* cookies */ |
| // if there are more, all will be hidden
| | $( document ).ready( function() { |
| // NavigationBarShowDefault = 0; // all bars will be hidden
| | var script = document.createElement('script'); |
| // NavigationBarShowDefault = 1; // on pages with more than 1 bar all bars will be hidden
| | script.id = 'usercentrics-cmp'; |
| NavigationBarShowDefault = 3;
| | script.async = true; |
| if (typeof NavigationBarShowDefault == 'undefined' ) {
| | script.setAttribute('data-eu-mode', 'true'); |
| var NavigationBarShowDefault = 1;
| | script.setAttribute('data-settings-id', 'ErlSniwNaQGLDr'); |
| }
| | script.src = 'https://app.eu.usercentrics.eu/browser-ui/latest/loader.js'; |
| | document.body.appendChild(script); |
| | }); |
|
| |
|
| // shows and hides content and picture (if available) of navigation bars
| | $( document ).ready( function() { |
| // Parameters:
| | var script = document.createElement('script'); |
| // indexNavigationBar: the index of navigation bar to be toggled
| | script.type = 'application/javascript'; |
| function toggleNavigationBar(indexNavigationBar)
| | script.src = 'https://sdp.eu.usercentrics.eu/latest/uc-block.bundle.js'; |
| {
| | document.body.appendChild(script); |
| var NavToggle = document.getElementById("NavToggle" + indexNavigationBar);
| | }); |
| var NavFrame = document.getElementById("NavFrame" + indexNavigationBar);
| |
| | |
| if (!NavFrame || !NavToggle) {
| |
| return false;
| |
| }
| |
| | |
| // if shown now
| |
| if (NavToggle.firstChild.data == NavigationBarHide) {
| |
| for (
| |
| var NavChild = NavFrame.firstChild;
| |
| NavChild != null;
| |
| NavChild = NavChild.nextSibling
| |
| ) {
| |
| if (NavChild.className == 'NavPic') {
| |
| NavChild.style.display = 'none';
| |
| }
| |
| if (NavChild.className == 'NavContent') {
| |
| NavChild.style.display = 'none';
| |
| }
| |
| if (NavChild.className == 'NavToggle') {
| |
| NavChild.firstChild.data = NavigationBarShow;
| |
| }
| |
| }
| |
| | |
| // if hidden now
| |
| } else if (NavToggle.firstChild.data == NavigationBarShow) {
| |
| for (
| |
| var NavChild = NavFrame.firstChild;
| |
| NavChild != null;
| |
| NavChild = NavChild.nextSibling
| |
| ) {
| |
| if (NavChild.className == 'NavPic') {
| |
| NavChild.style.display = 'block';
| |
| }
| |
| if (NavChild.className == 'NavContent') {
| |
| NavChild.style.display = 'block';
| |
| }
| |
| if (NavChild.className == 'NavToggle') {
| |
| NavChild.firstChild.data = NavigationBarHide;
| |
| }
| |
| }
| |
| }
| |
| }
| |
| | |
| // adds show/hide-button to navigation bars
| |
| function createNavigationBarToggleButton()
| |
| {
| |
| var indexNavigationBar = 0;
| |
| // iterate over all < div >-elements
| |
| for(
| |
| var i=0;
| |
| NavFrame = document.getElementsByTagName("div")[i];
| |
| i++
| |
| ) {
| |
| // if found a navigation bar
| |
| if (NavFrame.className == "NavFrame") {
| |
| | |
| indexNavigationBar++;
| |
| var NavToggle = document.createElement("a");
| |
| NavToggle.className = 'NavToggle';
| |
| NavToggle.setAttribute('id', 'NavToggle' + indexNavigationBar);
| |
| NavToggle.setAttribute('href', 'javascript:toggleNavigationBar(' + indexNavigationBar + ');');
| |
| | |
| var NavToggleText = document.createTextNode(NavigationBarHide);
| |
| NavToggle.appendChild(NavToggleText);
| |
| | |
| // add NavToggle-Button as first div-element
| |
| // in < div class="NavFrame" >
| |
| NavFrame.insertBefore(
| |
| NavToggle,
| |
| NavFrame.firstChild
| |
| );
| |
| NavFrame.setAttribute('id', 'NavFrame' + indexNavigationBar);
| |
| }
| |
| }
| |
| // if more Navigation Bars found than Default: hide all
| |
| if (NavigationBarShowDefault < indexNavigationBar) {
| |
| for(
| |
| var i=1;
| |
| i<=indexNavigationBar;
| |
| i++
| |
| ) {
| |
| toggleNavigationBar(i);
| |
| }
| |
| }
| |
| | |
| }
| |
| | |
| aOnloadFunctions[aOnloadFunctions.length] = createNavigationBarToggleButton;
| |
| | |
| // END Dynamic Navigation Bars
| |
| // ============================================================
| |