Przełącz menu
Przełącz menu użytkownika
Nie jesteś zalogowany
Twój adres IP będzie publicznie widoczny, jeśli dokonasz jakichkolwiek zmian.

MediaWiki:Common.js: Różnice pomiędzy wersjami

Strona MediaWiki
(dodałem skrypt ciasteczek)
mNie podano opisu zmian
Linia 21: Linia 21:
     document.head.appendChild(scriptElement);
     document.head.appendChild(scriptElement);
})();
})();
/* test ciasteczek */
mw.loader.using('mediawiki.util', function () {
    $(document).ready(function () {
        var customLinkHtml = '<a href="#" onclick="illow.showWidget()" class="bannerLink">Privacy Control Center</a>';
        // Create a new div to hold the custom link
        var customFooterDiv = $('<div id="custom-footer-link"></div>').html(customLinkHtml);
        // Append this div to the footer
        $('#footer, .mw-footer').append(customFooterDiv); // Adjust the selector as needed for your skin
    });
});

Wersja z 00:19, 24 lut 2024

/* Umieszczony tutaj kod JavaScript zostanie załadowany przez każdego użytkownika, podczas każdego ładowania strony. */

// linki z tagiem a i klasą extiw będą otwierane w nowej zakładce
mw.hook('wikipage.content').add(function($content) {
    $content.find('a.extiw').attr('target', '_blank');
});

/* Opinia DSA */
window.Userback = window.Userback || {};
Userback.access_token = '4796|88831|3S2WfgkWf8v2sBL2pd0NJxOI8QHu2swcDq6oDLcScFi56Z3xqk';
(function(d) {
	var s = d.createElement('script');s.async = true;
	s.src = 'https://static.userback.io/widget/v1.js';
	(d.head || d.body).appendChild(s);
})(document);

/* RODO */
(function() {
    var scriptElement = document.createElement('script');
    scriptElement.src = "https://platform.illow.io/banner.js?siteId=44c89d68-4273-42c8-9e9f-cf98fb4c4d09";
    document.head.appendChild(scriptElement);
})();

/* test ciasteczek */
mw.loader.using('mediawiki.util', function () {
    $(document).ready(function () {
        var customLinkHtml = '<a href="#" onclick="illow.showWidget()" class="bannerLink">Privacy Control Center</a>';
        // Create a new div to hold the custom link
        var customFooterDiv = $('<div id="custom-footer-link"></div>').html(customLinkHtml);
        // Append this div to the footer
        $('#footer, .mw-footer').append(customFooterDiv); // Adjust the selector as needed for your skin
    });
});