MediaWiki:Common.js

Aus Kurhaus Schärding
Wechseln zu: Navigation, Suche
<script src="//www.googletagmanager.com/gtag/js?id=UA-40691372-1"></script> 
<script>

  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());
  gtag('config', 'UA-40691372-1');

</script>

<link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.1.0/cookieconsent.min.css" />

<script src="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.1.0/cookieconsent.min.js"></script> <script> window.addEventListener("load", function(){ window.cookieconsent.initialise({

  "palette": {
    "popup": {
      "background": "#efefef",
      "text": "#404040"
    },
    "button": {
      "background": "#8ec760",
      "text": "#ffffff"
    }
  },
  "position": "bottom-left",
  "content": {
    "message": "Diese Website nutzt Cookies, um Ihnen bestmögliche Funktionalität bieten zu können.",
    "dismiss": "Verstanden",
    "link": "Datenschutz",
    "href": "[https://wiki.kurhaus-schaerding.at/wiki/Kurhaus_Schärding:Datenschutz https://wiki.kurhaus-schaerding.at/wiki/Kurhaus_Sch%C3%A4rding:Datenschutz]"
  }

})}); </script>

function ModifySidebar( action, section, name, link ) { try { switch ( section ) { case 'languages': var target = 'p-lang'; break; case 'toolbox': var target = 'p-tb'; break; case 'navigation': var target = 'p-navigation'; break; default: var target = 'p-' + section; break; }

if ( action == 'add' ) { var node = document.getElementById( target ) .getElementsByTagName( 'div' )[0] .getElementsByTagName( 'ul' )[0];

var aNode = document.createElement( 'a' ); var liNode = document.createElement( 'li' );

aNode.appendChild( document.createTextNode( name ) ); aNode.setAttribute( 'href', link ); liNode.appendChild( aNode ); liNode.className = 'plainlinks'; node.appendChild( liNode ); }

if ( action == 'remove' ) { var list = document.getElementById( target ) .getElementsByTagName( 'div' )[0] .getElementsByTagName( 'ul' )[0];

var listelements = list.getElementsByTagName( 'li' );

for ( var i = 0; i < listelements.length; i++ ) { if ( listelements[i].getElementsByTagName( 'a' )[0].innerHTML == name || listelements[i].getElementsByTagName( 'a' )[0].href == link ) { list.removeChild( listelements[i] ); } } }

} catch( e ) { // let's just ignore what's happened return; } }

function CustomizeModificationsOfSidebar() { // adds [[Spezial:CategoryTree|Special:CategoryTree]] to toolbox ModifySidebar( 'add', 'toolbox', 'CategoryTree', '[http://p456196.mittwaldserver.info/wiki/Special:CategoryTree' http://p456196.mittwaldserver.info/wiki/Special:CategoryTree'] ); // removes [[Spezial:Hochladen|Special:Upload]] from toolbox ModifySidebar( 'remove', 'toolbox', 'Upload file', '[http://p456196.mittwaldserver.info/wiki/Special:Upload' http://p456196.mittwaldserver.info/wiki/Special:Upload'] ); }

jQuery( CustomizeModificationsOfSidebar );