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 |
||
| Linia 66: | Linia 66: | ||
}); | }); | ||
*/ | */ | ||
document.addEventListener('DOMContentLoaded', function() { | document.addEventListener('DOMContentLoaded', function() { | ||
var createListItem = function() { | |||
var li = document.createElement('li'); | var li = document.createElement('li'); | ||
// Ensure visibility across different displays | |||
li.style. | li.style.cssText = 'display: inline-block !important;'; | ||
var a = document.createElement('a'); | var a = document.createElement('a'); | ||
a.href = " | a.href = "javascript:void(0);"; // Use "#" or "javascript:void(0);" for no action | ||
a.textContent = "Privacy Control Center"; | a.textContent = "Privacy Control Center"; | ||
// Bind click event for custom functionality | |||
a.onclick = function() { alert('Privacy Control Center opened.'); return false; }; | |||
li.appendChild(a); | li.appendChild(a); | ||
return li; | return li; | ||
} | }; | ||
// Desktop | // Function to add the list item to both mobile and desktop footers | ||
var addListItem = function() { | |||
// Desktop Footer | |||
var desktopFooterPlaces = document.querySelector('#footer-places'); | |||
if (desktopFooterPlaces && !document.querySelector('#footer-places-custom')) { | |||
var desktopLi = createListItem(); | |||
desktopFooterPlaces. | desktopLi.id = 'footer-places-custom'; // Unique ID for desktop | ||
desktopFooterPlaces.appendChild(desktopLi); // Append at the end of the list | |||
} | } | ||
// Mobile Footer | |||
var mobileFooterPlaces = document.querySelector('.footer-places'); | |||
if (mobileFooterPlaces && !document.querySelector('#footer-places-custom-mobile')) { | |||
var mobileLi = createListItem(); | |||
mobileLi.id = 'footer-places-custom-mobile'; // Unique ID for mobile | |||
mobileFooterPlaces.appendChild(mobileLi); // Append at the end of the list | |||
// Explicitly override mobile CSS to ensure visibility | |||
mobileLi.style.display = 'inline-block'; | |||
} | } | ||
}; | |||
addListItem(); | |||
}); | }); | ||
edycji