User:PetraMagna/server-toggle.js: Difference between revisions
Jump to navigation
Jump to search
m
just to be safe about detection
PetraMagna (talk | contribs) (page-specific settings; support tabber extension) |
PetraMagna (talk | contribs) m (just to be safe about detection) |
||
Line 20:
$(".tabber__tabs").each(function(i, parent) {
const children = $(parent).find("a.tabber__tab");
if (children.length == 2
const text1 = children[0].innerText.toLowerCase(), text2 = children[1].innerText.toLowerCase();
children[0].classList.add("server-toggle-jp-button");▼
if ((text1 === "jp" || text1 === "japan") && (text2 === "gl" || text2 === "global")) {
children[1].classList.add("server-toggle-gl-button");▼
▲ children[0].classList.add("server-toggle-jp-button");
▲ children[1].classList.add("server-toggle-gl-button");
}
}
});
|