Biurokraci, Moderatorzy czatu, checkuser, commenters, Moderatorzy (CommentStreams), gitkursanci, Administratorzy interfejsu, Moderatorzy, odkrywajacy, Page Ownership admin, swiadomikursanci, Administratorzy, Redaktorzy widżetów
969
edycji
Swiadomosc (dyskusja | edycje) mNie podano opisu zmian Znaczniki: Z urządzenia mobilnego Z wersji mobilnej (przeglądarkowej) |
Swiadomosc (dyskusja | edycje) mNie podano opisu zmian Znaczniki: Z urządzenia mobilnego Z wersji mobilnej (przeglądarkowej) |
||
| Linia 67: | Linia 67: | ||
*/ | */ | ||
document.addEventListener('DOMContentLoaded', function() { | |||
var | // Function to create and return the new list item | ||
function createNewListItem() { | |||
var li = document.createElement('li'); | |||
li.id = 'custom-footer-privacy-link'; // Ensure the ID is unique | |||
li.style.display = 'inline-block'; // Ensure it's visible on mobile | |||
var a = document.createElement('a'); | |||
a.href = "#"; | |||
a.onclick = function() { illow.showWidget(); return false; }; // Adjust as per your actual function | |||
a.textContent = "Privacy Control Center"; | |||
li.appendChild(a); | |||
return li; | |||
} | } | ||
// | // Desktop version | ||
if ( | var desktopFooterPlaces = document.querySelector('#footer-places'); | ||
if (desktopFooterPlaces && !document.querySelector('#custom-footer-privacy-link')) { | |||
var newListItemDesktop = createNewListItem(); | |||
var privacyPolicyLink = document.querySelector('#footer-places-privacy'); | |||
if (privacyPolicyLink) { | |||
desktopFooterPlaces.insertBefore(newListItemDesktop, privacyPolicyLink.nextSibling); | |||
} | |||
} | } | ||
// Mobile version | |||
var mobileFooterPlaces = document.querySelector('.footer-places'); | |||
if (mobileFooterPlaces && !document.querySelector('#custom-footer-privacy-link-mobile')) { | |||
var newListItemMobile = createNewListItem(); | |||
newListItemMobile.id = 'custom-footer-privacy-link-mobile'; // Different ID for mobile | |||
var mobilePrivacyPolicyLink = document.querySelector('#footer-places-privacy'); | |||
if (mobilePrivacyPolicyLink) { | |||
mobileFooterPlaces.insertBefore(newListItemMobile, mobilePrivacyPolicyLink.nextSibling); | |||
// | } | ||
// Ensure the new list item is visible on mobile | |||
newListItemMobile.style.display = 'inline-block'; // Override any 'display: none' from CSS | |||
} | } | ||
}); | }); | ||
edycji