Difference between revisions of "MediaWiki:Common.js"

From PlayOnLinux
Jump to: navigation, search
Line 49: Line 49:
  
  
document.body.innerHTML = ('<header id="header"> <nav class="navbar is-primary" role="navigation" aria-label="main navigation"> <div class="navbar-brand"> <div class="navbar-item is-hoverable has-dropdown"> <a href="https://www.playonlinux.com" class="navbar-logo navbar-link is-arrowless"> <img src="https://www.playonlinux.com/images/logos/logo96.png" alt="playonlinux"> playonlinux </a> <div class="navbar-dropdown is-hidden-mobile is-hidden-touch"> <a class="navbar-item" href="http://www.playonlinux.com"><img class="navbar-item-icon" src="https://www.playonlinux.com/images/logos/logo96.png">PlayOnLinux</a> <a class="navbar-item" href="http://www.playonmac.com"><img class="navbar-item-icon" src="https://www.playonlinux.com/images/logos/logo96.png">PlayOnMac</a> </div> </div> <a role="button" class="navbar-burger burger" aria-label="menu" aria-expanded="false" data-target="navbar"> <span aria-hidden="true"></span> <span aria-hidden="true"></span> <span aria-hidden="true"></span> </a> </div> <div id="navbar" class="navbar-menu"> <div class="navbar-start"> <a href="https://www.playonlinux.com/fr" class="navbar-item is-selected"> Accueil </a> <div class="navbar-item has-dropdown is-hoverable "> <a class="navbar-link" href="https://www.playonlinux.com/fr/supported_apps.html"> Logiciels supportés </a> <div class="navbar-dropdown"> <a class="navbar-item" href="https://www.playonlinux.com/fr/supported_apps-2-0.html"> <img class="navbar-item-icon" src="https://www.playonlinux.com/images/Faenza/categories/22/applications-accessories.png" alt="accessories"> Accessories </a> <a class="navbar-item" href="https://www.playonlinux.com/fr/supported_apps-7-0.html"> <img class="navbar-item-icon" src="https://www.playonlinux.com/images/Faenza/categories/22/applications-development.png" alt="development"> Development </a> <a class="navbar-item" href="https://www.playonlinux.com/fr/supported_apps-8-0.html"> <img class="navbar-item-icon" src="https://www.playonlinux.com/images/Faenza/categories/22/applications-education.png" alt="education"> Education </a> <a class="navbar-item" href="https://www.playonlinux.com/fr/supported_apps-100-0.html"> <img class="navbar-item-icon" src="https://www.playonlinux.com/images/Faenza/categories/22/applications-functions.png" alt="functions"> Functions </a> <a class="navbar-item" href="https://www.playonlinux.com/fr/supported_apps-1-0.html"> <img class="navbar-item-icon" src="https://www.playonlinux.com/images/Faenza/categories/22/applications-games.png" alt="games"> Games </a> <a class="navbar-item" href="https://www.playonlinux.com/fr/supported_apps-6-0.html"> <img class="navbar-item-icon" src="https://www.playonlinux.com/images/Faenza/categories/22/applications-graphics.png" alt="graphics"> Graphics </a> <a class="navbar-item" href="https://www.playonlinux.com/fr/supported_apps-4-0.html"> <img class="navbar-item-icon" src="https://www.playonlinux.com/images/Faenza/categories/22/applications-internet.png" alt="internet"> Internet </a> <a class="navbar-item" href="https://www.playonlinux.com/fr/supported_apps-5-0.html"> <img class="navbar-item-icon" src="https://www.playonlinux.com/images/Faenza/categories/22/applications-multimedia.png" alt="multimedia"> Multimedia </a> <a class="navbar-item" href="https://www.playonlinux.com/fr/supported_apps-3-0.html"> <img class="navbar-item-icon" src="https://www.playonlinux.com/images/Faenza/categories/22/applications-office.png" alt="office"> Office </a> <a class="navbar-item" href="https://www.playonlinux.com/fr/supported_apps-0-0.html"> <img class="navbar-item-icon" src="https://www.playonlinux.com/images/Faenza/categories/22/applications-other.png" alt="other"> Other </a> <a class="navbar-item" href="https://www.playonlinux.com/fr/supported_apps-9-0.html"> <img class="navbar-item-icon" src="https://www.playonlinux.com/images/Faenza/categories/22/applications-patches.png" alt="patches"> Patches </a> </div> </div> <a href="https://www.playonlinux.com/fr/news.html" class="navbar-item "> News </a> <a href="http://wiki.playonlinux.com" class="navbar-item "> Wiki </a> <a href="https://www.playonlinux.com/fr/forums.html" class="navbar-item "> Les forums </a> </div> <div class="navbar-end"> <div class="navbar-item has-dropdown is-hoverable"> <a class="navbar-link is-arrowless"><img class="navbar-item-icon" src="https://www.playonlinux.com/images/flags/fr.png" alt="fr"></a> <div class="navbar-dropdown"> <a class="navbar-item" href="/en/"><img class="navbar-item-icon" src="https://www.playonlinux.com/images/flags/en.png" alt="en"> </a> <a class="navbar-item" href="/de/"><img class="navbar-item-icon" src="https://www.playonlinux.com/images/flags/de.png" alt="de"> </a> <a class="navbar-item" href="/es/"><img class="navbar-item-icon" src="https://www.playonlinux.com/images/flags/es.png" alt="es"> </a> <a class="navbar-item" href="/pl/"><img class="navbar-item-icon" src="https://www.playonlinux.com/images/flags/pl.png" alt="pl"> </a> <a class="navbar-item" href="/ru/"><img class="navbar-item-icon" src="https://www.playonlinux.com/images/flags/ru.png" alt="ru"> </a> <a class="navbar-item" href="/sv/"><img class="navbar-item-icon" src="https://www.playonlinux.com/images/flags/sv.png" alt="sv"> </a> <a class="navbar-item" href="/nl/"><img class="navbar-item-icon" src="https://www.playonlinux.com/images/flags/nl.png" alt="nl"> </a> </div> </div> <div class="navbar-item"> <div class="buttons"> <a href="https://www.playonlinux.com/fr/download.html" class="button is-primary "> Télécharger </a> </div> </div> </div> </div></nav></header>') + document.body.innerHTML;
+
document.body.innerHTML = ('<header id="header"> <nav class="navbar is-primary" role="navigation" aria-label="main navigation"> <div class="navbar-brand"> <div class="navbar-item is-hoverable has-dropdown"> <a href="https://www.playonlinux.com" class="navbar-logo navbar-link is-arrowless"> <img src="https://www.playonlinux.com/images/logos/logo96.png" alt="playonlinux"> playonlinux </a> <div class="navbar-dropdown is-hidden-mobile is-hidden-touch"> <a class="navbar-item" href="http://www.playonlinux.com"><img class="navbar-item-icon" src="https://www.playonlinux.com/images/logos/logo96.png">PlayOnLinux</a> <a class="navbar-item" href="http://www.playonmac.com"><img class="navbar-item-icon" src="https://www.playonlinux.com/images/logos/logo96.png">PlayOnMac</a> </div> </div> <a role="button" class="navbar-burger burger" aria-label="menu" aria-expanded="false" data-target="navbar"> <span aria-hidden="true"></span> <span aria-hidden="true"></span> <span aria-hidden="true"></span> </a> </div> <div id="navbar" class="navbar-menu"> <div class="navbar-start"> <a href="https://www.playonlinux.com/en" class="navbar-item is-selected"> Home </a> <div class="navbar-item has-dropdown is-hoverable "> <a class="navbar-link" href="https://www.playonlinux.com/en/supported_apps.html"> Supported software </a> <div class="navbar-dropdown"> <a class="navbar-item" href="https://www.playonlinux.com/en/supported_apps-2-0.html"> <img class="navbar-item-icon" src="https://www.playonlinux.com/images/Faenza/categories/22/applications-accessories.png" alt="accessories"> Accessories </a> <a class="navbar-item" href="https://www.playonlinux.com/en/supported_apps-7-0.html"> <img class="navbar-item-icon" src="https://www.playonlinux.com/images/Faenza/categories/22/applications-development.png" alt="development"> Development </a> <a class="navbar-item" href="https://www.playonlinux.com/en/supported_apps-8-0.html"> <img class="navbar-item-icon" src="https://www.playonlinux.com/images/Faenza/categories/22/applications-education.png" alt="education"> Education </a> <a class="navbar-item" href="https://www.playonlinux.com/en/supported_apps-100-0.html"> <img class="navbar-item-icon" src="https://www.playonlinux.com/images/Faenza/categories/22/applications-functions.png" alt="functions"> Functions </a> <a class="navbar-item" href="https://www.playonlinux.com/en/supported_apps-1-0.html"> <img class="navbar-item-icon" src="https://www.playonlinux.com/images/Faenza/categories/22/applications-games.png" alt="games"> Games </a> <a class="navbar-item" href="https://www.playonlinux.com/en/supported_apps-6-0.html"> <img class="navbar-item-icon" src="https://www.playonlinux.com/images/Faenza/categories/22/applications-graphics.png" alt="graphics"> Graphics </a> <a class="navbar-item" href="https://www.playonlinux.com/en/supported_apps-4-0.html"> <img class="navbar-item-icon" src="https://www.playonlinux.com/images/Faenza/categories/22/applications-internet.png" alt="internet"> Internet </a> <a class="navbar-item" href="https://www.playonlinux.com/en/supported_apps-5-0.html"> <img class="navbar-item-icon" src="https://www.playonlinux.com/images/Faenza/categories/22/applications-multimedia.png" alt="multimedia"> Multimedia </a> <a class="navbar-item" href="https://www.playonlinux.com/en/supported_apps-3-0.html"> <img class="navbar-item-icon" src="https://www.playonlinux.com/images/Faenza/categories/22/applications-office.png" alt="office"> Office </a> <a class="navbar-item" href="https://www.playonlinux.com/en/supported_apps-0-0.html"> <img class="navbar-item-icon" src="https://www.playonlinux.com/images/Faenza/categories/22/applications-other.png" alt="other"> Other </a> <a class="navbar-item" href="https://www.playonlinux.com/en/supported_apps-9-0.html"> <img class="navbar-item-icon" src="https://www.playonlinux.com/images/Faenza/categories/22/applications-patches.png" alt="patches"> Patches </a> </div> </div> <a href="https://www.playonlinux.com/en/news.html" class="navbar-item "> News </a> <a href="http://wiki.playonlinux.com" class="navbar-item "> Wiki </a> <a href="https://www.playonlinux.com/en/forums.html" class="navbar-item "> Forums </a> </div> <div class="navbar-end"> <div class="navbar-item has-dropdown is-hoverable"> <a class="navbar-link is-arrowless"><img class="navbar-item-icon" src="https://www.playonlinux.com/images/flags/en.png" alt="en"></a> <div class="navbar-dropdown"> <a class="navbar-item" href="/fr/"><img class="navbar-item-icon" src="https://www.playonlinux.com/images/flags/fr.png" alt="fr"> </a> <a class="navbar-item" href="/de/"><img class="navbar-item-icon" src="https://www.playonlinux.com/images/flags/de.png" alt="de"> </a> <a class="navbar-item" href="/es/"><img class="navbar-item-icon" src="https://www.playonlinux.com/images/flags/es.png" alt="es"> </a> <a class="navbar-item" href="/pl/"><img class="navbar-item-icon" src="https://www.playonlinux.com/images/flags/pl.png" alt="pl"> </a> <a class="navbar-item" href="/ru/"><img class="navbar-item-icon" src="https://www.playonlinux.com/images/flags/ru.png" alt="ru"> </a> <a class="navbar-item" href="/sv/"><img class="navbar-item-icon" src="https://www.playonlinux.com/images/flags/sv.png" alt="sv"> </a> <a class="navbar-item" href="/nl/"><img class="navbar-item-icon" src="https://www.playonlinux.com/images/flags/nl.png" alt="nl"> </a> </div> </div> <div class="navbar-item"> <div class="buttons"> <a href="https://www.playonlinux.com/en/download.html" class="button is-primary "> Download </a> </div> </div> </div> </div></nav></header>') + document.body.innerHTML;

