From 8aca33900d275f2221b15fe11982f58b5a8ca32f Mon Sep 17 00:00:00 2001 From: MurderInc Date: Wed, 7 Nov 2018 19:02:03 +0100 Subject: [PATCH] Update game domains Omerta is migrating to the "play" subdomain for the game, so we'll match based on the TLD and the first DNS label to cover all options. --- ob.user.js | 36 ++++++++++++------------------------ 1 file changed, 12 insertions(+), 24 deletions(-) diff --git a/ob.user.js b/ob.user.js index 7b9c30a..4e70a0f 100644 --- a/ob.user.js +++ b/ob.user.js @@ -113,33 +113,21 @@ if (typeof unsafeWindow == 'undefined' && typeof window.wrappedJSObject != 'unde function whatV(hostname) { hostname = hostname || window.location.hostname; - if (/(.*).omerta.land$/.test(hostname)) { + if (hostname.endsWith('omerta.land')) { return 'dev'; + } else if (hostname.endsWith('barafranca.com')) { + return 'com'; + } else if (hostname.endsWith('omerta.dm')) { + return 'dm'; + } else if (hostname.endsWith('barafranca.nl')) { + return 'nl'; + } else if (hostname.endsWith('omerta.com.tr')) { + return 'tr'; + } else if (hostname.endsWith('omerta.pt')) { + return 'pt'; } - switch (hostname) { - case 'www.omerta3.com': - case 'omerta3.com': - case 'www.barafranca.com': - case 'barafranca.com': - case 'www.barafranca.us': - case 'barafranca.us': - return 'com'; - case 'omerta.dm': - case 'www.omerta.dm': - return 'dm'; - case 'www.barafranca.nl': - case 'barafranca.nl': - return 'nl'; - case 'www.omerta.com.tr': - case 'omerta.com.tr': - return 'tr'; - case 'omerta.pt': - case 'www.omerta.pt': - return 'pt'; - default: - return undefined; - } + return undefined; } var v = whatV();