User:PetraMagna/server-toggle.js: Difference between revisions

Jump to navigation Jump to search
Content deleted Content added
m just to be safe about detection
mNo edit summary
Line 21: Line 21:
const children = $(parent).find("a.tabber__tab");
const children = $(parent).find("a.tabber__tab");
if (children.length == 2) {
if (children.length == 2) {
const text1 = children[0].innerText.toLowerCase(), text2 = children[1].innerText.toLowerCase();
const text1 = children[0].innerText.toLowerCase().trim(), text2 = children[1].innerText.toLowerCase().trim();
if ((text1 === "jp" || text1 === "japan") && (text2 === "gl" || text2 === "global")) {
if ((text1 === "jp" || text1 === "japan") && (text2 === "gl" || text2 === "global")) {
children[0].classList.add("server-toggle-jp-button");
children[0].classList.add("server-toggle-jp-button");