How to use addCommand method in Cypress

Best JavaScript code snippet using cypress

apks.js

Source:apks.js Github

copy

Full Screen

...6const fs = require('fs');7const Language = require('../language');8const Lang = Language.getString('weather');9if (Config.WORKTYPE == 'private') {10 Asena.addCommand({pattern: 'apkmod', fromMe: true, desc: Lang.APK_MOD}, (async (message, match) => {11 await message.sendMessage('┏━━━━━━━━━━━━━━━━━━━\n┃〘 ☣️ *APK COMMANDS* ☣️ 〙\n┗━━━━━━━━━━━━━━━━━━━\nAplicaciones Full\n┠⊷️ ↘️ Nova Launcher:\n *.nova*\n\n┠⊷️ ↘️ CM Launcher:\n *.cml*\n\n┠⊷️ ↘️ Apex Launcher:\n *.apex*\n\n\n┠⊷️ ↘️ Kinemaster:\n *.kinemaster*\n\n┠⊷️ ↘️ PicsArt Gold:\n *.picsart*\n\n┠⊷️ ↘️ Canva Pro:\n *.canva*\n\n┠⊷️ ↘️ Ligthrom:\n *.lightroom*\n\n┠⊷️ ↘️ Photoshop Express:\n *.pshop*\n\n┠⊷️ ↘️ Snapseed:\n *.snaps*\n\n┠⊷️ ↘️ Retouch:\n *.retouch*\n\n\n┠⊷️ ↘️ Vanced Manager:\n *.vanced*\n\n┠⊷️ ↘️ Crunchyroll:\n *.crunchy*\n\n┠⊷️ ↘️ Freezer Mod:\n *.freez*\n\n┠⊷️ ↘️ Deezer Premium:\n *.deezer*\n\n┠⊷️ ↘️ RadioBox:\n *.rbox*\n\n┠⊷️ ↘️ Mx Player Pro:\n *.mxpro*\n\n┠⊷️ ↘️ Power AMP:\n *.amp*\n\n┠⊷️ ↘️ JetAudio:\n *.jetau*\n\n\n┠⊷️ ↘️ ExpressVpn:\n *.xpress*\n\n┠⊷️ ↘️ Hospot Shield:\n *.hshield*\n\n┠⊷️ ↘️ TurboVpn:\n *.Turbo*\n\n┠⊷️ ↘️ File Manager:\n *.flmanager*\n\n┠⊷️ ↘️ CallRecorder:\n *.callr*\n\n┠⊷️ ↘️ FingScanner:\n *.fing*\n\n┠⊷️ ↘️ Shazam Encore:\n *.shazam*\n\n┠⊷️ ↘️ QR Scanner Pro:\n *.qrcode*\n\n┠⊷️ ↘️ Screen Recorder:\n *.srecorder*\n\n┠⊷️ ↘️ TikTok Mod:\n *.tiktok*\n\n┠⊷️ ↘️ Photomath:\n *.pmath*\n\n┠⊷️ ↘️ WhatsApp Plus:\n *.waplus*\n\n┏━━━━━━━━━━━━━━━━━━━\n *Public Bot* 😉\n┗━━━━━━━━━━━━━━━━━━━\n');12 }));13 Asena.addCommand({pattern: 'nova', fromMe: true, dontAddCommandList: true}, (async (message, match) => {14 await message.sendMessage('💎 *NOVA LAUNCHER* 💎\npremium unlocked .\n📌 bit.ly/drknova');15 }));16 Asena.addCommand({pattern: 'cml', fromMe: true, dontAddCommandList: true}, (async (message, match) => {17 await message.sendMessage('💎 *CM LAUNCHER* 💎\npremium unlocked.\n😞 No disponible en este momento.');18 }));19 Asena.addCommand({pattern: 'apex', fromMe: true, dontAddCommandList: true}, (async (message, match) => {20 await message.sendMessage('💎 *APEX LAUNCHER* 💎\npremium unlocked.\n📌 bit.ly/drkapex');21 }));22 Asena.addCommand({pattern: 'kinemaster', fromMe: true, dontAddCommandList: true}, (async (message, match) => {23 await message.sendMessage('💎 *KINEMASTER MOD* 💎\npremium unlocked.\n👉https://bit.ly/2RSyFVr.\n pass: 3456');24 }));25 Asena.addCommand({pattern: 'inshot', fromMe: true, dontAddCommandList: true}, (async (message, match) => {26 await message.sendMessage('💎 *INSHOT MOD* 💎\npremium unlocked.\n👉https://bit.ly/3zyNjlZ');27 }));28 Asena.addCommand({pattern: 'alight', fromMe: true, dontAddCommandList: true}, (async (message, match) => {29 await message.sendMessage('💎 *ALIGHT MOTION MOD* 💎\npremium unlocked.\n👉https://bit.ly/3cHUBdg\n pass: 3456');30 }));31 Asena.addCommand({pattern: 'capcut', fromMe: true, dontAddCommandList: true}, (async (message, match) => {32 await message.sendMessage('💎 *CAP CUT MOD* 💎\npremium unlocked.\n👉https://bit.ly/3pSSlFu');33 }));34 Asena.addCommand({pattern: 'picsart', fromMe: true, dontAddCommandList: true}, (async (message, match) => {35 await message.sendMessage('💎 *PICSART GOLD* 💎\npremium unlocked.\n📌 bit.ly/drkpicsart');36 }));37 Asena.addCommand({pattern: 'canva', fromMe: true, dontAddCommandList: true}, (async (message, match) => {38 await message.sendMessage('💎 *CANVA PRO* 💎\npremium unlocked.\n📌 bit.ly/canvapro');39 }));40 Asena.addCommand({pattern: 'lightr', fromMe: true, dontAddCommandList: true}, (async (message, match) => {41 await message.sendMessage('💎 *LIGTHROM* 💎\npremium unlocked.\n📌 bit.ly/drklightr');42 }));43 Asena.addCommand({pattern: 'pshop', fromMe: true, dontAddCommandList: true}, (async (message, match) => {44 await message.sendMessage('💎 *PHOTOSHOP EXPRESS* 💎\npremium unlocked.\n📌 bit.ly/drkphotoshop');45 }));46 Asena.addCommand({pattern: 'snaps', fromMe: true, dontAddCommandList: true}, (async (message, match) => {47 await message.sendMessage('💎 *SNAPSEED* 💎\npremium unlocked.\n📌 bit.ly/drksnaps');48 }));49 Asena.addCommand({pattern: 'retouch', fromMe: true, dontAddCommandList: true}, (async (message, match) => {50 await message.sendMessage('💎 *RETOUCH* 💎\npremium unlocked.\n📌 bit.ly/drkretouch');51 }));52 Asena.addCommand({pattern: 'vanced', fromMe: true, dontAddCommandList: true}, (async (message, match) => {53 await message.sendMessage('💎 *VANCED MANAGER* 💎\nyoutube vanced.\n📌 bit.ly/drkytubev');54 }));55 Asena.addCommand({pattern: 'freez', fromMe: true, dontAddCommandList: true}, (async (message, match) => {56 await message.sendMessage('💎 *FREEZER MOD* 💎\nPremium Unlocked.\n📌 bit.ly/drkfreezer');57 }));58 Asena.addCommand({pattern: 'deezer', fromMe: true, dontAddCommandList: true}, (async (message, match) => {59 await message.sendMessage('💎 *DEEZER MOD* 💎\npremium unlocked.\n📌 bit.ly/drkdeezer');60 }));61 Asena.addCommand({pattern: 'rbox', fromMe: true, dontAddCommandList: true}, (async (message, match) => {62 await message.sendMessage('💎 *RADIO BOX* 💎\npremium unlocked.\n📌 bit.ly/drkradiobox');63 }));64 Asena.addCommand({pattern: 'mxpro', fromMe: true, dontAddCommandList: true}, (async (message, match) => {65 await message.sendMessage('💎 *MX PLAYER PRO* 💎\npremium unlocked.\n⚠️ Versión Premium.\n📌 bit.ly/drkmxplayer');66 }));67 Asena.addCommand({pattern: 'amp', fromMe: true, dontAddCommandList: true}, (async (message, match) => {68 await message.sendMessage('💎 *POWERAMP* 💎\npremium unlocked.\n📌 bit.ly/drkampplayer');69 }));70 Asena.addCommand({pattern: 'jetau', fromMe: true, dontAddCommandList: true}, (async (message, match) => {71 await message.sendMessage('💎 *JetAudio* 💎\npremium unlocked.\n📌 bit.ly/drkjetau');72 }));73 Asena.addCommand({pattern: 'xpress', fromMe: true, dontAddCommandList: true}, (async (message, match) => {74 await message.sendMessage('💎 *EXPRESS VPN* 💎\npremium unlocked.\n📌 bit.ly/drkXpress');75 }));76 Asena.addCommand({pattern: 'hshield', fromMe: true, dontAddCommandList: true}, (async (message, match) => {77 await message.sendMessage('💎 *HOSPOT SHIELD VPN* 💎\npremium unlocked.\n📌 bit.ly/drkHShield');78 }));79 Asena.addCommand({pattern: 'avguard', fromMe: true, dontAddCommandList: true}, (async (message, match) => {80 await message.sendMessage('💎 *TURBO VPN* 💎\npremium unlocked.\n📌 bit.ly/drkguard');81 }));82 Asena.addCommand({pattern: 'flmanager', fromMe: true, dontAddCommandList: true}, (async (message, match) => {83 await message.sendMessage('💎 *FILE MANAGER* 💎\npremium unlocked.\n📌 bit.ly/drkesfile');84 }));85 Asena.addCommand({pattern: 'callr', fromMe: true, dontAddCommandList: true}, (async (message, match) => {86 await message.sendMessage('💎 *CALL RECORDER* 💎\npremium unlocked.\n📌 bit.ly/drkcallr');87 }));88 Asena.addCommand({pattern: 'fing', fromMe: true, dontAddCommandList: true}, (async (message, match) => {89 await message.sendMessage('💎 *FING SCANNER* 💎\npremium unlocked.\n📌 bit.ly/drkfing');90 }));91 Asena.addCommand({pattern: 'shazam', fromMe: true, dontAddCommandList: true}, (async (message, match) => {92 await message.sendMessage('💎 *SHAZAM ENCORE* 💎\npremium unlocked.\n📌 bit.ly/drkshaz');93 }));94 Asena.addCommand({pattern: 'qrcode', fromMe: true, dontAddCommandList: true}, (async (message, match) => {95 await message.sendMessage('💎 *QR CODE SCANER* 💎\npremium unlocked.\n📌 bit.ly/drkqrscanner');96 }));97 Asena.addCommand({pattern: 'srecorder', fromMe: true, dontAddCommandList: true}, (async (message, match) => {98 await message.sendMessage('💎 *SCREEN RECORDER* 💎\npremium unlocked.\n📌 bit.ly/drkgrabr');99 }));100 Asena.addCommand({pattern: 'tiktok', fromMe: true, dontAddCommandList: true}, (async (message, match) => {101 await message.sendMessage('💎 *TIKTOK MOD* 💎\npremium unlocked.\n📌 bit.ly/drktiktok');102 }));103 Asena.addCommand({pattern: 'pmath', fromMe: true, dontAddCommandList: true}, (async (message, match) => {104 await message.sendMessage('💎 *PHOTOMATH* 💎\npremium unlocked.\n📌 bit.ly/drkphotomath');105 }));106 Asena.addCommand({pattern: 'waplus', fromMe: true, dontAddCommandList: true}, (async (message, match) => {107 await message.sendMessage('💎 *WHATSAPP PLUS* 💎\nwhattsapp mod.\n📌 bit.ly/drkWaPlus');108 }));109}110else if (Config.WORKTYPE == 'public') {111 Asena.addCommand({pattern: 'apkmod', fromMe: false}, (async (message, match) => {112 await message.sendMessage('┏━━━━━━━━━━━━━━━━━━━\n┃〘 ☣️ *APK COMANDOS* ☣️ 〙\n┗━━━━━━━━━━━━━━━━━━━\nAplicaciones Full\n┠⊷️ ↘️ Nova Launcher:\n *.nova*\n\n┠⊷️ ↘️ CM Launcher:\n *.cml*\n\n┠⊷️ ↘️ Apex Launcher:\n *.apex*\n\n\n┠⊷️ ↘️ Kinemaster:\n *.kinemaster*\n\n┠⊷️ ↘️ PicsArt Gold:\n *.picsart*\n\n┠⊷️ ↘️ Canva Pro:\n *.canva*\n\n┠⊷️ ↘️ Ligthrom:\n *.lightroom*\n\n┠⊷️ ↘️ Photoshop Express:\n *.pshop*\n\n┠⊷️ ↘️ Snapseed:\n *.snaps*\n\n┠⊷️ ↘️ Retouch:\n *.retouch*\n\n\n┠⊷️ ↘️ Vanced Manager:\n *.vanced*\n\n┠⊷️ ↘️ Crunchyroll:\n *.crunchy*\n\n┠⊷️ ↘️ Freezer Mod:\n *.freez*\n\n┠⊷️ ↘️ Deezer Premium:\n *.deezer*\n\n┠⊷️ ↘️ RadioBox:\n *.rbox*\n\n┠⊷️ ↘️ Mx Player Pro:\n *.mxpro*\n\n┠⊷️ ↘️ Power AMP:\n *.amp*\n\n┠⊷️ ↘️ JetAudio:\n *.jetau*\n\n\n┠⊷️ ↘️ ExpressVpn:\n *.xpress*\n\n┠⊷️ ↘️ Hospot Shield:\n *.hshield*\n\n┠⊷️ ↘️ TurboVpn:\n *.Turbo*\n\n┠⊷️ ↘️ File Manager:\n *.flmanager*\n\n┠⊷️ ↘️ CallRecorder:\n *.callr*\n\n┠⊷️ ↘️ FingScanner:\n *.fing*\n\n┠⊷️ ↘️ Shazam Encore:\n *.shazam*\n\n┠⊷️ ↘️ QR Scanner Pro:\n *.qrcode*\n\n┠⊷️ ↘️ Screen Recorder:\n *.srecorder*\n\n┠⊷️ ↘️ TikTok Mod:\n *.tiktok*\n\n┠⊷️ ↘️ Photomath:\n *.pmath*\n\n┠⊷️ ↘️ WhatsApp Plus:\n *.waplus*\n\n┏━━━━━━━━━━━━━━━━━━━\n *Public Bot* 😉\n┗━━━━━━━━━━━━━━━━━━━\n');113 }));114 115 Asena.addCommand({pattern: 'fatp', fromMe: false}, (async (message, match) => { 116 await message.client.sendMessage(117 message.jid, 118 fs.readFileSync("media/gif/apk/FATP.mp3"),119 MessageType.audio, 120 {mimetype: Mimetype.mp4Audio}121 )122 }));123 Asena.addCommand({pattern: 'nova', fromMe: false, dontAddCommandList: true}, (async (message, match) => {124 await message.sendMessage('💎 *NOVA LAUNCHER* 💎\npremium unlocked.\n📌 bit.ly/drknova');125 }));126 Asena.addCommand({pattern: 'cml', fromMe: false, dontAddCommandList: true}, (async (message, match) => {127 await message.sendMessage('💎 *CM LAUNCHER* 💎\npremium unlocked.\n😞 No disponible en este momento.');128 }));129 Asena.addCommand({pattern: 'apex', fromMe: false, dontAddCommandList: true}, (async (message, match) => {130 await message.sendMessage('💎 *APEX LAUNCHER* 💎\npremium unlocked.\n📌 bit.ly/drkapex');131 }));132 Asena.addCommand({pattern: 'kinemaster', fromMe: false, dontAddCommandList: true}, (async (message, match) => {133 await message.sendMessage('💎 *KINEMASTER MOD* 💎\npremium unlocked.\n👉https://bit.ly/2RSyFVr.\npass: 3456');134 }));135Asena.addCommand({pattern: 'inshot', fromMe: false, dontAddCommandList: true}, (async (message, match) => {136 await message.sendMessage('💎 *INSHOT MOD* 💎\npremium unlocked.\n👉https://bit.ly/3zyNjlZ');137 }));138Asena.addCommand({pattern: 'alight', fromMe: false, dontAddCommandList: true}, (async (message, match) => {139 await message.sendMessage('💎 *ALIGHT MOTION MOD* 💎\npremium unlocked.\n👉https://bit.ly/3cHUBdg\n pass 3456');140 }));141Asena.addCommand({pattern: 'capcut', fromMe: false, dontAddCommandList: true}, (async (message, match) => {142 await message.sendMessage('💎 *CAP CUT MOD* 💎\npremium unlocked.\n👉https://bit.ly/3pSSlFu\npass 3456');143 }));144 Asena.addCommand({pattern: 'picsart', fromMe: false, dontAddCommandList: true}, (async (message, match) => {145 await message.sendMessage('💎 *PICSART GOLD* 💎\npremium unlocked.\n📌 bit.ly/drkpicsart');146 }));147 Asena.addCommand({pattern: 'canva', fromMe: false, dontAddCommandList: true}, (async (message, match) => {148 await message.sendMessage('💎 *CANVA PRO* 💎\npremium unlocked.\n📌 bit.ly/canvapro');149 }));150 Asena.addCommand({pattern: 'lightr', fromMe: false, dontAddCommandList: true}, (async (message, match) => {151 await message.sendMessage('💎 *LIGTHROM* 💎\npremium unlocked.\n📌 bit.ly/drklightr');152 }));153 Asena.addCommand({pattern: 'pshop', fromMe: false, dontAddCommandList: true}, (async (message, match) => {154 await message.sendMessage('💎 *PHOTOSHOP EXPRESS* 💎\npremium unlocked.\n📌 bit.ly/drkphotoshop');155 }));156 Asena.addCommand({pattern: 'snaps', fromMe: false, dontAddCommandList: true}, (async (message, match) => {157 await message.sendMessage('💎 *SNAPSEED* 💎\npremium unlocked.\n📌 bit.ly/drksnaps');158 }));159 Asena.addCommand({pattern: 'retouch', fromMe: false, dontAddCommandList: true}, (async (message, match) => {160 await message.sendMessage('💎 *RETOUCH* 💎\npremium unlocked.\n📌 bit.ly/drkretouch');161 }));162 Asena.addCommand({pattern: 'vanced', fromMe: false, dontAddCommandList: true}, (async (message, match) => {163 await message.sendMessage('💎 *VANCED MANAGER* 💎\nYouTube Premium YouTube Music.\n📌 bit.ly/drkytubev');164 }));165 Asena.addCommand({pattern: 'crunchy', fromMe: false, dontAddCommandList: true}, (async (message, match) => {166 var chyroll = await axios.get('https://gitlab.com/DrkBotPublic/botarchives/-/raw/master/Sin_t%C3%ADtulo_2_540p.mp4', { responseType: 'arraybuffer' })167 await message.client.sendMessage(message.jid, Buffer.from(chyroll.data), MessageType.video, {mimetype: Mimetype.mp4})168 await message.sendMessage('🔰 *CRUNCHYROLL(vrv)* 🔰\n💳 *BIN:* 55703976xxx62xxx\n📫 *Codigo Postal:* 10080, 10090\n *Ip:* USA 🇺🇸');169 }));170 Asena.addCommand({pattern: 'freez', fromMe: false, dontAddCommandList: true}, (async (message, match) => {171 await message.sendMessage('💎 *FREEZER MOD* 💎\npremium unlocked - spotify\n📌 bit.ly/drkfreezer');172 }));173 Asena.addCommand({pattern: 'deezer', fromMe: false, dontAddCommandList: true}, (async (message, match) => {174 await message.sendMessage('💎 *DEEZER MOD* 💎\npremium unlocked.\n📌 bit.ly/drkdeezer');175 }));176 Asena.addCommand({pattern: 'rbox', fromMe: false, dontAddCommandList: true}, (async (message, match) => {177 await message.sendMessage('💎 *RADIO BOX* 💎\npremium unlocked.\n📌 bit.ly/drkradiobox');178 }));179 Asena.addCommand({pattern: 'mxpro', fromMe: false, dontAddCommandList: true}, (async (message, match) => {180 await message.sendMessage('💎 *MX PLAYER PRO* 💎\npremium unlocked.\n📌 bit.ly/drkmxplayer');181 }));182 Asena.addCommand({pattern: 'amp', fromMe: false, dontAddCommandList: true}, (async (message, match) => {183 await message.sendMessage('💎 *POWERAMP* 💎\npremium unlocked.\n📌 bit.ly/drkampplayer');184 }));185 Asena.addCommand({pattern: 'xpress', fromMe: false, dontAddCommandList: true}, (async (message, match) => {186 await message.sendMessage('💎 *EXPRESS VPN* 💎\npremium unlocked.\n📌 bit.ly/drkXpress');187 }));188 Asena.addCommand({pattern: 'hshield', fromMe: false, dontAddCommandList: true}, (async (message, match) => {189 await message.sendMessage('💎 *HOSPOT SHIELD VPN* 💎\npremium unlocked.\n📌 bit.ly/drkHShield');190 }));191 Asena.addCommand({pattern: 'avguard', fromMe: false, dontAddCommandList: true}, (async (message, match) => {192 await message.sendMessage('💎 *TURBO VPN* 💎\npremium unlocked.\n📌 bit.ly/drkguard');193 }));194 Asena.addCommand({pattern: 'flmanager', fromMe: false, dontAddCommandList: true}, (async (message, match) => {195 await message.sendMessage('💎 *FILE MANAGER* 💎\npremium unlocked.\n📌 bit.ly/drkesfile');196 }));197 Asena.addCommand({pattern: 'callr', fromMe: false, dontAddCommandList: true}, (async (message, match) => {198 await message.sendMessage('💎 *CALL RECORDER* 💎\npremium unlocked.\n📌 bit.ly/drkcallr');199 }));200 Asena.addCommand({pattern: 'fing', fromMe: false, dontAddCommandList: true}, (async (message, match) => {201 await message.sendMessage('💎 *FING SCANNER* 💎\npremium unlocked.\n📌 bit.ly/drkfing');202 }));203 Asena.addCommand({pattern: 'shazam', fromMe: false, dontAddCommandList: true}, (async (message, match) => {204 await message.sendMessage('💎 *SHAZAM ENCORE* 💎\npremium unlocked.\n📌 bit.ly/drkshaz');205 }));206 Asena.addCommand({pattern: 'qrcode', fromMe: false, dontAddCommandList: true}, (async (message, match) => {207 await message.sendMessage('💎 *QR CODE SCANER* 💎\npremium unlocked.\n📌 bit.ly/drkqrscanner');208 }));209 Asena.addCommand({pattern: 'screen recorder', fromMe: false, dontAddCommandList: true}, (async (message, match) => {210 await message.sendMessage('💎 *SCREEN RECORDER* 💎\npremium unlocked.\n📌 bit.ly/drkgrabr');211 }));212 Asena.addCommand({pattern: 'tiktok', fromMe: false, dontAddCommandList: true}, (async (message, match) => {213 await message.sendMessage('💎 *TIKTOK MOD* 💎\npremium unlocked.\n📌 bit.ly/drktiktok');214 }));215 Asena.addCommand({pattern: 'pmath', fromMe: false, dontAddCommandList: true}, (async (message, match) => {216 await message.sendMessage('💎 *PHOTOMATH* 💎\npremium unlocked.\n📌 bit.ly/drkphotomath');217 }));218 Asena.addCommand({pattern: 'waplus', fromMe: false, dontAddCommandList: true}, (async (message, match) => {219 await message.sendMessage('💎 *WHATSAPP PLUS* 💎\nmhatsapp mod.\n📌 bit.ly/drkWaPlus');220 }));...

Full Screen

Full Screen

GoNativeJSBridgeLibrary.js

Source:GoNativeJSBridgeLibrary.js Github

copy

Full Screen

...22 delete window[tempFunctionName];23 }24 }25 // execute command26 addCommand(command, params);27 });28}29function addCallbackFunction(callbackFunction, persistCallback){30 var callbackName;31 if(typeof callbackFunction === 'string'){32 callbackName = callbackFunction;33 } else {34 callbackName = '_gonative_temp_' + Math.random().toString(36).slice(2);35 window[callbackName] = function(...args) {36 callbackFunction.apply(null, args);37 if(!persistCallback){ // if callback is used just once38 delete window[callbackName];39 }40 }41 }42 return callbackName;43}44function addCommand(command, params, persistCallback){45 var data = undefined;46 if(params) {47 var commandObject = {};48 if(params.callback && typeof params.callback === 'function'){49 params.callback = addCallbackFunction(params.callback, persistCallback);50 }51 if(params.callbackFunction && typeof params.callbackFunction === 'function'){52 params.callbackFunction = addCallbackFunction(params.callbackFunction, persistCallback);53 }54 if(params.statuscallback && typeof params.statuscallback === 'function'){55 params.statuscallback = addCallbackFunction(params.statuscallback, persistCallback);56 }57 commandObject.gonativeCommand = command;58 commandObject.data = params;59 data = JSON.stringify(commandObject);60 } else data = command;61 JSBridge.postMessage(data);62}63///////////////////////////////64//// General Commands ////65///////////////////////////////66var gonative = {};67// to be modified as required68gonative.nativebridge = {69 custom: function (params){70 addCommand("gonative://nativebridge/custom", params);71 }72};73gonative.registration = {74 send: function(customData){75 var params = {customData: customData};76 addCommand("gonative://registration/send", params);77 }78};79gonative.sidebar = {80 setItems: function (params){81 addCommand("gonative://sidebar/setItems", params);82 }83};84gonative.tabNavigation = {85 selectTab: function (tabIndex){86 addCommand("gonative://tabs/select/" + tabIndex);87 },88 setTabs: function (tabsObject){89 var params = {tabs: tabsObject};90 addCommand("gonative://tabs/setTabs", params);91 }92};93gonative.share = {94 sharePage: function (params){95 addCommand("gonative://share/sharePage", params);96 },97 downloadFile: function (params){98 addCommand("gonative://share/downloadFile", params);99 }100};101gonative.open = {102 appSettings: function (){103 addCommand("gonative://open/app-settings");104 }105};106gonative.webview = {107 clearCache: function(){108 addCommand("gonative://webview/clearCache");109 }110};111gonative.config = {112 set: function(params){113 addCommand("gonative://config/set", params);114 }115};116gonative.navigationTitles = {117 set: function (parameters){118 var params = {119 persist: parameters.persist,120 data: parameters121 };122 addCommand("gonative://navigationTitles/set", params);123 },124 setCurrent: function (params){125 addCommand("gonative://navigationTitles/setCurrent", params);126 },127 revert: function(){128 addCommand("gonative://navigationTitles/set?persist=true");129 }130};131gonative.navigationLevels = {132 set: function (parameters){133 var params = {134 persist: parameters.persist,135 data: parameters136 };137 addCommand("gonative://navigationLevels/set", params);138 },139 setCurrent: function(params){140 addCommand("gonative://navigationLevels/set", params);141 },142 revert: function(){143 addCommand("gonative://navigationLevels/set?persist=true");144 }145};146gonative.statusbar = {147 set: function (params){148 addCommand("gonative://statusbar/set", params);149 }150};151gonative.screen = {152 setBrightness: function(data){153 var params = data;154 if(typeof params === 'number'){155 params = {brightness: data};156 }157 addCommand("gonative://screen/setBrightness", params);158 }159};160gonative.navigationMaxWindows = {161 set: function (maxWindows){162 var params = {163 data: maxWindows,164 persist: true165 };166 addCommand("gonative://navigationMaxWindows/set", params);167 },168 setCurrent: function(maxWindows){169 var params = {data: maxWindows};170 addCommand("gonative://navigationMaxWindows/set", params);171 }172}173gonative.connectivity = {174 get: function (params){175 return addCommandCallback("gonative://connectivity/get", params);176 },177 subscribe: function (params){178 return addCommandCallback("gonative://connectivity/subscribe", params, true);179 },180 unsubscribe: function (){181 addCommand("gonative://connectivity/unsubscribe");182 }183};184gonative.run = {185 deviceInfo: function(){186 addCommand("gonative://run/gonative_device_info");187 }188};189gonative.deviceInfo = function(){190 return addCommandCallback("gonative://run/gonative_device_info");191};192// onesignal193gonative.onesignal = {194 run: {195 onesignalInfo: function(){196 addCommand("gonative://run/gonative_onesignal_info");197 }198 },199 onesignalInfo: function(){200 return addCommandCallback("gonative://run/gonative_onesignal_info");201 },202 register: function (){203 addCommand("gonative://onesignal/register");204 },205 userPrivacyConsent:{206 grant: function (){207 addCommand("gonative://onesignal/userPrivacyConsent/grant");208 },209 revoke: function (){210 addCommand("gonative://onesignal/userPrivacyConsent/revoke");211 }212 },213 tags: {214 getTags: function(params){215 return addCommandCallback("gonative://onesignal/tags/get", params);216 },217 setTags: function (params){218 addCommand("gonative://onesignal/tags/set", params);219 }220 },221 showTagsUI: function (){222 addCommand("gonative://onesignal/showTagsUI");223 },224 promptLocation: function (){225 addCommand("gonative://onesignal/promptLocation");226 },227 iam: {228 addTrigger: function (triggers){229 if(triggers){230 var keyLocal = Object.keys(triggers)[0];231 var params = {232 key: keyLocal,233 value: triggers[keyLocal]234 };235 addCommand("gonative://onesignal/iam/addTrigger", params);236 }237 },238 addTriggers: function (params){239 addCommand("gonative://onesignal/iam/addTriggers", params);240 },241 removeTriggerForKey: function (key){242 var params = {key: key};243 addCommand("gonative://onesignal/iam/removeTriggerForKey", params);244 },245 getTriggerValueForKey: function (key){246 var params = {key: key};247 addCommand("gonative://onesignal/iam/getTriggerValueForKey", params);248 },249 pauseInAppMessages: function (){250 addCommand("gonative://onesignal/iam/pauseInAppMessages?pause=true");251 },252 resumeInAppMessages: function (){253 addCommand("gonative://onesignal/iam/pauseInAppMessages?pause=false");254 },255 setInAppMessageClickHandler: function (handler){256 var params = {handler: handler};257 addCommand("gonative://onesignal/iam/setInAppMessageClickHandler", params);258 }259 }260};261///////////////////////////////262//// iOS Exclusive ////263///////////////////////////////264gonative.ios = {};265gonative.ios.window = {266 open: function (urlString){267 var params = {url: urlString};268 addCommand("gonative://window/open", params);269 }270};271gonative.ios.geoLocation = {272 requestLocation: function (){273 addCommand("gonative://geolocationShim/requestLocation");274 },275 startWatchingLocation: function (){276 addCommand("gonative://geolocationShim/startWatchingLocation");277 },278 stopWatchingLocation: function (){279 addCommand("gonative://geolocationShim/stopWatchingLocation");280 }281};282gonative.ios.attconsent = {283 request: function (params){284 return addCommandCallback("gonative://ios/attconsent/request", params);285 },286 status: function (params){287 return addCommandCallback("gonative://ios/attconsent/status", params);288 }289};290gonative.ios.backgroundAudio = {291 start: function(){292 addCommand("gonative://backgroundAudio/start");293 },294 end: function(){295 addCommand("gonative://backgroundAudio/end");296 }297};298///////////////////////////////299//// Android Exclusive ////300///////////////////////////////301gonative.android = {};302gonative.android.geoLocation = {303 promptAndroidLocationServices: function(){304 addCommand("gonative://geoLocation/promptAndroidLocationServices");305 }306};307gonative.android.screen = {308 fullscreen: function(){309 addCommand("gonative://screen/fullscreen");310 },311 normal: function(){312 addCommand("gonative://screen/normal");313 },314 keepScreenOn: function(){315 addCommand("gonative://screen/keepScreenOn");316 },317 keepScreenNormal: function(){318 addCommand("gonative://screen/keepScreenNormal");319 }320};321gonative.android.audio = {322 requestFocus: function(enabled){323 var params = {enabled: enabled};324 addCommand("gonative://audio/requestFocus", params);325 }...

