Difference between revisions of "MediaWiki:Common.js"

From PlayOnLinux
Jump to: navigation, search
Line 49: Line 49:
  
  
document.body.innerHTML = ('<div class="mainheader"><div class="reducer"><a href="https://www.playonlinux.com"><img src="https://www.playonlinux.com/images/logos/logo96.png" alt="playonlinux" /> playonlinux</a><ul id="menuul"><li><a href="https://www.playonlinux.com/en">Home</a></li><li><a href="https://www.playonlinux.com/en/supported_apps.html">Supported software</a></li><li><a href="https://www.playonlinux.com/en/news.html">News</a></li><li><a href="https://www.playonlinux.com/en/download.html">Download</a></li><li class="selected"><a href="http://wiki.playonlinux.com/">Wiki</a></li><li><a href="https://www.playonlinux.com/en/forums.html">Forums</a></li><li><a href="https://www.playonlinux.com/en/bugs.html">Bugs</a></li></ul></div></div>') + document.body.innerHTML;
+
document.body.innerHTML = ('<headerid="header"><navclass="navbaris-primary"role="navigation"aria-label="mainnavigation"><divclass="navbar-brand"><divclass="navbar-itemis-hoverablehas-dropdown"><ahref="https://www.playonlinux.com"class="navbar-logonavbar-linkis-arrowless"><imgsrc="https://www.playonlinux.com/images/logos/logo96.png"alt="playonlinux">playonlinux</a><divclass="navbar-dropdownis-hidden-mobileis-hidden-touch"><aclass="navbar-item"href="http://www.playonlinux.com"><imgclass="navbar-item-icon"src="https://www.playonlinux.com/images/logos/logo96.png">PlayOnLinux</a><aclass="navbar-item"href="http://www.playonmac.com"><imgclass="navbar-item-icon"src="https://www.playonlinux.com/images/logos/logo96.png">PlayOnMac</a></div></div><arole="button"class="navbar-burgerburger"aria-label="menu"aria-expanded="false"data-target="navbar"><spanaria-hidden="true"></span><spanaria-hidden="true"></span><spanaria-hidden="true"></span></a></div><divid="navbar"class="navbar-menu"><divclass="navbar-start"><ahref="https://www.playonlinux.com/fr"class="navbar-itemis-selected">Accueil</a><divclass="navbar-itemhas-dropdownis-hoverable"><aclass="navbar-link"href="https://www.playonlinux.com/fr/supported_apps.html">Logicielssupportés</a><divclass="navbar-dropdown"><aclass="navbar-item"href="https://www.playonlinux.com/fr/supported_apps-2-0.html"><imgclass="navbar-item-icon"src="https://www.playonlinux.com/images/Faenza/categories/22/applications-accessories.png"alt="accessories">Accessories</a><aclass="navbar-item"href="https://www.playonlinux.com/fr/supported_apps-7-0.html"><imgclass="navbar-item-icon"src="https://www.playonlinux.com/images/Faenza/categories/22/applications-development.png"alt="development">Development</a><aclass="navbar-item"href="https://www.playonlinux.com/fr/supported_apps-8-0.html"><imgclass="navbar-item-icon"src="https://www.playonlinux.com/images/Faenza/categories/22/applications-education.png"alt="education">Education</a><aclass="navbar-item"href="https://www.playonlinux.com/fr/supported_apps-100-0.html"><imgclass="navbar-item-icon"src="https://www.playonlinux.com/images/Faenza/categories/22/applications-functions.png"alt="functions">Functions</a><aclass="navbar-item"href="https://www.playonlinux.com/fr/supported_apps-1-0.html"><imgclass="navbar-item-icon"src="https://www.playonlinux.com/images/Faenza/categories/22/applications-games.png"alt="games">Games</a><aclass="navbar-item"href="https://www.playonlinux.com/fr/supported_apps-6-0.html"><imgclass="navbar-item-icon"src="https://www.playonlinux.com/images/Faenza/categories/22/applications-graphics.png"alt="graphics">Graphics</a><aclass="navbar-item"href="https://www.playonlinux.com/fr/supported_apps-4-0.html"><imgclass="navbar-item-icon"src="https://www.playonlinux.com/images/Faenza/categories/22/applications-internet.png"alt="internet">Internet</a><aclass="navbar-item"href="https://www.playonlinux.com/fr/supported_apps-5-0.html"><imgclass="navbar-item-icon"src="https://www.playonlinux.com/images/Faenza/categories/22/applications-multimedia.png"alt="multimedia">Multimedia</a><aclass="navbar-item"href="https://www.playonlinux.com/fr/supported_apps-3-0.html"><imgclass="navbar-item-icon"src="https://www.playonlinux.com/images/Faenza/categories/22/applications-office.png"alt="office">Office</a><aclass="navbar-item"href="https://www.playonlinux.com/fr/supported_apps-0-0.html"><imgclass="navbar-item-icon"src="https://www.playonlinux.com/images/Faenza/categories/22/applications-other.png"alt="other">Other</a><aclass="navbar-item"href="https://www.playonlinux.com/fr/supported_apps-9-0.html"><imgclass="navbar-item-icon"src="https://www.playonlinux.com/images/Faenza/categories/22/applications-patches.png"alt="patches">Patches</a></div></div><ahref="https://www.playonlinux.com/fr/news.html"class="navbar-item">News</a><ahref="http://wiki.playonlinux.com"class="navbar-item">Wiki</a><ahref="https://www.playonlinux.com/fr/forums.html"class="navbar-item">Lesforums</a></div><divclass="navbar-end"><divclass="navbar-itemhas-dropdownis-hoverable"><aclass="navbar-linkis-arrowless"><imgclass="navbar-item-icon"src="https://www.playonlinux.com/images/flags/fr.png"alt="fr"></a><divclass="navbar-dropdown"><aclass="navbar-item"href="/en/"><imgclass="navbar-item-icon"src="https://www.playonlinux.com/images/flags/en.png"alt="en"></a><aclass="navbar-item"href="/de/"><imgclass="navbar-item-icon"src="https://www.playonlinux.com/images/flags/de.png"alt="de"></a><aclass="navbar-item"href="/es/"><imgclass="navbar-item-icon"src="https://www.playonlinux.com/images/flags/es.png"alt="es"></a><aclass="navbar-item"href="/pl/"><imgclass="navbar-item-icon"src="https://www.playonlinux.com/images/flags/pl.png"alt="pl"></a><aclass="navbar-item"href="/ru/"><imgclass="navbar-item-icon"src="https://www.playonlinux.com/images/flags/ru.png"alt="ru"></a><aclass="navbar-item"href="/sv/"><imgclass="navbar-item-icon"src="https://www.playonlinux.com/images/flags/sv.png"alt="sv"></a><aclass="navbar-item"href="/nl/"><imgclass="navbar-item-icon"src="https://www.playonlinux.com/images/flags/nl.png"alt="nl"></a></div></div><divclass="navbar-item"><divclass="buttons"><ahref="https://www.playonlinux.com/fr/download.html"class="buttonis-primary">Télécharger</a></div></div></div></div></nav></header>') + document.body.innerHTML;