Revision as of 23:56, 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 = ('<header id="header"> <nav class="navbar is-primary" role="navigation" aria-label="main navigation"> <div class="navbar-brand"> <div class="navbar-item is-hoverable has-dropdown"> <a href="https://www.playonlinux.com" class="navbar-logo navbar-link is-arrowless"> <img src="https://www.playonlinux.com/images/logos/logo96.png" alt="playonlinux"> playonlinux </a> <div class="navbar-dropdown is-hidden-mobile is-hidden-touch"> <a class="navbar-item" href="http://www.playonlinux.com"><img class="navbar-item-icon" src="https://www.playonlinux.com/images/logos/logo96.png">PlayOnLinux</a> <a class="navbar-item" href="http://www.playonmac.com"><img class="navbar-item-icon" src="https://www.playonlinux.com/images/logos/logo96.png">PlayOnMac</a> </div> </div> <a role="button" class="navbar-burger burger" aria-label="menu" aria-expanded="false" data-target="navbar"> <span aria-hidden="true"></span> <span aria-hidden="true"></span> <span aria-hidden="true"></span> </a> </div> <div id="navbar" class="navbar-menu"> <div class="navbar-start"> <a href="https://www.playonlinux.com/en" class="navbar-item is-selected"> Home </a> <div class="navbar-item has-dropdown is-hoverable "> <a class="navbar-link" href="https://www.playonlinux.com/en/supported_apps.html"> Supported software </a> <div class="navbar-dropdown"> <a class="navbar-item" href="https://www.playonlinux.com/en/supported_apps-2-0.html"> <img class="navbar-item-icon" src="https://www.playonlinux.com/images/Faenza/categories/22/applications-accessories.png" alt="accessories"> Accessories </a> <a class="navbar-item" href="https://www.playonlinux.com/en/supported_apps-7-0.html"> <img class="navbar-item-icon" src="https://www.playonlinux.com/images/Faenza/categories/22/applications-development.png" alt="development"> Development </a> <a class="navbar-item" href="https://www.playonlinux.com/en/supported_apps-8-0.html"> <img class="navbar-item-icon" src="https://www.playonlinux.com/images/Faenza/categories/22/applications-education.png" alt="education"> Education </a> <a class="navbar-item" href="https://www.playonlinux.com/en/supported_apps-100-0.html"> <img class="navbar-item-icon" src="https://www.playonlinux.com/images/Faenza/categories/22/applications-functions.png" alt="functions"> Functions </a> <a class="navbar-item" href="https://www.playonlinux.com/en/supported_apps-1-0.html"> <img class="navbar-item-icon" src="https://www.playonlinux.com/images/Faenza/categories/22/applications-games.png" alt="games"> Games </a> <a class="navbar-item" href="https://www.playonlinux.com/en/supported_apps-6-0.html"> <img class="navbar-item-icon" src="https://www.playonlinux.com/images/Faenza/categories/22/applications-graphics.png" alt="graphics"> Graphics </a> <a class="navbar-item" href="https://www.playonlinux.com/en/supported_apps-4-0.html"> <img class="navbar-item-icon" src="https://www.playonlinux.com/images/Faenza/categories/22/applications-internet.png" alt="internet"> Internet </a> <a class="navbar-item" href="https://www.playonlinux.com/en/supported_apps-5-0.html"> <img class="navbar-item-icon" src="https://www.playonlinux.com/images/Faenza/categories/22/applications-multimedia.png" alt="multimedia"> Multimedia </a> <a class="navbar-item" href="https://www.playonlinux.com/en/supported_apps-3-0.html"> <img class="navbar-item-icon" src="https://www.playonlinux.com/images/Faenza/categories/22/applications-office.png" alt="office"> Office </a> <a class="navbar-item" href="https://www.playonlinux.com/en/supported_apps-0-0.html"> <img class="navbar-item-icon" src="https://www.playonlinux.com/images/Faenza/categories/22/applications-other.png" alt="other"> Other </a> <a class="navbar-item" href="https://www.playonlinux.com/en/supported_apps-9-0.html"> <img class="navbar-item-icon" src="https://www.playonlinux.com/images/Faenza/categories/22/applications-patches.png" alt="patches"> Patches </a> </div> </div> <a href="https://www.playonlinux.com/en/news.html" class="navbar-item "> News </a>  <a href="http://wiki.playonlinux.com" class="navbar-item "> Wiki </a> <a href="https://www.playonlinux.com/en/forums.html" class="navbar-item "> Forums </a>  </div> <div class="navbar-end"> <div class="navbar-item has-dropdown is-hoverable"> <a class="navbar-link is-arrowless"><img class="navbar-item-icon" src="https://www.playonlinux.com/images/flags/en.png" alt="en"></a> <div class="navbar-dropdown"> <a class="navbar-item" href="/fr/"><img class="navbar-item-icon" src="https://www.playonlinux.com/images/flags/fr.png" alt="fr"> </a> <a class="navbar-item" href="/de/"><img class="navbar-item-icon" src="https://www.playonlinux.com/images/flags/de.png" alt="de"> </a> <a class="navbar-item" href="/es/"><img class="navbar-item-icon" src="https://www.playonlinux.com/images/flags/es.png" alt="es"> </a> <a class="navbar-item" href="/pl/"><img class="navbar-item-icon" src="https://www.playonlinux.com/images/flags/pl.png" alt="pl"> </a> <a class="navbar-item" href="/ru/"><img class="navbar-item-icon" src="https://www.playonlinux.com/images/flags/ru.png" alt="ru"> </a> <a class="navbar-item" href="/sv/"><img class="navbar-item-icon" src="https://www.playonlinux.com/images/flags/sv.png" alt="sv"> </a> <a class="navbar-item" href="/nl/"><img class="navbar-item-icon" src="https://www.playonlinux.com/images/flags/nl.png" alt="nl"> </a> </div> </div> <div class="navbar-item"> <div class="buttons"> <a href="https://www.playonlinux.com/en/download.html" class="button is-primary "> Download </a> </div> </div> </div> </div></nav></header>') + document.body.innerHTML;