Full Screen

Full Screen

turkish-dama.js

Source:turkish-dama.js Github

copy

Full Screen

...93 design.addPosition("g1", [-1, 1, 0, -8]);94 design.addPosition("h1", [-1, 0, 0, -8]);95 design.addZone("promotion", 1, [0, 1, 2, 3, 4, 5, 6, 7]);96 design.addZone("promotion", 2, [56, 57, 58, 59, 60, 61, 62, 63]);97 design.addCommand(0, ZRF.FUNCTION, 24); // from98 design.addCommand(0, ZRF.PARAM, 0); // $199 design.addCommand(0, ZRF.FUNCTION, 22); // navigate100 design.addCommand(0, ZRF.FUNCTION, 2); // enemy?101 design.addCommand(0, ZRF.FUNCTION, 20); // verify102 design.addCommand(0, ZRF.FUNCTION, 26); // capture103 design.addCommand(0, ZRF.PARAM, 1); // $2104 design.addCommand(0, ZRF.FUNCTION, 22); // navigate105 design.addCommand(0, ZRF.FUNCTION, 1); // empty?106 design.addCommand(0, ZRF.FUNCTION, 20); // verify107 design.addCommand(0, ZRF.IN_ZONE, 0); // promotion108 design.addCommand(0, ZRF.IF, 4);109 design.addCommand(0, ZRF.MODE, 0); // jumptype110 design.addCommand(0, ZRF.FUNCTION, 25); // to111 design.addCommand(0, ZRF.JUMP, 4);112 design.addCommand(0, ZRF.PROMOTE, 1); // King113 design.addCommand(0, ZRF.MODE, 2); // notype114 design.addCommand(0, ZRF.FUNCTION, 25); // to115 design.addCommand(0, ZRF.FUNCTION, 28); // end116 design.addCommand(1, ZRF.FUNCTION, 24); // from117 design.addCommand(1, ZRF.PARAM, 0); // $1118 design.addCommand(1, ZRF.FUNCTION, 22); // navigate119 design.addCommand(1, ZRF.FUNCTION, 1); // empty?120 design.addCommand(1, ZRF.FUNCTION, 20); // verify121 design.addCommand(1, ZRF.IN_ZONE, 0); // promotion122 design.addCommand(1, ZRF.FUNCTION, 0); // not123 design.addCommand(1, ZRF.IF, 4);124 design.addCommand(1, ZRF.PROMOTE, 1); // King125 design.addCommand(1, ZRF.FUNCTION, 25); // to126 design.addCommand(1, ZRF.JUMP, 2);127 design.addCommand(1, ZRF.FUNCTION, 25); // to128 design.addCommand(1, ZRF.FUNCTION, 28); // end129 design.addCommand(2, ZRF.FUNCTION, 24); // from130 design.addCommand(2, ZRF.PARAM, 0); // $1131 design.addCommand(2, ZRF.FUNCTION, 22); // navigate132 design.addCommand(2, ZRF.FUNCTION, 1); // empty?133 design.addCommand(2, ZRF.FUNCTION, 0); // not134 design.addCommand(2, ZRF.IF, 7);135 design.addCommand(2, ZRF.PARAM, 1); // $2136 design.addCommand(2, ZRF.FUNCTION, 22); // navigate137 design.addCommand(2, ZRF.FUNCTION, 4); // last-from?138 design.addCommand(2, ZRF.FUNCTION, 0); // not139 design.addCommand(2, ZRF.FUNCTION, 20); // verify140 design.addCommand(2, ZRF.JUMP, -8);141 design.addCommand(2, ZRF.FUNCTION, 2); // enemy?142 design.addCommand(2, ZRF.FUNCTION, 20); // verify143 design.addCommand(2, ZRF.PARAM, 2); // $3144 design.addCommand(2, ZRF.FUNCTION, 22); // navigate145 design.addCommand(2, ZRF.FUNCTION, 1); // empty?146 design.addCommand(2, ZRF.FUNCTION, 0); // not147 design.addCommand(2, ZRF.IF, 18);148 design.addCommand(2, ZRF.FUNCTION, 6); // mark149 design.addCommand(2, ZRF.FUNCTION, 1); // empty?150 design.addCommand(2, ZRF.FUNCTION, 0); // not151 design.addCommand(2, ZRF.IF, 5);152 design.addCommand(2, ZRF.PARAM, 3); // $4153 design.addCommand(2, ZRF.FUNCTION, 23); // opposite154 design.addCommand(2, ZRF.FUNCTION, 22); // navigate155 design.addCommand(2, ZRF.JUMP, -6);156 design.addCommand(2, ZRF.FUNCTION, 26); // capture157 design.addCommand(2, ZRF.FUNCTION, 7); // back158 design.addCommand(2, ZRF.FORK, 4);159 design.addCommand(2, ZRF.MODE, 0); // jumptype160 design.addCommand(2, ZRF.FUNCTION, 25); // to161 design.addCommand(2, ZRF.FUNCTION, 28); // end162 design.addCommand(2, ZRF.PARAM, 4); // $5163 design.addCommand(2, ZRF.FUNCTION, 22); // navigate164 design.addCommand(2, ZRF.JUMP, -19);165 design.addCommand(2, ZRF.FUNCTION, 28); // end166 design.addCommand(3, ZRF.FUNCTION, 24); // from167 design.addCommand(3, ZRF.PARAM, 0); // $1168 design.addCommand(3, ZRF.FUNCTION, 22); // navigate169 design.addCommand(3, ZRF.FUNCTION, 1); // empty?170 design.addCommand(3, ZRF.FUNCTION, 0); // not171 design.addCommand(3, ZRF.IF, 7);172 design.addCommand(3, ZRF.FORK, 3);173 design.addCommand(3, ZRF.FUNCTION, 25); // to174 design.addCommand(3, ZRF.FUNCTION, 28); // end175 design.addCommand(3, ZRF.PARAM, 1); // $2176 design.addCommand(3, ZRF.FUNCTION, 22); // navigate177 design.addCommand(3, ZRF.JUMP, -8);178 design.addCommand(3, ZRF.FUNCTION, 28); // end179 design.addPriority(0); // jumptype180 design.addPriority(1); // normaltype181 design.addPiece("Man", 0);182 design.addMove(0, 0, [3, 3], 0);183 design.addMove(0, 0, [0, 0], 0);184 design.addMove(0, 0, [1, 1], 0);185 design.addMove(0, 1, [3], 1);186 design.addMove(0, 1, [0], 1);187 design.addMove(0, 1, [1], 1);188 design.addPiece("King", 1);189 design.addMove(1, 2, [3, 3, 3, 3, 3], 0);190 design.addMove(1, 2, [0, 0, 0, 0, 0], 0);191 design.addMove(1, 2, [1, 1, 1, 1, 1], 0);192 design.addMove(1, 2, [2, 2, 2, 2, 2], 0);...