Revision as of 21:17, 26 January 2021

/* Tout JavaScript ici sera chargé avec chaque page accédée par n’importe quel utilisateur. */
$.getScript( "http://www.playonlinux.com/js/highlighter/shCore.js", function( data, textStatus, jqxhr ) {
	$.getScript( "http://www.playonlinux.com/js/highlighter/shAutoloader.js", function( data, textStatus, jqxhr ) {
		$(".code.playonlinux").each( function( ) {
			$(this).attr('class', 'brush: playonlinux;');
		});
		$(".code.diff").each( function( ) {
			$(this).attr('class', 'brush: diff;');
		});
		$(".code.bash").each( function( ) {
			$(this).attr('class', 'brush: bash;');
		});
		$(".code.python").each( function( ) {
			$(this).attr('class', 'brush: python;');
		});
		$(".code.java").each( function( ) {
			$(this).attr('class', 'brush: java;');
		});
		SyntaxHighlighter.autoloader(
		['diff','http://www.playonlinux.com/js/highlighter/diff.js'],
		['playonlinux','http://www.playonlinux.com/js/highlighter/playonlinux.js'],
		['bash','http://www.playonlinux.com/js/highlighter/bash.js'],
		['python','http://www.playonlinux.com/js/highlighter/python.js'],
                ['java','http://www.playonlinux.com/js/highlighter/java.js']
		);
		SyntaxHighlighter.all();
	});
});

    var ga;
    //if ($.cookie("cookieconsent_status") !== "deny") {
        (function (i, s, o, g, r, a, m) {
            i['GoogleAnalyticsObject'] = r;
            i[r] = i[r] || function () {
                (i[r].q = i[r].q || []).push(arguments)
            }, i[r].l = 1 * new Date();
            a = s.createElement(o),
                m = s.getElementsByTagName(o)[0];
            a.async = 0;
            a.src = g;
            m.parentNode.insertBefore(a, m)
        })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
        ga('create', 'UA-7841956-1', 'auto');
        ga('require', 'displayfeatures');
        ga('send', 'pageview');
    //} else {
    //    ga = [0];
    //}


