MediaWiki:Common.js: Difference between revisions
No edit summary Tag: Manual revert |
No edit summary |
||
| Line 306: | Line 306: | ||
} else { | } else { | ||
jakeInit(); | jakeInit(); | ||
} | |||
})(); | |||
(function () { | |||
function jakeAddFooterSocialRow() { | |||
var footer = document.getElementById("footer"); | |||
if (!footer) return; | |||
var places = document.getElementById("footer-places"); | |||
if (!places) return; | |||
if (document.getElementById("footer-social")) return; | |||
var ul = document.createElement("ul"); | |||
ul.id = "footer-social"; | |||
ul.className = "noprint"; | |||
function add(href, label, cls) { | |||
var li = document.createElement("li"); | |||
var a = document.createElement("a"); | |||
a.href = href; | |||
a.className = cls; | |||
a.setAttribute("aria-label", label); | |||
a.title = label; | |||
var span = document.createElement("span"); | |||
span.className = "footer-social-label"; | |||
span.textContent = label; | |||
a.appendChild(span); | |||
li.appendChild(a); | |||
ul.appendChild(li); | |||
} | |||
add("https://discord.gg/8w5rSNAXRf", "Discord", "footer-social-discord"); | |||
add("https://www.linkedin.com/company/fulu-foundation-usa", "Linkedin", "footer-social-linkedin"); | |||
add("https://x.com/FULUFoundation", "X", "footer-social-x"); | |||
places.parentNode.insertBefore(ul, places.nextSibling); | |||
} | |||
if (document.readyState === "loading") { | |||
document.addEventListener("DOMContentLoaded", jakeAddFooterSocialRow); | |||
} else { | |||
jakeAddFooterSocialRow(); | |||
} | } | ||
})(); | })(); | ||