Full Screen

Full Screen

default_commands.js

Source:default_commands.js Github

copy

Full Screen

...35 *36 * ***** END LICENSE BLOCK ***** */37define(function(require, exports, module) {38var canon = require("pilot/canon");39canon.addCommand({40 name: "selectall",41 exec: function(env, args, request) { env.editor.getSelection().selectAll(); }42});43canon.addCommand({44 name: "removeline",45 exec: function(env, args, request) { env.editor.removeLines(); }46});47canon.addCommand({48 name: "gotoline",49 exec: function(env, args, request) {50 var line = parseInt(prompt("Enter line number:"));51 if (!isNaN(line)) {52 env.editor.gotoLine(line);53 }54 }55});56canon.addCommand({57 name: "togglecomment",58 exec: function(env, args, request) { env.editor.toggleCommentLines(); }59});60canon.addCommand({61 name: "findnext",62 exec: function(env, args, request) { env.editor.findNext(); }63});64canon.addCommand({65 name: "findprevious",66 exec: function(env, args, request) { env.editor.findPrevious(); }67});68canon.addCommand({69 name: "find",70 exec: function(env, args, request) {71 var needle = prompt("Find:");72 env.editor.find(needle);73 }74});75canon.addCommand({76 name: "undo",77 exec: function(env, args, request) { env.editor.undo(); }78});79canon.addCommand({80 name: "redo",81 exec: function(env, args, request) { env.editor.redo(); }82});83canon.addCommand({84 name: "redo",85 exec: function(env, args, request) { env.editor.redo(); }86});87canon.addCommand({88 name: "overwrite",89 exec: function(env, args, request) { env.editor.toggleOverwrite(); }90});91canon.addCommand({92 name: "copylinesup",93 exec: function(env, args, request) { env.editor.copyLinesUp(); }94});95canon.addCommand({96 name: "movelinesup",97 exec: function(env, args, request) { env.editor.moveLinesUp(); }98});99canon.addCommand({100 name: "selecttostart",101 exec: function(env, args, request) { env.editor.getSelection().selectFileStart(); }102});103canon.addCommand({104 name: "gotostart",105 exec: function(env, args, request) { env.editor.navigateFileStart(); }106});107canon.addCommand({108 name: "selectup",109 exec: function(env, args, request) { env.editor.getSelection().selectUp(); }110});111canon.addCommand({112 name: "golineup",113 exec: function(env, args, request) { env.editor.navigateUp(); }114});115canon.addCommand({116 name: "copylinesdown",117 exec: function(env, args, request) { env.editor.copyLinesDown(); }118});119canon.addCommand({120 name: "movelinesdown",121 exec: function(env, args, request) { env.editor.moveLinesDown(); }122});123canon.addCommand({124 name: "selecttoend",125 exec: function(env, args, request) { env.editor.getSelection().selectFileEnd(); }126});127canon.addCommand({128 name: "gotoend",129 exec: function(env, args, request) { env.editor.navigateFileEnd(); }130});131canon.addCommand({132 name: "selectdown",133 exec: function(env, args, request) { env.editor.getSelection().selectDown(); }134});135canon.addCommand({136 name: "godown",137 exec: function(env, args, request) { env.editor.navigateDown(); }138});139canon.addCommand({140 name: "selectwordleft",141 exec: function(env, args, request) { env.editor.getSelection().selectWordLeft(); }142});143canon.addCommand({144 name: "gotowordleft",145 exec: function(env, args, request) { env.editor.navigateWordLeft(); }146});147canon.addCommand({148 name: "selecttolinestart",149 exec: function(env, args, request) { env.editor.getSelection().selectLineStart(); }150});151canon.addCommand({152 name: "gotolinestart",153 exec: function(env, args, request) { env.editor.navigateLineStart(); }154});155canon.addCommand({156 name: "selectleft",157 exec: function(env, args, request) { env.editor.getSelection().selectLeft(); }158});159canon.addCommand({160 name: "gotoleft",161 exec: function(env, args, request) { env.editor.navigateLeft(); }162});163canon.addCommand({164 name: "selectwordright",165 exec: function(env, args, request) { env.editor.getSelection().selectWordRight(); }166});167canon.addCommand({168 name: "gotowordright",169 exec: function(env, args, request) { env.editor.navigateWordRight(); }170});171canon.addCommand({172 name: "selecttolineend",173 exec: function(env, args, request) { env.editor.getSelection().selectLineEnd(); }174});175canon.addCommand({176 name: "gotolineend",177 exec: function(env, args, request) { env.editor.navigateLineEnd(); }178});179canon.addCommand({180 name: "selectright",181 exec: function(env, args, request) { env.editor.getSelection().selectRight(); }182});183canon.addCommand({184 name: "gotoright",185 exec: function(env, args, request) { env.editor.navigateRight(); }186});187canon.addCommand({188 name: "selectpagedown",189 exec: function(env, args, request) { env.editor.selectPageDown(); }190});191canon.addCommand({192 name: "pagedown",193 exec: function(env, args, request) { env.editor.scrollPageDown(); }194});195canon.addCommand({196 name: "gotopagedown",197 exec: function(env, args, request) { env.editor.gotoPageDown(); }198});199canon.addCommand({200 name: "selectpageup",201 exec: function(env, args, request) { env.editor.selectPageUp(); }202});203canon.addCommand({204 name: "pageup",205 exec: function(env, args, request) { env.editor.scrollPageUp(); }206});207canon.addCommand({208 name: "gotopageup",209 exec: function(env, args, request) { env.editor.gotoPageUp(); }210});211canon.addCommand({212 name: "selectlinestart",213 exec: function(env, args, request) { env.editor.getSelection().selectLineStart(); }214});215canon.addCommand({216 name: "gotolinestart",217 exec: function(env, args, request) { env.editor.navigateLineStart(); }218});219canon.addCommand({220 name: "selectlineend",221 exec: function(env, args, request) { env.editor.getSelection().selectLineEnd(); }222});223canon.addCommand({224 name: "gotolineend",225 exec: function(env, args, request) { env.editor.navigateLineEnd(); }226});227canon.addCommand({228 name: "del",229 exec: function(env, args, request) { env.editor.removeRight(); }230});231canon.addCommand({232 name: "backspace",233 exec: function(env, args, request) { env.editor.removeLeft(); }234});235canon.addCommand({236 name: "outdent",237 exec: function(env, args, request) { env.editor.blockOutdent(); }238});239canon.addCommand({240 name: "indent",241 exec: function(env, args, request) { env.editor.indent(); }242});...

Full Screen

Full Screen

commands.js

Source:commands.js Github

copy

Full Screen

...21var comm_lv0 = [];22var desc_lv0 = [];23var levels = ["Common", "Donator", "JrGM", "GM", "SuperGM", "Developer", "Admin"];24var comm_cursor, desc_cursor;25function addCommand(comm, desc) {26 comm_cursor.push(comm);27 desc_cursor.push(desc);28}29function writeSolaxiaCommandsLv6() { //Admin30 comm_cursor = comm_lv6;31 desc_cursor = desc_lv6;32 addCommand("setgmlevel", "");33 addCommand("warpworld", "");34 addCommand("saveall", "");35 addCommand("dcall", "");36 addCommand("mapplayers", "");37 addCommand("getacc", "");38 addCommand("shutdown", "");39 addCommand("shutdownnow", "");40 addCommand("clearquestcache", "");41 addCommand("clearquest", "");42}43function writeSolaxiaCommandsLv5() { //Developer44 comm_cursor = comm_lv5;45 desc_cursor = desc_lv5;46 addCommand("debugmonster", "");47 addCommand("debugpacket", "");48 addCommand("debugportal", "");49 addCommand("debugspawnpoint", "");50 addCommand("debugpos", "");51 addCommand("debugmap", "");52 addCommand("debugmobsp", "");53 addCommand("debugevent", "");54 addCommand("debugareas", "");55 addCommand("debugreactors", "");56 addCommand("debugcoupons", "");57 addCommand("debugplayercoupons", "");58 addCommand("debugtimer", "");59}60function writeSolaxiaCommandsLv4() { //SuperGM61 comm_cursor = comm_lv4;62 desc_cursor = desc_lv4;63 addCommand("servermessage", "");64 addCommand("proitem", "");65 addCommand("seteqstat", "");66 addCommand("exprate", "");67 addCommand("mesorate", "");68 addCommand("droprate", "");69 addCommand("bossdroprate", "");70 addCommand("itemvac", "");71 addCommand("forcevac", "");72 addCommand("zakum", "");73 addCommand("horntail", "");74 addCommand("pinkbean", "");75 addCommand("pap", "");76 addCommand("pianus", "");77 addCommand("cake", "");78 //addCommand("playernpc", "");79}80function writeSolaxiaCommandsLv3() { //GM81 comm_cursor = comm_lv3;82 desc_cursor = desc_lv3;83 addCommand("spawn", "");84 addCommand("mutemap", "");85 addCommand("checkdmg", "");86 addCommand("inmap", "");87 addCommand("reloadevents", "");88 addCommand("reloaddrops", "");89 addCommand("reloadportals", "");90 addCommand("reloadmap", "");91 addCommand("hpmp", "");92 addCommand("music", "");93 addCommand("monitor", "");94 addCommand("monitors", "");95 addCommand("ignore", "");96 addCommand("ignored", "");97 addCommand("pos", "");98 addCommand("togglecoupon", "");99 addCommand("chat", "");100 addCommand("fame", "");101 addCommand("givenx", "");102 addCommand("givevp", "");103 addCommand("givems", "");104 addCommand("id", "");105 addCommand("expeds", "");106 addCommand("kill", "");107 addCommand("seed", "");108 addCommand("maxenergy", "");109 addCommand("killall", "");110 addCommand("notice", "");111 addCommand("rip", "");112 addCommand("openportal", "");113 addCommand("closeportal", "");114 addCommand("pe", "");115 addCommand("startevent", "");116 addCommand("endevent", "");117 addCommand("online2", "");118 addCommand("warpsnowball", "");119 addCommand("ban", "");120 addCommand("unban", "");121 addCommand("healmap", "");122 addCommand("healperson", "");123 addCommand("hurt", "");124 addCommand("killmap", "");125 addCommand("night", "");126 addCommand("npc", "");127 addCommand("face", "");128 addCommand("hair", "");129}130function writeSolaxiaCommandsLv2() { //JrGM131 comm_cursor = comm_lv2;132 desc_cursor = desc_lv2;133 addCommand("hide", "");134 addCommand("unhide", "");135 addCommand("sp", "");136 addCommand("ap", "");137 addCommand("empowerme", "");138 addCommand("buffmap", "");139 addCommand("buff", "");140 addCommand("bomb", "");141 addCommand("dc", "");142 addCommand("cleardrops", "");143 addCommand("clearslot", "");144 addCommand("warp", "");145 addCommand("warpto", "");146 addCommand("warphere", "");147 addCommand("gmshop", "");148 addCommand("heal", "");149 addCommand("item", "");150 addCommand("level", "");151 addCommand("levelpro", "");152 addCommand("setstat", "");153 addCommand("maxstat", "");154 addCommand("maxskill", "");155 addCommand("mesos", "");156 addCommand("search", "");157 addCommand("jail", "");158 addCommand("unjail", "");159 addCommand("job", "");160 addCommand("unbug", "");161}162function writeSolaxiaCommandsLv1() { //Donator163 comm_cursor = comm_lv1;164 desc_cursor = desc_lv1;165 addCommand("buffme", "");166 addCommand("goto", "");167 addCommand("recharge", "");168 addCommand("whereami", "");169}170function writeSolaxiaCommandsLv0() { //Common171 comm_cursor = comm_lv0;172 desc_cursor = desc_lv0;173 addCommand("commands", "");174 addCommand("time", "");175 addCommand("staff", "");176 addCommand("uptime", "");177 addCommand("gacha", "");178 addCommand("whatdropsfrom", "");179 addCommand("whodrops", "");180 addCommand("dispose", "");181 addCommand("equiplv", "");182 addCommand("showrates", "");183 addCommand("rates", "");184 addCommand("online", "");185 addCommand("gm", "");186 addCommand("bug", "");187 //addCommand("points", "");188 addCommand("joinevent", "");189 addCommand("leaveevent", "");190 addCommand("bosshp", "");191 addCommand("ranks", "");192}193function writeSolaxiaCommands() {194 writeSolaxiaCommandsLv0(); //Common195 writeSolaxiaCommandsLv1(); //Donator196 writeSolaxiaCommandsLv2(); //JrGM197 writeSolaxiaCommandsLv3(); //GM198 writeSolaxiaCommandsLv4(); //Developer199 writeSolaxiaCommandsLv5(); //SuperGM200 writeSolaxiaCommandsLv6(); //Admin201}202function start() {203 status = -1;204 writeSolaxiaCommands();205 action(1, 0, 0);...

Full Screen

Full Screen

iw_hotkeys.js

Source:iw_hotkeys.js Github

copy

Full Screen

1"use strict";2Game.HotkeyFunctions = {};3Game.RegisterHotkey = function(szKeyName, hFunction)4{5 if ((typeof(szKeyName) === "string") && (typeof(hFunction) === "function"))6 {7 var tHotkeyFunctions = Game.HotkeyFunctions[szKeyName];8 if (!tHotkeyFunctions)9 {10 Game.HotkeyFunctions[szKeyName] = [];11 tHotkeyFunctions = Game.HotkeyFunctions[szKeyName];12 }13 tHotkeyFunctions.push(hFunction);14 }15}16function DispatchHotkeyEvent(szKeyName)17{18 return function()19 {20 var tHotkeyFunctions = Game.HotkeyFunctions[szKeyName];21 if (tHotkeyFunctions)22 {23 for (var k in tHotkeyFunctions)24 {25 var hFunction = tHotkeyFunctions[k];26 if (hFunction() === true)27 break;28 }29 }30 }31}32Game.AddCommand("IcewrackHotkeyF1", DispatchHotkeyEvent("F1"), "", 0);33Game.AddCommand("IcewrackHotkeyF2", DispatchHotkeyEvent("F2"), "", 0);34Game.AddCommand("IcewrackHotkeyF3", DispatchHotkeyEvent("F3"), "", 0);35Game.AddCommand("IcewrackHotkeyF4", DispatchHotkeyEvent("F4"), "", 0);36Game.AddCommand("IcewrackHotkeyF5", DispatchHotkeyEvent("F5"), "", 0);37Game.AddCommand("IcewrackHotkeyF6", DispatchHotkeyEvent("F6"), "", 0);38Game.AddCommand("IcewrackHotkeyF7", DispatchHotkeyEvent("F7"), "", 0);39Game.AddCommand("IcewrackHotkeyF8", DispatchHotkeyEvent("F8"), "", 0);40Game.AddCommand("IcewrackHotkeyF9", DispatchHotkeyEvent("F9"), "", 0);41Game.AddCommand("IcewrackHotkeyF10", DispatchHotkeyEvent("F10"), "", 0);42Game.AddCommand("IcewrackHotkeyF11", DispatchHotkeyEvent("F11"), "", 0);43Game.AddCommand("IcewrackHotkeyF12", DispatchHotkeyEvent("F12"), "", 0);44Game.AddCommand("IcewrackHotkeySpace", DispatchHotkeyEvent("SPACE"), "", 0);45Game.AddCommand("IcewrackHotkey1", DispatchHotkeyEvent("1"), "", 0);46Game.AddCommand("IcewrackHotkey2", DispatchHotkeyEvent("2"), "", 0);47Game.AddCommand("IcewrackHotkey3", DispatchHotkeyEvent("3"), "", 0);48Game.AddCommand("IcewrackHotkey4", DispatchHotkeyEvent("4"), "", 0);49Game.AddCommand("IcewrackHotkey5", DispatchHotkeyEvent("5"), "", 0);50Game.AddCommand("IcewrackHotkey6", DispatchHotkeyEvent("6"), "", 0);51Game.AddCommand("IcewrackHotkey7", DispatchHotkeyEvent("7"), "", 0);52Game.AddCommand("IcewrackHotkey8", DispatchHotkeyEvent("8"), "", 0);53Game.AddCommand("IcewrackHotkey9", DispatchHotkeyEvent("9"), "", 0);54Game.AddCommand("IcewrackHotkey0", DispatchHotkeyEvent("0"), "", 0);55Game.AddCommand("IcewrackHotkeyTidle", DispatchHotkeyEvent("`"), "", 0);56/*Game.AddCommand("IcewrackSelectParty1", WrapHotkeyFunction("OnPartyMemberSelectHotkey", 1), "", 0);57Game.AddCommand("IcewrackSelectParty2", WrapHotkeyFunction("OnPartyMemberSelectHotkey", 2), "", 0);58Game.AddCommand("IcewrackSelectParty3", WrapHotkeyFunction("OnPartyMemberSelectHotkey", 4), "", 0);59Game.AddCommand("IcewrackSelectParty4", WrapHotkeyFunction("OnPartyMemberSelectHotkey", 8), "", 0);60Game.AddCommand("IcewrackSelectAll", WrapHotkeyFunction("OnPartyMemberSelectHotkey", 15), "", 0);61Game.AddCommand("IcewrackPauseGame", WrapHotkeyFunction("OnPauseHotkey"), "", 0);62Game.AddCommand("IcewrackActionBar1", WrapHotkeyFunction("OnActionBarHotkey", 1), "", 0);63Game.AddCommand("IcewrackActionBar2", WrapHotkeyFunction("OnActionBarHotkey", 2), "", 0);64Game.AddCommand("IcewrackActionBar3", WrapHotkeyFunction("OnActionBarHotkey", 3), "", 0);65Game.AddCommand("IcewrackActionBar4", WrapHotkeyFunction("OnActionBarHotkey", 4), "", 0);66Game.AddCommand("IcewrackActionBar5", WrapHotkeyFunction("OnActionBarHotkey", 5), "", 0);67Game.AddCommand("IcewrackActionBar6", WrapHotkeyFunction("OnActionBarHotkey", 6), "", 0);68Game.AddCommand("IcewrackActionBar7", WrapHotkeyFunction("OnActionBarHotkey", 7), "", 0);69Game.AddCommand("IcewrackActionBar8", WrapHotkeyFunction("OnActionBarHotkey", 8), "", 0);70Game.AddCommand("IcewrackActionBar9", WrapHotkeyFunction("OnActionBarHotkey", 9), "", 0);71Game.AddCommand("IcewrackActionBar0", WrapHotkeyFunction("OnActionBarHotkey", 10), "", 0);72Game.AddCommand("IcewrackQuicksave", WrapHotkeyFunction("OnQuicksaveHotkey"), "", 0);...

Full Screen

Full Screen

Controller.js

Source:Controller.js Github

copy

Full Screen

...6 init : function ()7 {8 this._super();9 // View Change Event10 this.addCommand(ViewChangeEvent.VIEW_HOME_MODULE, ViewHomeModuleCommand);11 this.addCommand(ViewChangeEvent.VIEW_EXERCISE_MODULE, ViewExerciseModuleCommand);12 this.addCommand(ViewChangeEvent.VIEW_EVALUATION_MODULE, ViewEvaluationModuleCommand);13 this.addCommand(ViewChangeEvent.VIEW_SUBTITLE_MODULE, ViewSubtitleModuleCommand);14 this.addCommand(ViewChangeEvent.VIEW_ABOUT_MODULE, ViewAboutModuleCommand);15 this.addCommand(ViewChangeEvent.VIEW_CONFIG_MODULE, ViewConfigModuleCommand);16 this.addCommand(ViewChangeEvent.VIEW_REGISTER_MODULE, ViewRegisterModuleCommand);17 this.addCommand(ViewChangeEvent.VIEW_LOGIN_POPUP, ToggleLoginPopupCommand);18 19 // On popstate event20 this.addCommand(ViewChangeEvent.RELOAD_STATE, ReloadStateCommand);21 22 // User management23 this.addCommand(LoginEvent.PROCESS_LOGIN, ProcessLoginCommand);24 this.addCommand(LoginEvent.SIGN_OUT, SignOutCommand);25 26 // Home module27 this.addCommand(HomepageEvent.LATEST_USER_UPLOADED_VIDEOS, LatestUploadedVideosCommand);28 this.addCommand(HomepageEvent.BEST_RATED_VIDEOS_SIGNED_IN, SignedBestVideosCommand);29 this.addCommand(HomepageEvent.LATEST_USER_ACTIVITY, LatestUserActivityCommand);30 31 // Exercise module32 this.addCommand(ExerciseEvent.EXERCISE_SELECTED, ExerciseSelectedCommand);33 this.addCommand(ExerciseEvent.GET_RECORDABLE_EXERCISES, GetRecordableExercisesCommand);34 this.addCommand(ExerciseEvent.REC_START, StartRecordingCommand);35 this.addCommand(ExerciseEvent.RECORDING_ABORTED, RecordingAbortedCommand);36 this.addCommand(ExerciseEvent.SAVE_RESPONSE, SaveResponseCommand);37 this.addCommand(ExerciseEvent.WATCH_RESPONSE, WatchResponseCommand);38 this.addCommand(ExerciseEvent.RECORD_AGAIN, RecordAgainCommand);39 40 // Configuration module41 this.addCommand(ConfigurationEvent.VIEW_MIC_TESTER, ViewMicTesterCommand);42 this.addCommand(ConfigurationEvent.VIEW_WEBCAM_TESTER, ViewWebcamTesterCommand);43 44 // Evaluation module45 this.addCommand(EvaluationEvent.VIEW_PENDING_ASSESMENTS, ViewPendingAssesmentsCommand);46 this.addCommand(EvaluationEvent.VIEW_CURRENTLY_ASSESSED_TO_USER, ViewCurrentlyAssessedToUserCommand);47 this.addCommand(EvaluationEvent.VIEW_CURRENTLY_ASSESSED_BY_USER, ViewCurrentlyAssessedByUserCommand);48 this.addCommand(EvaluationEvent.VIEW_ASSESSED_ASSESMENT, ViewAssessedAssesmentCommand);49 this.addCommand(EvaluationEvent.VIEW_REVISION_ASSESMENT, ViewRevisedAssesmentCommand);50 this.addCommand(EvaluationEvent.VIEW_EVALUATION_ASSESMENT, ViewEvaluationAssesmentCommand);51 this.addCommand(EvaluationEvent.RESET_EVALUATION_FORM_DATA, ResetEvaluationFormDataCommand);52 this.addCommand(EvaluationEvent.SEND_EVALUATION_FORM_DATA, SendEvaluationDataCommand);53 54 //Register module55 this.addCommand(RegisterEvent.REGISTER_USER, RegisterUserCommand);56 this.addCommand(RegisterEvent.ACTIVATE_USER, ActivateUserCommand);57 58 // Locale Event59 this.addCommand(LocaleEvent.CHANGE, LocaleChangedCommand);60 }...

Full Screen

Full Screen

index.js

Source:index.js Github

copy

Full Screen

...21import menuList from './commands/menu';22import ulStats from './commands/ulStats';23const client = new Client();24// Roleplay25client.addCommand(['hentai'], hentaiCommand);26client.addCommand(['h', 'hug'], hugCommand);27client.addCommand(['kiss'], kissCommand);28client.addCommand(['slap'], slapCommand);29client.addCommand(['cum'], cumCommand);30client.addCommand(['fuck'], fuckCommand);31client.addCommand(['anal'], analCommand);32client.addCommand(['baka'], bakaCommand);33client.addCommand(['pat'], patCommand);34client.addCommand(['neko'], nekoCommand);35client.addCommand(['punch'], punchCommand);36client.addCommand(['cry'], cryCommand);37client.addCommand(['blowjob', 'bj'], blowjobCommand);38// Media39client.addCommand(['sticker'], stickerCommand);40client.addCommand(['image'], imageCommand);41client.addCommand(['play'], playCommand);42client.addCommand(['attp'], attpCommand);43// Saved videos/audios44client.addCommand(['fabri'], fabriMedia);45client.addCommand(['woreti'], woretiMedia);46// Lists/Menus47client.addCommand(['menu', 'list', 'help'], menuList);48// NSFW49// User/server stats50client.addCommand(['ul', 'gduser'], ulStats);...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1Cypress.Commands.add("login", (email, password) => {2 cy.get('input[name="email"]').type(email);3 cy.get('input[name="password"]').type(password);4 cy.get('button[type="submit"]').click();5});6describe("Login", () => {7 it("Login", () => {8 cy.login("

Full Screen

Using AI Code Generation

copy

Full Screen

1describe('My First Test', () => {2 it('Does not do much!', () => {3 cy.contains('type').click()4 cy.url().should('include', '/commands/actions')5 cy.get('.action-email')6 .type('

Full Screen

Using AI Code Generation

copy

Full Screen

1Cypress.Commands.add("login", (email, password) => { 2 cy.get(".action-email").type(email);3 cy.get(".action-password").type(password);4 cy.get(".action-form").submit();5});6Cypress.Commands.add("login", (email, password) => { 7 cy.get(".action-email").type(email);8 cy.get(".action-password").type(password);9 cy.get(".action-form").submit();10});11describe("My First Test", () => {12 it("Does not do much!", () => {13 cy.login("email", "password");14 });15});16describe("My First Test", () => {17 it("Does not do much!", () => {18 cy.login("email", "password");19 });20});21describe("My First Test", () => {22 it("Does not do much!", () => {23 cy.login("email", "password");24 });25});26describe("My First Test", () => {27 it("Does not do much!", () => {28 cy.login("email", "password");29 });30});31describe("My First Test", () => {32 it("Does not do much!", () => {33 cy.login("email", "password");34 });35});36describe("My First Test", () => {37 it("Does not do much!", () => {38 cy.login("email", "password");39 });40});41describe("My First Test", () => {42 it("Does not do much!", () => {43 cy.login("email", "password");44 });45});46describe("My First Test", () => {

Full Screen

Using AI Code Generation

copy

Full Screen

1Cypress.Commands.add('login', (email, password) => {2 cy.visit('localhost:3000');3 cy.get('#email').type(email);4 cy.get('#password').type(password);5 cy.get('button').click();6});7describe('Login', () => {8 it('should login user', () => {9 cy.login('

Full Screen

Using AI Code Generation

copy

Full Screen

1Cypress.Commands.add('login', (email, password) => {2 cy.get('#email').type(email)3 cy.get('#password').type(password)4 cy.get('#login').click()5})6it('login', () => {7 cy.login('

Full Screen

Using AI Code Generation

copy

Full Screen

1Cypress.Commands.add('login', (email, password) => {2 cy.get('#email').type(email);3 cy.get('#password').type(password);4 cy.get('#login').click();5});6describe('Login test', () => {7 it('should login successfully', () => {8 cy.login('

Full Screen

Using AI Code Generation

copy

Full Screen

1Cypress.Commands.add("login", (email, password) => {2 cy.get("#user_login").type(email);3 cy.get("#user_password").type(password);4 cy.contains("Sign in").click();5});6Cypress.Commands.add("login", (email, password) => {7 cy.get("#user_login").type(email);8 cy.get("#user_password").type(password);9 cy.contains("Sign in").click();10});11Cypress.Commands.add("login", (email, password) => {12 cy.get("#user_login").type(email);13 cy.get("#user_password").type(password);14 cy.contains("Sign in").click();15});16Cypress.Commands.add("

Full Screen

Cypress Tutorial

Cypress is a renowned Javascript-based open-source, easy-to-use end-to-end testing framework primarily used for testing web applications. Cypress is a relatively new player in the automation testing space and has been gaining much traction lately, as evidenced by the number of Forks (2.7K) and Stars (42.1K) for the project. LambdaTest’s Cypress Tutorial covers step-by-step guides that will help you learn from the basics till you run automation tests on LambdaTest.

Chapters:

  1. What is Cypress? -
  2. Why Cypress? - Learn why Cypress might be a good choice for testing your web applications.
  3. Features of Cypress Testing - Learn about features that make Cypress a powerful and flexible tool for testing web applications.
  4. Cypress Drawbacks - Although Cypress has many strengths, it has a few limitations that you should be aware of.
  5. Cypress Architecture - Learn more about Cypress architecture and how it is designed to be run directly in the browser, i.e., it does not have any additional servers.
  6. Browsers Supported by Cypress - Cypress is built on top of the Electron browser, supporting all modern web browsers. Learn browsers that support Cypress.
  7. Selenium vs Cypress: A Detailed Comparison - Compare and explore some key differences in terms of their design and features.
  8. Cypress Learning: Best Practices - Take a deep dive into some of the best practices you should use to avoid anti-patterns in your automation tests.
  9. How To Run Cypress Tests on LambdaTest? - Set up a LambdaTest account, and now you are all set to learn how to run Cypress tests.

Certification

You can elevate your expertise with end-to-end testing using the Cypress automation framework and stay one step ahead in your career by earning a Cypress certification. Check out our Cypress 101 Certification.

YouTube

Watch this 3 hours of complete tutorial to learn the basics of Cypress and various Cypress commands with the Cypress testing at LambdaTest.

Run Cypress automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful