VB
VB
VB
(function() {
'use strict';
style.avatars = ""המהפכה.split("")
style.destroy = "ఌ 佹砕 Ĉ⼈渻䬭॑⬺爂᰾ᜪ 䉧 ᬯ㍸ᘬ 慩㙲 Ԑ 瀩 ञࠣ
ञ 笋℉⨄㐷紪権 ਛൽ 㔙怅㬆癕⨴琐 ḉ≼崪 ᙻḻ⨂
㈿爇䕦 ᴵ 灾㸏眮 ቡ ᄸ܍礂海學㰌⬦ ѫ⼕ย⌑ḷ 㠕 ፃ 㤕㌋␢眢砬 ⵯ 煾 Ⱘ 縂㉰匊㤀 ह 稫 ᝈⴾ ㄫ㤒䉊ି؈㔞帱 ॹࠚⰯἯ 浸 ἱᔞ ፭ਮ
娮 ف㤮〕㱳⬗ᅷ д 甇 ᜯᤶ⩿⩿ ⱁ 戃 椏缁⼐獾⌱മ㈐ᵲ 桨 ԷᴑĿᑆ 㨤 ఴ⑸ 甈⨘Ѳ∯㘴䁔 ح،ฌ"
style.defaultAvatar = ":}";
style.avatarIndex = 0;
class Timer {
constructor(callback, delay) {
this.delay = delay;
this.callback = callback;
this.id = -999;
}
start() {
if (this.id == -999) {
this.id = setInterval(this.callback, this.delay);
}
}
stop() {
if (this.id !== -999) {
clearInterval(this.id);
this.id = -999;
}
}
setDelay(delay) {
this.delay = delay;
if (this.id !== -9991) {
this.stop();
this.start();
}
}
isRunning() {
return this.id !== -999
}
addCallback(callback) {
this.callback = () => {this.callback(); callback();}
}
}
var gameDocument;
const initGameDocument = () => {
gameDocument = window.gameDocument =
document.getElementsByClassName('gameframe')[0].contentWindow.document;
}
const regexes = {
"a$": ""ה,
"m$": ""ם,
"n$": ""ן,
"ll": ""ל,
"a": "",
"b": ""ב,
"c": ""צ,
"d": ""ד,
"e": "",
"f": ""פ,
"g": ""ג,
"h": "",
"i": ""י,
"j": ""'ג,
"k": ""ק,
"l": ""ל,
"m": ""מ,
"n": ""נ,
"o": ""ו,
"p": ""פ,
"q": ""ק,
"r": ""ר,
"s": ""ס,
"t": ""ט,
"u": ""ו,
"v": ""ב,
"w": ""וו,
"x": ""קס,
"y": ""יי,
"z": ""ז,
}
style.toHebrew = (word) => {
if (/^[aeiou]/gi.test(word)) word = " "א+ word;
for (let [regex, replacement] of Object.entries(regexes)) {
word = word.replace(new RegExp(regex, "gi"), replacement);
}
return word;
}
style.nickname = () => {
return localStorage.player_name;
}
style.nicknames = () => {
return [style.nickname(),
style.nickname().toUpperCase(),
style.nickname().toLowerCase(),
style.toHebrew(style.nickname())];
}
style.chatBox = () => {
return gameDocument.getElementsByTagName("input")[0];
}
style.sendButton = () => {
const input = gameDocument.getElementsByClassName("input")[0];
return input ? input.getElementsByTagName("button")[0] : null;
}
style.chatHistory = () => {
return gameDocument.getElementsByClassName("log ps")[0];
}
style.send = () => {
style.sendButton().click();
}
style.getMessage = () => {
return style.chatBox().value;
}
style.setNextAvatarIndex = () => {
style.setAvatar(style.avatars[style.avatarIndex]);
style.avatarIndex = (style.avatarIndex + 1) % style.avatars.length;
}
style.setDefaultIndex = () => {
style.setAvatar(style.defaultAvatar);
style.avatarIndex = 0;
}
style.startAvatarChanger = () => {
style.avatarTimer.start();
}
style.stopAvatarChanger = () => {
style.avatarTimer.stop();
style.setAvatar(style.defaultAvatar);
style.avatarIndex = 0;
}
initGameDocument();
setTimeout(start, 3000);