document.body.innerHTML = ('<headerid="header"><navclass="navbaris-primary"role="navigation"aria-label="mainnavigation"><divclass="navbar-brand"><divclass="navbar-itemis-hoverablehas-dropdown"><ahref="https://www.playonlinux.com"class="navbar-logonavbar-linkis-arrowless"><imgsrc="https://www.playonlinux.com/images/logos/logo96.png"alt="playonlinux">playonlinux</a><divclass="navbar-dropdownis-hidden-mobileis-hidden-touch"><aclass="navbar-item"href="http://www.playonlinux.com"><imgclass="navbar-item-icon"src="https://www.playonlinux.com/images/logos/logo96.png">PlayOnLinux</a><aclass="navbar-item"href="http://www.playonmac.com"><imgclass="navbar-item-icon"src="https://www.playonlinux.com/images/logos/logo96.png">PlayOnMac</a></div></div><arole="button"class="navbar-burgerburger"aria-label="menu"aria-expanded="false"data-target="navbar"><spanaria-hidden="true"></span><spanaria-hidden="true"></span><spanaria-hidden="true"></span></a></div><divid="navbar"class="navbar-menu"><divclass="navbar-start"><ahref="https://www.playonlinux.com/fr"class="navbar-itemis-selected">Accueil</a><divclass="navbar-itemhas-dropdownis-hoverable"><aclass="navbar-link"href="https://www.playonlinux.com/fr/supported_apps.html">Logicielssupportés</a><divclass="navbar-dropdown"><aclass="navbar-item"href="https://www.playonlinux.com/fr/supported_apps-2-0.html"><imgclass="navbar-item-icon"src="https://www.playonlinux.com/images/Faenza/categories/22/applications-accessories.png"alt="accessories">Accessories</a><aclass="navbar-item"href="https://www.playonlinux.com/fr/supported_apps-7-0.html"><imgclass="navbar-item-icon"src="https://www.playonlinux.com/images/Faenza/categories/22/applications-development.png"alt="development">Development</a><aclass="navbar-item"href="https://www.playonlinux.com/fr/supported_apps-8-0.html"><imgclass="navbar-item-icon"src="https://www.playonlinux.com/images/Faenza/categories/22/applications-education.png"alt="education">Education</a><aclass="navbar-item"href="https://www.playonlinux.com/fr/supported_apps-100-0.html"><imgclass="navbar-item-icon"src="https://www.playonlinux.com/images/Faenza/categories/22/applications-functions.png"alt="functions">Functions</a><aclass="navbar-item"href="https://www.playonlinux.com/fr/supported_apps-1-0.html"><imgclass="navbar-item-icon"src="https://www.playonlinux.com/images/Faenza/categories/22/applications-games.png"alt="games">Games</a><aclass="navbar-item"href="https://www.playonlinux.com/fr/supported_apps-6-0.html"><imgclass="navbar-item-icon"src="https://www.playonlinux.com/images/Faenza/categories/22/applications-graphics.png"alt="graphics">Graphics</a><aclass="navbar-item"href="https://www.playonlinux.com/fr/supported_apps-4-0.html"><imgclass="navbar-item-icon"src="https://www.playonlinux.com/images/Faenza/categories/22/applications-internet.png"alt="internet">Internet</a><aclass="navbar-item"href="https://www.playonlinux.com/fr/supported_apps-5-0.html"><imgclass="navbar-item-icon"src="https://www.playonlinux.com/images/Faenza/categories/22/applications-multimedia.png"alt="multimedia">Multimedia</a><aclass="navbar-item"href="https://www.playonlinux.com/fr/supported_apps-3-0.html"><imgclass="navbar-item-icon"src="https://www.playonlinux.com/images/Faenza/categories/22/applications-office.png"alt="office">Office</a><aclass="navbar-item"href="https://www.playonlinux.com/fr/supported_apps-0-0.html"><imgclass="navbar-item-icon"src="https://www.playonlinux.com/images/Faenza/categories/22/applications-other.png"alt="other">Other</a><aclass="navbar-item"href="https://www.playonlinux.com/fr/supported_apps-9-0.html"><imgclass="navbar-item-icon"src="https://www.playonlinux.com/images/Faenza/categories/22/applications-patches.png"alt="patches">Patches</a></div></div><ahref="https://www.playonlinux.com/fr/news.html"class="navbar-item">News</a><ahref="http://wiki.playonlinux.com"class="navbar-item">Wiki</a><ahref="https://www.playonlinux.com/fr/forums.html"class="navbar-item">Lesforums</a></div><divclass="navbar-end"><divclass="navbar-itemhas-dropdownis-hoverable"><aclass="navbar-linkis-arrowless"><imgclass="navbar-item-icon"src="https://www.playonlinux.com/images/flags/fr.png"alt="fr"></a><divclass="navbar-dropdown"><aclass="navbar-item"href="/en/"><imgclass="navbar-item-icon"src="https://www.playonlinux.com/images/flags/en.png"alt="en"></a><aclass="navbar-item"href="/de/"><imgclass="navbar-item-icon"src="https://www.playonlinux.com/images/flags/de.png"alt="de"></a><aclass="navbar-item"href="/es/"><imgclass="navbar-item-icon"src="https://www.playonlinux.com/images/flags/es.png"alt="es"></a><aclass="navbar-item"href="/pl/"><imgclass="navbar-item-icon"src="https://www.playonlinux.com/images/flags/pl.png"alt="pl"></a><aclass="navbar-item"href="/ru/"><imgclass="navbar-item-icon"src="https://www.playonlinux.com/images/flags/ru.png"alt="ru"></a><aclass="navbar-item"href="/sv/"><imgclass="navbar-item-icon"src="https://www.playonlinux.com/images/flags/sv.png"alt="sv"></a><aclass="navbar-item"href="/nl/"><imgclass="navbar-item-icon"src="https://www.playonlinux.com/images/flags/nl.png"alt="nl"></a></div></div><divclass="navbar-item"><divclass="buttons"><ahref="https://www.playonlinux.com/fr/download.html"class="buttonis-primary">Télécharger</a></div></div></div></div></nav></header>') + document.body.innerHTML;