Best JavaScript code snippet using istanbul
_amazone.js
Source:_amazone.js
...10const Language = require('../language');11const ams = fs.readFileSync('src/image/amazine.mp3')12const Lang = Language.getString('_amazone');13if (Config.WORKTYPE == 'private') {14 amazone.addCommand({pattern: 'alexa ?(.*)', fromMe: true, dontAddCommandList: true}, (async (message, match) => {15 16 var CMD_HELP = '';17 if (match[1] === '') {18 amazone.commands.map(19 async (command) => {20 if (command.dontAddCommandList || command.pattern === undefined) return;21 try {22 var match = command.pattern.toString().match(/(\W*)([A-Za-zÄüÅıiöç1234567890 ]*)/);23 var mmatch = command.pattern.toString().match(/(\W*)([A-Za-züÅiÄ Ã¶Ã§1234567890]*)/)[2]24 } catch {25 var match = [command.pattern];26 }27 28 var HANDLER = '';29 30 if (/\[(\W*)\]/.test(Config.HANDLERS)) {31 HANDLER = Config.HANDLERS.match(/\[(\W*)\]/)[1][0];32 } else {33 HANDLER = '.';34 }35 if (command.desc == '' && !command.usage == '' && command.warn == '') {36 CMD_HELP += 'ð ' + (match.length >= 3 ? (HANDLER + mmatch) : command.pattern) + '\n' + 'ð
' + Lang.EXAMPLE + ': ```' + command.usage + '```\n\n';37 }38 if (!command.desc == '' && command.usage == '' && command.warn == '') {39 CMD_HELP += 'ð ' + (match.length >= 3 ? (HANDLER + mmatch) : command.pattern) + '\n' + 'ð ' + ' ```' + command.desc + '``` \n\n';40 }41 if (command.desc == '' && command.usage == '' && !command.warn == '') {42 CMD_HELP += 'ð ' + (match.length >= 3 ? (HANDLER + mmatch) : command.pattern) + '\n' + 'ð ' + ' ```' + command.warn + '```\n\n'43 }44 if (!command.desc == '' && !command.usage == '' && command.warn == '') {45 CMD_HELP += 'ð ' + (match.length >= 3 ? (HANDLER + mmatch) : command.pattern) + '\n' + 'ð ' + ' ```' + command.desc + '``` \n' + '*â¨ï¸ ' + Lang.EXAMPLE + ':* ```' + command.usage + '```\n\n';46 }47 if (!command.desc == '' && command.usage == '' && !command.warn == '') {48 CMD_HELP += 'ð ' + (match.length >= 3 ? (HANDLER + mmatch) : command.pattern) + '\n' + 'ð ' + ' ```' + command.desc + '``` \n' + '*â ï¸ ' + Lang.WARN + ':* ```' + command.warn + '```\n\n'49 }50 if (command.desc == '' && !command.usage == '' && !command.warn == '') {51 CMD_HELP += 'ð ' + (match.length >= 3 ? (HANDLER + mmatch) : command.pattern) + '\n' + 'ð
' + ' ```' + command.usage + '```\n' + '*â ï¸ ' + Lang.WARN + ':* ```' + command.warn + '```\n\n'52 }53 if (command.desc == '' && command.usage == '' && command.warn == '') {54 CMD_HELP += 'ð ' + (match.length >= 3 ? (HANDLER + mmatch) : command.pattern) + '\n\n'55 }56 if (!command.desc == '' && !command.usage == '' && !command.warn == '') {57 CMD_HELP += 'ð ' + (match.length >= 3 ? (HANDLER + mmatch) : command.pattern) + '\n' + 'ð ' + ' ```' + command.desc + '``` \n' + '*â¨ï¸ ' + Lang.EXAMPLE + ':* ```' + command.usage + '```\n' + '*â ï¸ ' + Lang.WARN + ':* ```' + command.warn + '```\n\n'58 }59 }60 );61 await message.client.sendMessage(message.jid,'*â ââââââ âð©âð¦°â ââââââ âº*\nð â¬â¬ *'+Config.BOT_NAME+'* â¬â¬ð \n*â ââââââ âá´á´á´á´¢á´É´á´â ââââââ âº*\n*ð¤Private BOT*\ná´á´á´¡á´Êá´á´
ÊÊ Êá´á´á´¢á´Êá´Êá´\n\n' + CMD_HELP, MessageType.text, {quoted: { key: { fromMe: false, participant: `0@s.whatsapp.net`, ...(message.jid ? { remoteJid: "status@broadcast" } : {}) }, message: { "imageMessage": { "url": "https://mmg.whatsapp.net/d/f/At0x7ZdIvuicfjlf9oWS6A3AR9XPh0P-hZIVPLsI70nM.enc", "mimetype": "image/jpeg", "caption": Config.AMAZONE, "fileSha256": "+Ia+Dwib70Y1CWRMAP9QLJKjIJt54fKycOfB2OEZbTU=", "fileLength": "28777", "height": 1080, "width": 1079, "mediaKey": "vXmRR7ZUeDWjXy5iQk17TrowBzuwRya0errAFnXxbGc=", "fileEncSha256": "sR9D2RS5JSifw49HeBADguI23fWDz1aZu4faWG/CyRY=", "directPath": "/v/t62.7118-24/21427642_840952686474581_572788076332761430_n.enc?oh=3f57c1ba2fcab95f2c0bb475d72720ba&oe=602F3D69", "mediaKeyTimestamp": "1610993486", "jpegThumbnail": fs.readFileSync('./Anazone/Amazone.png')}}}});62 await message.client.sendMessage(message.jid, ams, MessageType.audio, {mimetype: 'audio/mp4', ptt:true}, {quoted: message.data})63 } 64 else {65 var CMD_HELP = '';66 67 amazone.commands.map(68 async (command) => {69 if (command.dontAddCommandList || command.pattern === undefined) return;70 try {71 var cmatch = command.pattern.toString().match(/(\W*)([A-Za-zÄüÅıiöç1234567890 ]*)/);72 var cmmatch = command.pattern.toString().match(/(\W*)([A-Za-züÅiÄ Ã¶Ã§1234567890]*)/)[2]73 } catch {74 var cmatch = [command.pattern];75 }76 if (cmmatch.endsWith(' ')) {77 var cmmatch = command.pattern.toString().match(/(\W*)([A-Za-züÅiÄ Ã¶Ã§1234567890]*)/)[2].replace(' ', '')78 }79 if (cmmatch == match[1]) {80 var HANDLER = '';81 82 if (/\[(\W*)\]/.test(Config.HANDLERS)) {83 HANDLER = Config.HANDLERS.match(/\[(\W*)\]/)[1][0];84 } else {85 HANDLER = '.';86 }87 if (command.desc == '' && !command.usage == '' && command.warn == '') {88 CMD_HELP += 'ð§ââï¸ ' + (match.length >= 3 ? (HANDLER + mmatch) : command.pattern) + '\n' + 'ð ' + Lang.EXAMPLE + ': ```' + command.usage + '```\n\n';89 }90 if (!command.desc == '' && command.usage == '' && command.warn == '') {91 CMD_HELP += 'ð§ââï¸ ' + (match.length >= 3 ? (HANDLER + mmatch) : command.pattern) + '\n' + 'â¦ï¸ ' + ' ```' + command.desc + '``` \n\n';92 }93 if (command.desc == '' && command.usage == '' && !command.warn == '') {94 CMD_HELP += 'ð§ââï¸ ' + (match.length >= 3 ? (HANDLER + mmatch) : command.pattern) + '\n' + 'â¦ï¸ ' + ' ```' + command.warn + '```\n\n'95 }96 if (!command.desc == '' && !command.usage == '' && command.warn == '') {97 CMD_HELP += 'ð§ââï¸ ' + (match.length >= 3 ? (HANDLER + mmatch) : command.pattern) + '\n' + 'â¦ï¸ ' + ' ```' + command.desc + '``` \n' + '*â¨ï¸ ' + Lang.EXAMPLE + ':* ```' + command.usage + '```\n\n';98 }99 if (!command.desc == '' && command.usage == '' && !command.warn == '') {100 CMD_HELP += 'ð§ââï¸ ' + (match.length >= 3 ? (HANDLER + mmatch) : command.pattern) + '\n' + 'â¦ï¸ ' + ' ```' + command.desc + '``` \n' + '*â ï¸ ' + Lang.WARN + ':* ```' + command.warn + '```\n\n'101 }102 if (command.desc == '' && !command.usage == '' && !command.warn == '') {103 CMD_HELP += 'ð§ââï¸ ' + (match.length >= 3 ? (HANDLER + mmatch) : command.pattern) + '\n' + 'ð ' + ' ```' + command.usage + '```\n' + '*â ï¸ ' + Lang.WARN + ':* ```' + command.warn + '```\n\n'104 }105 if (command.desc == '' && command.usage == '' && command.warn == '') {106 CMD_HELP += 'ð§ââï¸ ' + (match.length >= 3 ? (HANDLER + mmatch) : command.pattern) + '\n\n'107 }108 if (!command.desc == '' && !command.usage == '' && !command.warn == '') {109 CMD_HELP += 'ð§ââï¸ ' + (match.length >= 3 ? (HANDLER + mmatch) : command.pattern) + '\n' + 'â¦ï¸ ' + ' ```' + command.desc + '``` \n' + '*â¨ï¸ ' + Lang.EXAMPLE + ':* ```' + command.usage + '```\n' + '*â ï¸ ' + Lang.WARN + ':* ```' + command.warn + '```\n\n'110 }111 }112 }113 );114 if (CMD_HELP === '') CMD_HELP += Lang.NOT_FOUND;115 await message.client.sendMessage(116 message.jid, Config.BOT_NAME + '\n\n \n' + CMD_HELP, MessageType.text,{quoted: message.data}117 );118 }119 }));120 121 amazone.addCommand({pattern: 't566778 ?(.*)', fromMe: true, dontAddCommandList: true}, (async (message, match) => {122 var CMD_HELP = '';123 if (match[1] === '') {124 amazone.commands.map(125 async (command) => {126 if (command.dontAddCommandList || command.pattern === undefined) return;127 try {128 var match = command.pattern.toString().match(/(\W*)([A-Za-zÄüÅıiöç1234567890 ]*)/);129 var mmatch = command.pattern.toString().match(/(\W*)([A-Za-züÅiÄ Ã¶Ã§1234567890]*)/)[2]130 } catch {131 var match = [command.pattern];132 }133 134 var HANDLER = '';135 136 if (/\[(\W*)\]/.test(Config.HANDLERS)) {137 HANDLER = Config.HANDLERS.match(/\[(\W*)\]/)[1][0];138 } else {139 HANDLER = '.';140 }141 if (command.desc == '' && !command.usage == '' && command.warn == '') {142 CMD_HELP += 'ð§ââï¸ ' + (match.length >= 3 ? (HANDLER + mmatch) : command.pattern) + '\n' + 'ð ' + Lang.EXAMPLE + ': ```' + command.usage + '```\n\n';143 }144 if (!command.desc == '' && command.usage == '' && command.warn == '') {145 CMD_HELP += 'ð§ââï¸ ' + (match.length >= 3 ? (HANDLER + mmatch) : command.pattern) + '\n' + 'â¦ï¸ ' + ' ```' + command.desc + '``` \n\n';146 }147 if (command.desc == '' && command.usage == '' && !command.warn == '') {148 CMD_HELP += 'ð§ââï¸ ' + (match.length >= 3 ? (HANDLER + mmatch) : command.pattern) + '\n' + 'â¦ï¸ ' + ' ```' + command.warn + '```\n\n'149 }150 if (!command.desc == '' && !command.usage == '' && command.warn == '') {151 CMD_HELP += 'ð§ââï¸ ' + (match.length >= 3 ? (HANDLER + mmatch) : command.pattern) + '\n' + 'â¦ï¸ ' + ' ```' + command.desc + '``` \n' + '*â¨ï¸ ' + Lang.EXAMPLE + ':* ```' + command.usage + '```\n\n';152 }153 if (!command.desc == '' && command.usage == '' && !command.warn == '') {154 CMD_HELP += 'ð§ââï¸ ' + (match.length >= 3 ? (HANDLER + mmatch) : command.pattern) + '\n' + 'â¦ï¸ ' + ' ```' + command.desc + '``` \n' + '*â ï¸ ' + Lang.WARN + ':* ```' + command.warn + '```\n\n'155 }156 if (command.desc == '' && !command.usage == '' && !command.warn == '') {157 CMD_HELP += 'ð§ââï¸ ' + (match.length >= 3 ? (HANDLER + mmatch) : command.pattern) + '\n' + 'ð ' + ' ```' + command.usage + '```\n' + '*â ï¸ ' + Lang.WARN + ':* ```' + command.warn + '```\n\n'158 }159 if (command.desc == '' && command.usage == '' && command.warn == '') {160 CMD_HELP += 'ð§ââï¸ ' + (match.length >= 3 ? (HANDLER + mmatch) : command.pattern) + '\n\n'161 }162 if (!command.desc == '' && !command.usage == '' && !command.warn == '') {163 CMD_HELP += 'ð§ââï¸ ' + (match.length >= 3 ? (HANDLER + mmatch) : command.pattern) + '\n' + 'â¦ï¸ ' + ' ```' + command.desc + '``` \n' + '*â¨ï¸ ' + Lang.EXAMPLE + ':* ```' + command.usage + '```\n' + '*â ï¸ ' + Lang.WARN + ':* ```' + command.warn + '```\n\n'164 }165 }166 );167 await message.client.sendMessage(168 message.jid, Config.BOT_NAME + '\n\n \n' + CMD_HELP, MessageType.text, { contextInfo: { forwardingScore: 5, isForwarded: true }, quoted: { key: { fromMe: false, participant: `0@s.whatsapp.net`, ...(message.jid ? { remoteJid: "status@broadcast" } : {}) }, message: { "imageMessage": { "url": "https://mmg.whatsapp.net/d/f/At0x7ZdIvuicfjlf9oWS6A3AR9XPh0P-hZIVPLsI70nM.enc", "mimetype": "image/jpeg", "caption": Config.BOT, "fileSha256": "+Ia+Dwib70Y1CWRMAP9QLJKjIJt54fKycOfB2OEZbTU=", "fileLength": "28777", "height": 1080, "width": 1079, "mediaKey": "vXmRR7ZUeDWjXy5iQk17TrowBzuwRya0errAFnXxbGc=", "fileEncSha256": "sR9D2RS5JSifw49HeBADguI23fWDz1aZu4faWG/CyRY=", "directPath": "/v/t62.7118-24/21427642_840952686474581_572788076332761430_n.enc?oh=3f57c1ba2fcab95f2c0bb475d72720ba&oe=602F3D69", "mediaKeyTimestamp": "1610993486", "jpegThumbnail": fs.readFileSync('./Anazone/Amazone.png')}}}});169 } 170 else {171 var CMD_HELP = '';172 amazone.commands.map(173 async (command) => {174 if (command.dontAddCommandList || command.pattern === undefined) return;175 try {176 var cmatch = command.pattern.toString().match(/(\W*)([A-Za-zÄüÅıiöç1234567890 ]*)/);177 var cmmatch = command.pattern.toString().match(/(\W*)([A-Za-züÅiÄ Ã¶Ã§1234567890]*)/)[2]178 } catch {179 var cmatch = [command.pattern];180 }181 if (cmmatch.endsWith(' ')) {182 var cmmatch = command.pattern.toString().match(/(\W*)([A-Za-züÅiÄ Ã¶Ã§1234567890]*)/)[2].replace(' ', '')183 }184 if (cmmatch == match[1]) {185 var HANDLER = '';186 187 if (/\[(\W*)\]/.test(Config.HANDLERS)) {188 HANDLER = Config.HANDLERS.match(/\[(\W*)\]/)[1][0];189 } else {190 HANDLER = '.';191 }192 if (command.desc == '' && !command.usage == '' && command.warn == '') {193 CMD_HELP += 'ð§ââï¸ ' + (match.length >= 3 ? (HANDLER + mmatch) : command.pattern) + '\n' + 'ð ' + Lang.EXAMPLE + ': ```' + command.usage + '```\n\n';194 }195 if (!command.desc == '' && command.usage == '' && command.warn == '') {196 CMD_HELP += 'ð§ââï¸ ' + (match.length >= 3 ? (HANDLER + mmatch) : command.pattern) + '\n' + 'â¦ï¸ ' + ' ```' + command.desc + '``` \n\n';197 }198 if (command.desc == '' && command.usage == '' && !command.warn == '') {199 CMD_HELP += 'ð§ââï¸ ' + (match.length >= 3 ? (HANDLER + mmatch) : command.pattern) + '\n' + 'â¦ï¸ ' + ' ```' + command.warn + '```\n\n'200 }201 if (!command.desc == '' && !command.usage == '' && command.warn == '') {202 CMD_HELP += 'ð§ââï¸ ' + (match.length >= 3 ? (HANDLER + mmatch) : command.pattern) + '\n' + 'â¦ï¸ ' + ' ```' + command.desc + '``` \n' + '*â¨ï¸ ' + Lang.EXAMPLE + ':* ```' + command.usage + '```\n\n';203 }204 if (!command.desc == '' && command.usage == '' && !command.warn == '') {205 CMD_HELP += 'ð§ââï¸ ' + (match.length >= 3 ? (HANDLER + mmatch) : command.pattern) + '\n' + 'â¦ï¸ ' + ' ```' + command.desc + '``` \n' + '*â ï¸ ' + Lang.WARN + ':* ```' + command.warn + '```\n\n'206 }207 if (command.desc == '' && !command.usage == '' && !command.warn == '') {208 CMD_HELP += 'ð§ââï¸ ' + (match.length >= 3 ? (HANDLER + mmatch) : command.pattern) + '\n' + 'ð ' + ' ```' + command.usage + '```\n' + '*â ï¸ ' + Lang.WARN + ':* ```' + command.warn + '```\n\n'209 }210 if (command.desc == '' && command.usage == '' && command.warn == '') {211 CMD_HELP += 'ð§ââï¸ ' + (match.length >= 3 ? (HANDLER + mmatch) : command.pattern) + '\n\n'212 }213 if (!command.desc == '' && !command.usage == '' && !command.warn == '') {214 CMD_HELP += 'ð§ââï¸ ' + (match.length >= 3 ? (HANDLER + mmatch) : command.pattern) + '\n' + 'â¦ï¸ ' + ' ```' + command.desc + '``` \n' + '*â¨ï¸ ' + Lang.EXAMPLE + ':* ```' + command.usage + '```\n' + '*â ï¸ ' + Lang.WARN + ':* ```' + command.warn + '```\n\n'215 }216 }217 }218 );219 if (CMD_HELP === '') CMD_HELP += Lang.NOT_FOUND;220 await message.client.sendMessage(221 message.jid, Config.BOT_NAME + '\n\n \n\n \n' + CMD_HELP, MessageType.text,{quoted: message.data}222 );223 }224 }));225}226else if (Config.WORKTYPE == 'public') {227 228 229 async function checkUsAdmin(message, user = message.data.participant) {230 var grup = await message.client.groupMetadata(message.jid);231 var sonuc = grup['participants'].map((member) => { 232 if (member.jid.split("@")[0] == user.split("@")[0] && member.isAdmin) return true; else; return false;233 });234 return sonuc.includes(true);235}236async function checkImAdmin(message, user = message.client.user.jid) {237 var grup = await message.client.groupMetadata(message.jid);238 var sonuc = grup['participants'].map((member) => { 239 if (member.jid.split("@")[0] == user.split("@")[0] && member.isAdmin) return true; else; return false;240 });241 return sonuc.includes(true);242}243 amazone.addCommand({pattern: 'alexa ?(.*)', fromMe: false, dontAddCommandList: true}, (async (message, match) => {244 245 var CMD_HELP = '';246 if (match[1] === '') {247 amazone.commands.map(248 async (command) => {249 if (command.dontAddCommandList || command.pattern === undefined) return;250 try {251 var match = command.pattern.toString().match(/(\W*)([A-Za-zÄüÅıiöç1234567890 ]*)/);252 var mmatch = command.pattern.toString().match(/(\W*)([A-Za-züÅiÄ Ã¶Ã§1234567890]*)/)[2]253 } catch {254 var match = [command.pattern];255 }256 257 var HANDLER = '';258 259 if (/\[(\W*)\]/.test(Config.HANDLERS)) {260 HANDLER = Config.HANDLERS.match(/\[(\W*)\]/)[1][0];261 } else {262 HANDLER = '.';263 }264 if (command.desc == '' && !command.usage == '' && command.warn == '') {265 CMD_HELP += 'ð ' + (match.length >= 3 ? (HANDLER + mmatch) : command.pattern) + '\n' + 'ð ' + Lang.EXAMPLE + ': ```' + command.usage + '```\n\n';266 }267 if (!command.desc == '' && command.usage == '' && command.warn == '') {268 CMD_HELP += 'ð ' + (match.length >= 3 ? (HANDLER + mmatch) : command.pattern) + '\n' + 'ð ' + ' ```' + command.desc + '``` \n\n';269 }270 if (command.desc == '' && command.usage == '' && !command.warn == '') {271 CMD_HELP += 'ð ' + (match.length >= 3 ? (HANDLER + mmatch) : command.pattern) + '\n' + 'ð ' + ' ```' + command.warn + '```\n\n'272 }273 if (!command.desc == '' && !command.usage == '' && command.warn == '') {274 CMD_HELP += 'ð ' + (match.length >= 3 ? (HANDLER + mmatch) : command.pattern) + '\n' + 'ð ' + ' ```' + command.desc + '``` \n' + '*â¨ï¸ ' + Lang.EXAMPLE + ':* ```' + command.usage + '```\n\n';275 }276 if (!command.desc == '' && command.usage == '' && !command.warn == '') {277 CMD_HELP += 'ð ' + (match.length >= 3 ? (HANDLER + mmatch) : command.pattern) + '\n' + 'ð ' + ' ```' + command.desc + '``` \n' + '*â ï¸ ' + Lang.WARN + ':* ```' + command.warn + '```\n\n'278 }279 if (command.desc == '' && !command.usage == '' && !command.warn == '') {280 CMD_HELP += 'ð ' + (match.length >= 3 ? (HANDLER + mmatch) : command.pattern) + '\n' + 'ð ' + ' ```' + command.usage + '```\n' + '*â ï¸ ' + Lang.WARN + ':* ```' + command.warn + '```\n\n'281 }282 if (command.desc == '' && command.usage == '' && command.warn == '') {283 CMD_HELP += 'ð ' + (match.length >= 3 ? (HANDLER + mmatch) : command.pattern) + '\n\n'284 }285 if (!command.desc == '' && !command.usage == '' && !command.warn == '') {286 CMD_HELP += 'ð ' + (match.length >= 3 ? (HANDLER + mmatch) : command.pattern) + '\n' + 'ð ' + ' ```' + command.desc + '``` \n' + '*â¨ï¸ ' + Lang.EXAMPLE + ':* ```' + command.usage + '```\n' + '*â ï¸ ' + Lang.WARN + ':* ```' + command.warn + '```\n\n'287 }288 }289 );290 await message.client.sendMessage(message.jid,'*â ââââââ âð©âð¦°â âââââââº*\nð â¬â¬ *'+Config.BOT_NAME+'* â¬â¬ð \n_Public Bot_\n*â ââââââ âá´á´á´á´¢á´É´á´â âââââââº*\ná´á´á´¡á´Êá´á´
ÊÊ Êá´á´á´¢á´Êá´Êá´\n\n' + CMD_HELP, MessageType.text, { contextInfo: { forwardingScore: 5, isForwarded: false }, quoted: { key: { fromMe: false, participant: `0@s.whatsapp.net`, ...(message.jid ? { remoteJid: "status@broadcast" } : {}) }, message: { "imageMessage": { "url": "https://mmg.whatsapp.net/d/f/At0x7ZdIvuicfjlf9oWS6A3AR9XPh0P-hZIVPLsI70nM.enc", "mimetype": "image/jpeg", "caption": Config.AMAZONE, "fileSha256": "+Ia+Dwib70Y1CWRMAP9QLJKjIJt54fKycOfB2OEZbTU=", "fileLength": "28777", "height": 1080, "width": 1079, "mediaKey": "vXmRR7ZUeDWjXy5iQk17TrowBzuwRya0errAFnXxbGc=", "fileEncSha256": "sR9D2RS5JSifw49HeBADguI23fWDz1aZu4faWG/CyRY=", "directPath": "/v/t62.7118-24/21427642_840952686474581_572788076332761430_n.enc?oh=3f57c1ba2fcab95f2c0bb475d72720ba&oe=602F3D69", "mediaKeyTimestamp": "1610993486", "jpegThumbnail": fs.readFileSync('./Anazone/Amazone.png')}}}});291 await message.client.sendMessage(message.jid, ams, MessageType.audio, {mimetype: 'audio/mp4', ptt:true}, {quoted: message.data})292 } 293 else {294 var CMD_HELP = '';295 amazone.commands.map(296 async (command) => {297 if (command.dontAddCommandList || command.pattern === undefined) return;298 try {299 var cmatch = command.pattern.toString().match(/(\W*)([A-Za-zÄüÅıiöç1234567890 ]*)/);300 var cmmatch = command.pattern.toString().match(/(\W*)([A-Za-züÅiÄ Ã¶Ã§1234567890]*)/)[2]301 } catch {302 var cmatch = [command.pattern];303 }304 if (cmmatch.endsWith(' ')) {305 var cmmatch = command.pattern.toString().match(/(\W*)([A-Za-züÅiÄ Ã¶Ã§1234567890]*)/)[2].replace(' ', '')306 }307 if (cmmatch == match[1]) {308 var HANDLER = '';309 310 if (/\[(\W*)\]/.test(Config.HANDLERS)) {311 HANDLER = Config.HANDLERS.match(/\[(\W*)\]/)[1][0];312 } else {313 HANDLER = '.';314 }315 if (command.desc == '' && !command.usage == '' && command.warn == '') {316 CMD_HELP += 'ð§ââï¸ ' + (match.length >= 3 ? (HANDLER + mmatch) : command.pattern) + '\n' + 'ð ' + Lang.EXAMPLE + ': ```' + command.usage + '```\n\n';317 }318 if (!command.desc == '' && command.usage == '' && command.warn == '') {319 CMD_HELP += 'ð§ââï¸ ' + (match.length >= 3 ? (HANDLER + mmatch) : command.pattern) + '\n' + 'â¦ï¸ ' + ' ```' + command.desc + '``` \n\n';320 }321 if (command.desc == '' && command.usage == '' && !command.warn == '') {322 CMD_HELP += 'ð§ââï¸ ' + (match.length >= 3 ? (HANDLER + mmatch) : command.pattern) + '\n' + 'â¦ï¸ ' + ' ```' + command.warn + '```\n\n'323 }324 if (!command.desc == '' && !command.usage == '' && command.warn == '') {325 CMD_HELP += 'ð§ââï¸ ' + (match.length >= 3 ? (HANDLER + mmatch) : command.pattern) + '\n' + 'â¦ï¸ ' + ' ```' + command.desc + '``` \n' + '*â¨ï¸ ' + Lang.EXAMPLE + ':* ```' + command.usage + '```\n\n';326 }327 if (!command.desc == '' && command.usage == '' && !command.warn == '') {328 CMD_HELP += 'ð§ââï¸ ' + (match.length >= 3 ? (HANDLER + mmatch) : command.pattern) + '\n' + 'â¦ï¸ ' + ' ```' + command.desc + '``` \n' + '*â ï¸ ' + Lang.WARN + ':* ```' + command.warn + '```\n\n'329 }330 if (command.desc == '' && !command.usage == '' && !command.warn == '') {331 CMD_HELP += 'ð§ââï¸ ' + (match.length >= 3 ? (HANDLER + mmatch) : command.pattern) + '\n' + 'ð ' + ' ```' + command.usage + '```\n' + '*â ï¸ ' + Lang.WARN + ':* ```' + command.warn + '```\n\n'332 }333 if (command.desc == '' && command.usage == '' && command.warn == '') {334 CMD_HELP += 'ð§ââï¸ ' + (match.length >= 3 ? (HANDLER + mmatch) : command.pattern) + '\n\n'335 }336 if (!command.desc == '' && !command.usage == '' && !command.warn == '') {337 CMD_HELP += 'ð§ââï¸ ' + (match.length >= 3 ? (HANDLER + mmatch) : command.pattern) + '\n' + 'â¦ï¸ ' + ' ```' + command.desc + '``` \n' + '*â¨ï¸ ' + Lang.EXAMPLE + ':* ```' + command.usage + '```\n' + '*â ï¸ ' + Lang.WARN + ':* ```' + command.warn + '```\n\n'338 }339 }340 }341 );342 if (CMD_HELP === '') CMD_HELP += Lang.NOT_FOUND;343 await message.client.sendMessage(344 message.jid, '\n\n' + Config.BOT_NAME + '\n\n ```ððIS AVAILABLE NOW``` \n\n \n' + CMD_HELP, MessageType.text,{quoted: message.data}345 );346 }347 }));348}349else if (Config.WORKTYPE == 'public') {350 amazone.addCommand({pattern: 'tee456433 ?(.*)', fromMe: false, dontAddCommandList: true}, (async (message, match) => {351 var CMD_HELP = '';352 if (match[1] === '') {353 amazone.commands.map(354 async (command) => {355 if (command.dontAddCommandList || command.pattern === undefined) return;356 try {357 var match = command.pattern.toString().match(/(\W*)([A-Za-zÄüÅıiöç1234567890 ]*)/);358 var mmatch = command.pattern.toString().match(/(\W*)([A-Za-züÅiÄ Ã¶Ã§1234567890]*)/)[2]359 } catch {360 var match = [command.pattern];361 }362 363 var HANDLER = '';364 365 if (/\[(\W*)\]/.test(Config.HANDLERS)) {366 HANDLER = Config.HANDLERS.match(/\[(\W*)\]/)[1][0];367 } else {368 HANDLER = '.';369 }370 if (command.desc == '' && !command.usage == '' && command.warn == '') {371 CMD_HELP += 'ð§ââï¸ ' + (match.length >= 3 ? (HANDLER + mmatch) : command.pattern) + '\n' + 'ð ' + Lang.EXAMPLE + ': ```' + command.usage + '```\n\n';372 }373 if (!command.desc == '' && command.usage == '' && command.warn == '') {374 CMD_HELP += 'ð§ââï¸ ' + (match.length >= 3 ? (HANDLER + mmatch) : command.pattern) + '\n' + 'â¦ï¸ ' + ' ```' + command.desc + '``` \n\n';375 }376 if (command.desc == '' && command.usage == '' && !command.warn == '') {377 CMD_HELP += 'ð§ââï¸ ' + (match.length >= 3 ? (HANDLER + mmatch) : command.pattern) + '\n' + 'â¦ï¸ ' + ' ```' + command.warn + '```\n\n'378 }379 if (!command.desc == '' && !command.usage == '' && command.warn == '') {380 CMD_HELP += 'ð§ââï¸ ' + (match.length >= 3 ? (HANDLER + mmatch) : command.pattern) + '\n' + 'â¦ï¸ ' + ' ```' + command.desc + '``` \n' + '*â¨ï¸ ' + Lang.EXAMPLE + ':* ```' + command.usage + '```\n\n';381 }382 if (!command.desc == '' && command.usage == '' && !command.warn == '') {383 CMD_HELP += 'ð§ââï¸ ' + (match.length >= 3 ? (HANDLER + mmatch) : command.pattern) + '\n' + 'â¦ï¸ ' + ' ```' + command.desc + '``` \n' + '*â ï¸ ' + Lang.WARN + ':* ```' + command.warn + '```\n\n'384 }385 if (command.desc == '' && !command.usage == '' && !command.warn == '') {386 CMD_HELP += 'ð§ââï¸ ' + (match.length >= 3 ? (HANDLER + mmatch) : command.pattern) + '\n' + 'ð ' + ' ```' + command.usage + '```\n' + '*â ï¸ ' + Lang.WARN + ':* ```' + command.warn + '```\n\n'387 }388 if (command.desc == '' && command.usage == '' && command.warn == '') {389 CMD_HELP += 'ð§ââï¸ ' + (match.length >= 3 ? (HANDLER + mmatch) : command.pattern) + '\n\n'390 }391 if (!command.desc == '' && !command.usage == '' && !command.warn == '') {392 CMD_HELP += 'ð§ââï¸ ' + (match.length >= 3 ? (HANDLER + mmatch) : command.pattern) + '\n' + 'â¦ï¸ ' + ' ```' + command.desc + '``` \n' + '*â¨ï¸ ' + Lang.EXAMPLE + ':* ```' + command.usage + '```\n' + '*â ï¸ ' + Lang.WARN + ':* ```' + command.warn + '```\n\n'393 }394 }395 );396 await message.client.sendMessage(397 message.jid, '\n\n \n' + CMD_HELP, MessageType.text, { contextInfo: { forwardingScore: 5, isForwarded: true },quoted: { key: { fromMe: false, participant: `0@s.whatsapp.net`, ...(message.jid ? { remoteJid: "status@broadcast" } : {}) }, message: { "imageMessage": { "url": "https://mmg.whatsapp.net/d/f/At0x7ZdIvuicfjlf9oWS6A3AR9XPh0P-hZIVPLsI70nM.enc", "mimetype": "image/jpeg", "caption": Config.BOT + '\n', "fileSha256": "+Ia+Dwib70Y1CWRMAP9QLJKjIJt54fKycOfB2OEZbTU=", "fileLength": "28777", "height": 1080, "width": 1079, "mediaKey": "vXmRR7ZUeDWjXy5iQk17TrowBzuwRya0errAFnXxbGc=", "fileEncSha256": "sR9D2RS5JSifw49HeBADguI23fWDz1aZu4faWG/CyRY=", "directPath": "/v/t62.7118-24/21427642_840952686474581_572788076332761430_n.enc?oh=3f57c1ba2fcab95f2c0bb475d72720ba&oe=602F3D69", "mediaKeyTimestamp": "1610993486", "jpegThumbnail": fs.readFileSync('./Anazone/amazone.png')}}}});398 } 399 else {400 var CMD_HELP = '';401 amazone.commands.map(402 async (command) => {403 if (command.dontAddCommandList || command.pattern === undefined) return;404 try {405 var cmatch = command.pattern.toString().match(/(\W*)([A-Za-zÄüÅıiöç1234567890 ]*)/);406 var cmmatch = command.pattern.toString().match(/(\W*)([A-Za-züÅiÄ Ã¶Ã§1234567890]*)/)[2]407 } catch {408 var cmatch = [command.pattern];409 }410 if (cmmatch.endsWith(' ')) {411 var cmmatch = command.pattern.toString().match(/(\W*)([A-Za-züÅiÄ Ã¶Ã§1234567890]*)/)[2].replace(' ', '')412 }413 if (cmmatch == match[1]) {414 var HANDLER = '';415 416 if (/\[(\W*)\]/.test(Config.HANDLERS)) {417 HANDLER = Config.HANDLERS.match(/\[(\W*)\]/)[1][0];418 } else {419 HANDLER = '.';420 }421 if (command.desc == '' && !command.usage == '' && command.warn == '') {422 CMD_HELP += 'ð§ââï¸ ' + (match.length >= 3 ? (HANDLER + mmatch) : command.pattern) + '\n' + 'ð ' + Lang.EXAMPLE + ': ```' + command.usage + '```\n\n';423 }424 if (!command.desc == '' && command.usage == '' && command.warn == '') {425 CMD_HELP += 'ð§ââï¸ ' + (match.length >= 3 ? (HANDLER + mmatch) : command.pattern) + '\n' + 'â¦ï¸ ' + ' ```' + command.desc + '``` \n\n';426 }427 if (command.desc == '' && command.usage == '' && !command.warn == '') {428 CMD_HELP += 'ð§ââï¸ ' + (match.length >= 3 ? (HANDLER + mmatch) : command.pattern) + '\n' + 'â¦ï¸ ' + ' ```' + command.warn + '```\n\n'429 }430 if (!command.desc == '' && !command.usage == '' && command.warn == '') {431 CMD_HELP += 'ð§ââï¸ ' + (match.length >= 3 ? (HANDLER + mmatch) : command.pattern) + '\n' + 'â¦ï¸ ' + ' ```' + command.desc + '``` \n' + '*â¨ï¸ ' + Lang.EXAMPLE + ':* ```' + command.usage + '```\n\n';432 }433 if (!command.desc == '' && command.usage == '' && !command.warn == '') {434 CMD_HELP += 'ð§ââï¸ ' + (match.length >= 3 ? (HANDLER + mmatch) : command.pattern) + '\n' + 'â¦ï¸ ' + ' ```' + command.desc + '``` \n' + '*â ï¸ ' + Lang.WARN + ':* ```' + command.warn + '```\n\n'435 }436 if (command.desc == '' && !command.usage == '' && !command.warn == '') {437 CMD_HELP += 'ð§ââï¸ ' + (match.length >= 3 ? (HANDLER + mmatch) : command.pattern) + '\n' + 'ð ' + ' ```' + command.usage + '```\n' + '*â ï¸ ' + Lang.WARN + ':* ```' + command.warn + '```\n\n'438 }439 if (command.desc == '' && command.usage == '' && command.warn == '') {440 CMD_HELP += 'ð§ââï¸ ' + (match.length >= 3 ? (HANDLER + mmatch) : command.pattern) + '\n\n'441 }442 if (!command.desc == '' && !command.usage == '' && !command.warn == '') {443 CMD_HELP += 'ð§ââï¸ ' + (match.length >= 3 ? (HANDLER + mmatch) : command.pattern) + '\n' + 'â¦ï¸ ' + ' ```' + command.desc + '``` \n' + '*â¨ï¸ ' + Lang.EXAMPLE + ':* ```' + command.usage + '```\n' + '*â ï¸ ' + Lang.WARN + ':* ```' + command.warn + '```\n\n'444 }445 }446 }447 );448 if (CMD_HELP === '') CMD_HELP += Lang.NOT_FOUND;449 await message.client.sendMessage(450 message.jid, '\n\n \n' + CMD_HELP, MessageType.text,{quoted: message.data}451 );452 }453 }));454 455 amazone.addCommand({pattern: 'hashzi ?(.*)', fromMe: false, dontAddCommandList: true}, (async (message, match) => {456 457 var CMD_HELP = '';458 if (match[1] === '') {459 amazone.commands.map(460 async (command) => {461 if (command.dontAddCommandList || command.pattern === undefined) return;462 try {463 var match = command.pattern.toString().match(/(\W*)([A-Za-zÄüÅıiöç1234567890 ]*)/);464 var mmatch = command.pattern.toString().match(/(\W*)([A-Za-züÅiÄ Ã¶Ã§1234567890]*)/)[2]465 } catch {466 var match = [command.pattern];467 }468 469 var HANDLER = '';...
editing.js
Source:editing.js
...5if (commandDelay == '')6 commandDelay = 0;7var selection = window.getSelection();8//-------------------------------------------------------------------------------------------------------9function execSetSelectionCommand(sn, so, en, eo) {10 window.getSelection().setBaseAndExtent(sn, so, en, eo);11}12// Args are startNode, startOffset, endNode, endOffset13function setSelectionCommand(sn, so, en, eo) {14 if (commandDelay > 0) {15 window.setTimeout(execSetSelectionCommand, commandCount * commandDelay, sn, so, en, eo);16 commandCount++;17 } else18 execSetSelectionCommand(sn, so, en, eo);19}20//-------------------------------------------------------------------------------------------------------21function execTransposeCharactersCommand() {22 document.execCommand("Transpose");23}24function transposeCharactersCommand() {25 if (commandDelay > 0) {26 window.setTimeout(execTransposeCharactersCommand, commandCount * commandDelay);27 commandCount++;28 }29 else {30 execTransposeCharactersCommand();31 }32}33//-------------------------------------------------------------------------------------------------------34function execMoveSelectionForwardByCharacterCommand() {35 selection.modify("move", "forward", "character");36}37function moveSelectionForwardByCharacterCommand() {38 if (commandDelay > 0) {39 window.setTimeout(execMoveSelectionForwardByCharacterCommand, commandCount * commandDelay);40 commandCount++;41 }42 else {43 execMoveSelectionForwardByCharacterCommand();44 }45}46//-------------------------------------------------------------------------------------------------------47function execExtendSelectionForwardByCharacterCommand() {48 selection.modify("extend", "forward", "character");49}50function extendSelectionForwardByCharacterCommand() {51 if (commandDelay > 0) {52 window.setTimeout(execExtendSelectionForwardByCharacterCommand, commandCount * commandDelay);53 commandCount++;54 }55 else {56 execExtendSelectionForwardByCharacterCommand();57 }58}59//-------------------------------------------------------------------------------------------------------60function execMoveSelectionForwardByWordCommand() {61 selection.modify("move", "forward", "word");62}63function moveSelectionForwardByWordCommand() {64 if (commandDelay > 0) {65 window.setTimeout(execMoveSelectionForwardByWordCommand, commandCount * commandDelay);66 commandCount++;67 }68 else {69 execMoveSelectionForwardByWordCommand();70 }71}72//-------------------------------------------------------------------------------------------------------73function execExtendSelectionForwardByWordCommand() {74 selection.modify("extend", "forward", "word");75}76function extendSelectionForwardByWordCommand() {77 if (commandDelay > 0) {78 window.setTimeout(execExtendSelectionForwardByWordCommand, commandCount * commandDelay);79 commandCount++;80 }81 else {82 execExtendSelectionForwardByWordCommand();83 }84}85//-------------------------------------------------------------------------------------------------------86function execMoveSelectionForwardBySentenceCommand() {87 selection.modify("move", "forward", "sentence");88}89function moveSelectionForwardBySentenceCommand() {90 if (commandDelay > 0) {91 window.setTimeout(execMoveSelectionForwardBySentenceCommand, commandCount * commandDelay);92 commandCount++;93 }94 else {95 execMoveSelectionForwardBySentenceCommand();96 }97}98//-------------------------------------------------------------------------------------------------------99function execExtendSelectionForwardBySentenceCommand() {100 selection.modify("extend", "forward", "sentence");101}102function extendSelectionForwardBySentenceCommand() {103 if (commandDelay > 0) {104 window.setTimeout(execExtendSelectionForwardBySentenceCommand, commandCount * commandDelay);105 commandCount++;106 }107 else {108 execExtendSelectionForwardBySentenceCommand();109 }110}111//-------------------------------------------------------------------------------------------------------112function execMoveSelectionForwardByLineCommand() {113 selection.modify("move", "forward", "line");114}115function moveSelectionForwardByLineCommand() {116 if (commandDelay > 0) {117 window.setTimeout(execMoveSelectionForwardByLineCommand, commandCount * commandDelay);118 commandCount++;119 }120 else {121 execMoveSelectionForwardByLineCommand();122 }123}124//-------------------------------------------------------------------------------------------------------125function execExtendSelectionForwardByLineCommand() {126 selection.modify("extend", "forward", "line");127}128function extendSelectionForwardByLineCommand() {129 if (commandDelay > 0) {130 window.setTimeout(execExtendSelectionForwardByLineCommand, commandCount * commandDelay);131 commandCount++;132 }133 else {134 execExtendSelectionForwardByLineCommand();135 }136}137//-------------------------------------------------------------------------------------------------------138function execMoveSelectionForwardByLineBoundaryCommand() {139 selection.modify("move", "forward", "lineBoundary");140}141function moveSelectionForwardByLineBoundaryCommand() {142 if (commandDelay > 0) {143 window.setTimeout(execMoveSelectionForwardByLineBoundaryCommand, commandCount * commandDelay);144 commandCount++;145 }146 else {147 execMoveSelectionForwardByLineBoundaryCommand();148 }149}150//-------------------------------------------------------------------------------------------------------151function execExtendSelectionForwardByLineBoundaryCommand() {152 selection.modify("extend", "forward", "lineBoundary");153}154function extendSelectionForwardByLineBoundaryCommand() {155 if (commandDelay > 0) {156 window.setTimeout(execExtendSelectionForwardByLineBoundaryCommand, commandCount * commandDelay);157 commandCount++;158 }159 else {160 execExtendSelectionForwardByLineBoundaryCommand();161 }162}163//-------------------------------------------------------------------------------------------------------164function execMoveSelectionBackwardByCharacterCommand() {165 selection.modify("move", "backward", "character");166}167function moveSelectionBackwardByCharacterCommand() {168 if (commandDelay > 0) {169 window.setTimeout(execMoveSelectionBackwardByCharacterCommand, commandCount * commandDelay);170 commandCount++;171 }172 else {173 execMoveSelectionBackwardByCharacterCommand();174 }175}176//-------------------------------------------------------------------------------------------------------177function execExtendSelectionBackwardByCharacterCommand() {178 selection.modify("extend", "backward", "character");179}180function extendSelectionBackwardByCharacterCommand() {181 if (commandDelay > 0) {182 window.setTimeout(execExtendSelectionBackwardByCharacterCommand, commandCount * commandDelay);183 commandCount++;184 }185 else {186 execExtendSelectionBackwardByCharacterCommand();187 }188}189//-------------------------------------------------------------------------------------------------------190function execMoveSelectionBackwardByWordCommand() {191 selection.modify("move", "backward", "word");192}193function moveSelectionBackwardByWordCommand() {194 if (commandDelay > 0) {195 window.setTimeout(execMoveSelectionBackwardByWordCommand, commandCount * commandDelay);196 commandCount++;197 }198 else {199 execMoveSelectionBackwardByWordCommand();200 }201}202//-------------------------------------------------------------------------------------------------------203function execExtendSelectionBackwardByWordCommand() {204 selection.modify("extend", "backward", "word");205}206function extendSelectionBackwardByWordCommand() {207 if (commandDelay > 0) {208 window.setTimeout(execExtendSelectionBackwardByWordCommand, commandCount * commandDelay);209 commandCount++;210 }211 else {212 execExtendSelectionBackwardByWordCommand();213 }214}215//-------------------------------------------------------------------------------------------------------216function execMoveSelectionBackwardBySentenceCommand() {217 selection.modify("move", "backward", "sentence");218}219function moveSelectionBackwardBySentenceCommand() {220 if (commandDelay > 0) {221 window.setTimeout(execMoveSelectionBackwardBySentenceCommand, commandCount * commandDelay);222 commandCount++;223 }224 else {225 execMoveSelectionBackwardBySentenceCommand();226 }227}228//-------------------------------------------------------------------------------------------------------229function execExtendSelectionBackwardBySentenceCommand() {230 selection.modify("extend", "backward", "sentence");231}232function extendSelectionBackwardBySentenceCommand() {233 if (commandDelay > 0) {234 window.setTimeout(execExtendSelectionBackwardBySentenceCommand, commandCount * commandDelay);235 commandCount++;236 }237 else {238 execExtendSelectionBackwardBySentenceCommand();239 }240}241//-------------------------------------------------------------------------------------------------------242function execMoveSelectionBackwardByLineCommand() {243 selection.modify("move", "backward", "line");244}245function moveSelectionBackwardByLineCommand() {246 if (commandDelay > 0) {247 window.setTimeout(execMoveSelectionBackwardByLineCommand, commandCount * commandDelay);248 commandCount++;249 }250 else {251 execMoveSelectionBackwardByLineCommand();252 }253}254//-------------------------------------------------------------------------------------------------------255function execExtendSelectionBackwardByLineCommand() {256 selection.modify("extend", "backward", "line");257}258function extendSelectionBackwardByLineCommand() {259 if (commandDelay > 0) {260 window.setTimeout(execExtendSelectionBackwardByLineCommand, commandCount * commandDelay);261 commandCount++;262 }263 else {264 execExtendSelectionBackwardByLineCommand();265 }266}267//-------------------------------------------------------------------------------------------------------268function execExtendSelectionBackwardByLineBoundaryCommand() {269 selection.modify("extend", "backward", "lineBoundary");270}271function extendSelectionBackwardByLineBoundaryCommand() {272 if (commandDelay > 0) {273 window.setTimeout(execExtendSelectionBackwardByLineBoundaryCommand, commandCount * commandDelay);274 commandCount++;275 }276 else {277 execExtendSelectionBackwardByLineBoundaryCommand();278 }279}280//-------------------------------------------------------------------------------------------------------281function execMoveSelectionBackwardByLineBoundaryCommand() {282 selection.modify("move", "backward", "lineBoundary");283}284function moveSelectionBackwardByLineBoundaryCommand() {285 if (commandDelay > 0) {286 window.setTimeout(execMoveSelectionBackwardByLineBoundaryCommand, commandCount * commandDelay);287 commandCount++;288 }289 else {290 execMoveSelectionBackwardByLineBoundaryCommand();291 }292}293//-------------------------------------------------------------------------------------------------------294function doubleClick(x, y) {295 eventSender.mouseMoveTo(x, y);296 eventSender.mouseDown();297 eventSender.mouseUp();298 eventSender.mouseDown();299 eventSender.mouseUp();300}301function doubleClickAtSelectionStart() {302 var rects = window.getSelection().getRangeAt(0).getClientRects();303 var x = rects[0].left;304 var y = rects[0].top;305 doubleClick(x, y);306}307//-------------------------------------------------------------------------------------------------------308function execBoldCommand() {309 document.execCommand("Bold");310 debugForDumpAsText("execBoldCommand");311}312function boldCommand() {313 if (commandDelay > 0) {314 window.setTimeout(execBoldCommand, commandCount * commandDelay);315 commandCount++;316 }317 else {318 execBoldCommand();319 }320}321//-------------------------------------------------------------------------------------------------------322function execUnderlineCommand() {323 document.execCommand("Underline");324 debugForDumpAsText("execUnderlineCommand");325}326function underlineCommand() {327 if (commandDelay > 0) {328 window.setTimeout(execUnderlineCommand, commandCount * commandDelay);329 commandCount++;330 }331 else {332 execUnderlineCommand();333 }334}335//-------------------------------------------------------------------------------------------------------336function execFontNameCommand() {337 document.execCommand("FontName", false, "Courier");338 debugForDumpAsText("execFontNameCommand");339}340function fontNameCommand() {341 if (commandDelay > 0) {342 window.setTimeout(execFontNameCommand, commandCount * commandDelay);343 commandCount++;344 }345 else {346 execFontNameCommand();347 }348}349//-------------------------------------------------------------------------------------------------------350function execFontSizeCommand(s) {351 if (arguments.length == 0 || s == undefined || s.length == 0)352 s = '12px';353 document.execCommand("FontSize", false, s);354 debugForDumpAsText("execFontSizeCommand");355}356function fontSizeCommand(s) {357 if (commandDelay > 0) {358 window.setTimeout(execFontSizeCommand, commandCount * commandDelay, s);359 commandCount++;360 }361 else {362 execFontSizeCommand(s);363 }364}365//-------------------------------------------------------------------------------------------------------366function execFontSizeDeltaCommand(s) {367 if (arguments.length == 0 || s == undefined || s.length == 0)368 s = '1px';369 document.execCommand("FontSizeDelta", false, s);370 debugForDumpAsText("execFontSizeDeltaCommand");371}372function fontSizeDeltaCommand(s) {373 if (commandDelay > 0) {374 window.setTimeout(execFontSizeDeltaCommand, commandCount * commandDelay, s);375 commandCount++;376 }377 else {378 execFontSizeDeltaCommand(s);379 }380}381//-------------------------------------------------------------------------------------------------------382function execItalicCommand() {383 document.execCommand("Italic");384 debugForDumpAsText("execItalicCommand");385}386function italicCommand() {387 if (commandDelay > 0) {388 window.setTimeout(execItalicCommand, commandCount * commandDelay);389 commandCount++;390 }391 else {392 execItalicCommand();393 }394}395//-------------------------------------------------------------------------------------------------------396function execJustifyCenterCommand() {397 document.execCommand("JustifyCenter");398 debugForDumpAsText("execJustifyCenterCommand");399}400function justifyCenterCommand() {401 if (commandDelay > 0) {402 window.setTimeout(execJustifyCenterCommand, commandCount * commandDelay);403 commandCount++;404 }405 else {406 execJustifyCenterCommand();407 }408}409//-------------------------------------------------------------------------------------------------------410function execJustifyLeftCommand() {411 document.execCommand("JustifyLeft");412 debugForDumpAsText("execJustifyLeftCommand");413}414function justifyLeftCommand() {415 if (commandDelay > 0) {416 window.setTimeout(execJustifyLeftCommand, commandCount * commandDelay);417 commandCount++;418 }419 else {420 execJustifyLeftCommand();421 }422}423//-------------------------------------------------------------------------------------------------------424function execJustifyRightCommand() {425 document.execCommand("JustifyRight");426 debugForDumpAsText("execJustifyRightCommand");427}428function justifyRightCommand() {429 if (commandDelay > 0) {430 window.setTimeout(execJustifyRightCommand, commandCount * commandDelay);431 commandCount++;432 }433 else {434 execJustifyRightCommand();435 }436}437//-------------------------------------------------------------------------------------------------------438function execInsertHTMLCommand(html) {439 document.execCommand("InsertHTML", false, html);440 debugForDumpAsText("execInsertHTMLCommand");441}442function insertHTMLCommand(html) {443 if (commandDelay > 0) {444 window.setTimeout(execInsertHTMLCommand, commandCount * commandDelay, html);445 commandCount++;446 }447 else {448 execInsertHTMLCommand(html);449 }450}451//-------------------------------------------------------------------------------------------------------452function execInsertImageCommand(imgSrc) {453 document.execCommand("InsertImage", false, imgSrc);454 debugForDumpAsText("execInsertImageCommand");455}456function insertImageCommand(imgSrc) {457 if (commandDelay > 0) {458 window.setTimeout(execInsertImageCommand, commandCount * commandDelay, imgSrc);459 commandCount++;460 }461 else {462 execInsertImageCommand(imgSrc);463 }464}465//-------------------------------------------------------------------------------------------------------466function execInsertLineBreakCommand() {467 document.execCommand("InsertLineBreak");468 debugForDumpAsText("execInsertLineBreakCommand");469}470function insertLineBreakCommand() {471 if (commandDelay > 0) {472 window.setTimeout(execInsertLineBreakCommand, commandCount * commandDelay);473 commandCount++;474 }475 else {476 execInsertLineBreakCommand();477 }478}479//-------------------------------------------------------------------------------------------------------480 481function execInsertParagraphCommand() {482 document.execCommand("InsertParagraph");483 debugForDumpAsText("execInsertParagraphCommand");484}485function insertParagraphCommand() {486 if (commandDelay > 0) {487 window.setTimeout(execInsertParagraphCommand, commandCount * commandDelay);488 commandCount++;489 }490 else {491 execInsertParagraphCommand();492 }493}494//-------------------------------------------------------------------------------------------------------495function execInsertNewlineInQuotedContentCommand() {496 document.execCommand("InsertNewlineInQuotedContent");497 debugForDumpAsText("execInsertNewlineInQuotedContentCommand");498}499function insertNewlineInQuotedContentCommand() {500 if (commandDelay > 0) {501 window.setTimeout(execInsertNewlineInQuotedContentCommand, commandCount * commandDelay);502 commandCount++;503 }504 else {505 execInsertNewlineInQuotedContentCommand();506 }507}508//-------------------------------------------------------------------------------------------------------509function execTypeCharacterCommand(c) {510 if (arguments.length == 0 || c == undefined || c.length == 0 || c.length > 1)511 c = 'x';512 document.execCommand("InsertText", false, c);513 debugForDumpAsText("execTypeCharacterCommand");514}515function typeCharacterCommand(c) {516 if (commandDelay > 0) {517 window.setTimeout(execTypeCharacterCommand, commandCount * commandDelay, c);518 commandCount++;519 }520 else {521 execTypeCharacterCommand(c);522 }523}524//-------------------------------------------------------------------------------------------------------525function execSelectAllCommand() {526 document.execCommand("SelectAll");527}528function selectAllCommand() {529 if (commandDelay > 0) {530 window.setTimeout(execSelectAllCommand, commandCount * commandDelay);531 commandCount++;532 }533 else {534 execSelectAllCommand();535 }536}537//-------------------------------------------------------------------------------------------------------538function execStrikethroughCommand() {539 document.execCommand("Strikethrough");540 debugForDumpAsText("execStrikethroughCommand");541}542function strikethroughCommand() {543 if (commandDelay > 0) {544 window.setTimeout(execStrikethroughCommand, commandCount * commandDelay);545 commandCount++;546 }547 else {548 execStrikethroughCommand();549 }550}551//-------------------------------------------------------------------------------------------------------552function execUndoCommand() {553 document.execCommand("Undo");554 debugForDumpAsText("execUndoCommand");555}556function undoCommand() {557 if (commandDelay > 0) {558 window.setTimeout(execUndoCommand, commandCount * commandDelay);559 commandCount++;560 }561 else {562 execUndoCommand();563 }564}565//-------------------------------------------------------------------------------------------------------566function execRedoCommand() {567 document.execCommand("Redo");568 debugForDumpAsText("execRedoCommand");569}570function redoCommand() {571 if (commandDelay > 0) {572 window.setTimeout(execRedoCommand, commandCount * commandDelay);573 commandCount++;574 }575 else {576 execRedoCommand();577 }578}579//-------------------------------------------------------------------------------------------------------580function execChangeRootSize() {581 document.getElementById("root").style.width = "600px";582}583function changeRootSize() {584 if (commandDelay > 0) {585 window.setTimeout(execChangeRootSize, commandCount * commandDelay);586 commandCount++;587 }588 else {589 execChangeRootSize();590 }591}592//-------------------------------------------------------------------------------------------------------593function execCutCommand() {594 document.execCommand("Cut");595 debugForDumpAsText("execCutCommand");596}597function cutCommand() {598 if (commandDelay > 0) {599 window.setTimeout(execCutCommand, commandCount * commandDelay);600 commandCount++;601 }602 else {603 execCutCommand();604 }605}606//-------------------------------------------------------------------------------------------------------607function execCopyCommand() {608 document.execCommand("Copy");609 debugForDumpAsText("execCopyCommand");610}611function copyCommand() {612 if (commandDelay > 0) {613 window.setTimeout(execCopyCommand, commandCount * commandDelay);614 commandCount++;615 }616 else {617 execCopyCommand();618 }619}620//-------------------------------------------------------------------------------------------------------621function execPasteCommand() {622 document.execCommand("Paste");623 debugForDumpAsText("execPasteCommand");624}625function pasteCommand() {626 if (commandDelay > 0) {627 window.setTimeout(execPasteCommand, commandCount * commandDelay);628 commandCount++;629 }630 else {631 execPasteCommand();632 }633}634//-------------------------------------------------------------------------------------------------------635function execCreateLinkCommand(url) {636 document.execCommand("CreateLink", false, url);637 debugForDumpAsText("execCreateLinkCommand");638}639function createLinkCommand(url) {640 if (commandDelay > 0) {641 window.setTimeout(execCreateLinkCommand, commandCount * commandDelay, url);642 commandCount++;643 } else644 execCreateLinkCommand(url);645}646//-------------------------------------------------------------------------------------------------------647function execUnlinkCommand() {648 document.execCommand("Unlink");649 debugForDumpAsText("execUnlinkCommand");650}651function unlinkCommand() {652 if (commandDelay > 0) {653 window.setTimeout(execUnlinkCommand, commandCount * commandDelay);654 commandCount++;655 } else656 execUnlinkCommand();657}658//-------------------------------------------------------------------------------------------------------659function execPasteAndMatchStyleCommand() {660 document.execCommand("PasteAndMatchStyle");661 debugForDumpAsText("execPasteAndMatchStyleCommand");662}663function pasteAndMatchStyleCommand() {664 if (commandDelay > 0) {665 window.setTimeout(execPasteAndMatchStyleCommand, commandCount * commandDelay);666 commandCount++;667 }668 else {669 execPasteAndMatchStyleCommand();670 }671}672//-------------------------------------------------------------------------------------------------------673function execDeleteCommand() {674 document.execCommand("Delete");675 debugForDumpAsText("execDeleteCommand");676}677function deleteCommand() {678 if (commandDelay > 0) {679 window.setTimeout(execDeleteCommand, commandCount * commandDelay);680 commandCount++;681 }682 else {683 execDeleteCommand();684 }685}686//-------------------------------------------------------------------------------------------------------687function execForwardDeleteCommand() {688 document.execCommand("ForwardDelete");689 debugForDumpAsText("execForwardDeleteCommand");690}691function forwardDeleteCommand() {692 if (commandDelay > 0) {693 window.setTimeout(execForwardDeleteCommand, commandCount * commandDelay);694 commandCount++;695 }696 else {697 execForwardDeleteCommand();698 }699}700//-------------------------------------------------------------------------------------------------------701function runEditingTest() {702 if (window.layoutTestController)703 layoutTestController.dumpEditingCallbacks();704 var elem = document.getElementById("test");705 var selection = window.getSelection();706 selection.setPosition(elem, 0);707 editingTest();708}709var dumpAsText = false;710var markupResultList = document.createElement('ol');711function runDumpAsTextEditingTest(enableCallbacks) {712 if (window.layoutTestController) {713 layoutTestController.dumpAsText();714 if (enableCallbacks)715 layoutTestController.dumpEditingCallbacks();716 }717 dumpAsText = true;718 var elem = document.getElementById("test");719 var selection = window.getSelection();720 selection.setPosition(elem, 0);721 editingTest();722 document.body.appendChild(markupResultList);723}724function debugForDumpAsText(name) {725 if (dumpAsText && document.getElementById("root")) {726 var newItem = document.createElement('li');727 newItem.appendChild(document.createTextNode(name+": "+document.getElementById("root").innerHTML));728 markupResultList.appendChild(newItem);729 }730}731//-------------------------------------------------------------------------------------------------------732function execBackColorCommand() {733 document.execCommand("BackColor", false, "Chartreuse");734 debugForDumpAsText('execBackColorCommand');735}736function backColorCommand() {737 if (commandDelay > 0) {738 window.setTimeout(execBackColorCommand, commandCount * commandDelay);739 commandCount++;740 }741 else {742 execBackColorCommand();743 }744}745function execForeColorCommand(color) {746 document.execCommand("ForeColor", false, color);747 debugForDumpAsText('execForeColorCommand');748}749function foreColorCommand(color) {750 if (commandDelay > 0) {751 window.setTimeout(execForeColorCommand, commandCount * commandDelay, color);752 commandCount++;753 } else754 execForeColorCommand(color);755}756//-------------------------------------------------------------------------------------------------------757function runCommand(command, arg1, arg2) {758 document.execCommand(command,arg1,arg2);759}760function executeCommand(command,arg1,arg2) {761 if (commandDelay > 0) {762 window.setTimeout(runCommand, commandCount * commandDelay);763 commandCount++;764 }765 else {766 runCommand(command,arg1,arg2);767 }...
commands.js
Source:commands.js
...176 */177safaridriver.inject.commands.elementCommand_ = function(handlerFn, var_args) {178 var keys = goog.array.slice(arguments, 1);179 return function(command) {180 command = safaridriver.inject.commands.util.prepareElementCommand(command);181 var element = command.getParameter('id');182 var args = goog.array.concat(element, goog.array.map(keys, function(key) {183 return command.getParameter(key);184 }));185 return bot.inject.executeScript(handlerFn, args);186 };187};188/**189 * @param {!safaridriver.Command} command The command to execute.190 * @see bot.action.clear191 */192safaridriver.inject.commands.clearElement =193 safaridriver.inject.commands.elementCommand_(bot.action.clear);194/**195 * @param {!safaridriver.Command} command The command to execute.196 * @see bot.action.click197 */198safaridriver.inject.commands.clickElement =199 safaridriver.inject.commands.elementCommand_(bot.action.click);200/**201 * @param {!safaridriver.Command} command The command to execute.202 * @see bot.action.submit203 */204safaridriver.inject.commands.submitElement =205 safaridriver.inject.commands.elementCommand_(bot.action.submit);206/**207 * @param {!safaridriver.Command} command The command to execute.208 * @see webdriver.atoms.element.getAttribute209 */210safaridriver.inject.commands.getElementAttribute =211 safaridriver.inject.commands.elementCommand_(212 webdriver.atoms.element.getAttribute, 'name');213/**214 * @param {!safaridriver.Command} command The command to execute.215 * @see goog.style.getPageOffset216 */217safaridriver.inject.commands.getElementLocation =218 safaridriver.inject.commands.elementCommand_(goog.style.getPageOffset);219/**220 * @param {!safaridriver.Command} command The command to execute.221 * @see webdriver.atoms.element.getLocationInView222 */223safaridriver.inject.commands.getLocationInView =224 safaridriver.inject.commands.elementCommand_(225 webdriver.atoms.element.getLocationInView);226/**227 * @param {!safaridriver.Command} command The command to execute.228 * @see goog.style.getSize229 */230safaridriver.inject.commands.getElementSize =231 safaridriver.inject.commands.elementCommand_(goog.style.getSize);232/**233 * @param {!safaridriver.Command} command The command to execute.234 * @see webdriver.atoms.element.getText235 */236safaridriver.inject.commands.getElementText =237 safaridriver.inject.commands.elementCommand_(238 webdriver.atoms.element.getText);239/**240 * @param {!safaridriver.Command} command The command to execute.241 */242safaridriver.inject.commands.getElementTagName =243 safaridriver.inject.commands.elementCommand_(function(el) {244 return el.tagName.toLowerCase();245 });246/**247 * @param {!safaridriver.Command} command The command to execute.248 * @see bot.dom.isShown249 */250safaridriver.inject.commands.isElementDisplayed =251 safaridriver.inject.commands.elementCommand_(bot.dom.isShown);252/**253 * @param {!safaridriver.Command} command The command to execute.254 * @see bot.dom.isEnabled255 */256safaridriver.inject.commands.isElementEnabled =257 safaridriver.inject.commands.elementCommand_(bot.dom.isEnabled);258/**259 * @param {!safaridriver.Command} command The command to execute.260 * @see webdriver.atoms.element.isSelected261 */262safaridriver.inject.commands.isElementSelected =263 safaridriver.inject.commands.elementCommand_(264 webdriver.atoms.element.isSelected);265/**266 * @param {!safaridriver.Command} command The command to execute.267 */268safaridriver.inject.commands.elementEquals =269 safaridriver.inject.commands.elementCommand_(function(a, b) {270 return a === b;271 }, 'other');272/**273 * @param {!safaridriver.Command} command The command to execute.274 * @see bot.dom.getEffectiveStyle275 */276safaridriver.inject.commands.getCssValue =277 safaridriver.inject.commands.elementCommand_(bot.dom.getEffectiveStyle,278 'propertyName');279/**280 * @return {!goog.math.Coordinate} The position of the window.281 * @see bot.window.getPosition282 */283safaridriver.inject.commands.getWindowPosition = function() {284 return bot.window.getPosition();285};286/**287 * @param {!safaridriver.Command} command The command to execute.288 * @see bot.window.setPosition289 */290safaridriver.inject.commands.setWindowPosition = function(command) {291 var position = new goog.math.Coordinate(292 /** @type {number} */ (command.getParameter('x')),293 /** @type {number} */ (command.getParameter('y')));294 bot.window.setPosition(position);295};296/**297 * @return {!goog.math.Size} The size of the window.298 * @see bot.window.getSize299 */300safaridriver.inject.commands.getWindowSize = function() {301 return bot.window.getSize();302};303/**304 * @param {!safaridriver.Command} command The command to execute.305 * @see bot.window.setSize306 */307safaridriver.inject.commands.setWindowSize = function(command) {308 var size = new goog.math.Size(309 /** @type {number} */ (command.getParameter('width')),310 /** @type {number} */ (command.getParameter('height')));311 bot.window.setSize(size);312};313/** Maximizes the window. */314safaridriver.inject.commands.maximizeWindow = function() {315 window.moveTo(0, 0);316 window.resizeTo(window.screen.width, window.screen.height);317};318/**319 * Executes a command in the context of the current page.320 * @param {!safaridriver.Command} command The command to execute.321 * @param {!safaridriver.inject.Tab} tab A reference to the tab issuing this322 * command.323 * @return {!webdriver.promise.Promise} A promise that will be resolved with the324 * {@link bot.response.ResponseObject} from the page.325 * @throws {Error} If there is an error while sending the command to the page.326 */327safaridriver.inject.commands.executeInPage = function(command, tab) {328 command = safaridriver.inject.commands.util.prepareElementCommand(command);329 return tab.executeInPage(command);330};331/**332 * Locates a frame and sends a message to it to activate itself with the333 * extension. The located frame will be334 * @param {!safaridriver.Command} command The command to execute.335 * the target of all subsequent commands.336 * @throws {Error} If there is an error whilst locating the frame.337 */338safaridriver.inject.commands.switchToFrame = function(command) {339 var id = command.getParameter('id');340 var frameWindow;341 if (goog.isNull(id)) {342 safaridriver.inject.commands.LOG_.info('Resetting focus to window.top');...
server.js
Source:server.js
...245 command, opt_callback) {246 // Normally command will be an instanceof safaridriver.Command, but it will be247 // a standard webdriver.Command if it came from248 // safaridriver.extension.driver (via the extension builder REPL).249 command = new safaridriver.Command(goog.string.getRandomString(),250 command.getName(), command.getParameters());251 var handler = safaridriver.extension.Server.COMMAND_MAP_[command.getName()];252 if (!handler) {253 this.logMessage_('Unknown command: ' + command.getName(),254 goog.debug.Logger.Level.SEVERE);255 return webdriver.promise.rejected(bot.response.createErrorResponse(256 Error('Unknown command: ' + command.getName())));257 }258 var description = this.session_.getId() + '::' + command.getName();259 var fn = goog.bind(this.executeCommand_, this, command, handler);260 var flow = webdriver.promise.controlFlow();261 var result = flow.execute(fn, description).262 then(bot.response.createResponse, bot.response.createErrorResponse).263 thenFinally(goog.bind(function(response) {264 this.session_.setCurrentCommand(null);265 return response;266 }, this));267 // If we were given a callback, massage the result to fit the268 // webdriver.CommandExecutor contract.269 if (opt_callback) {270 result.then(bot.response.checkResponse).271 then(goog.partial(opt_callback, null), opt_callback);272 }273 return result;274};275/**276 * @param {!safaridriver.Command} command The command to execute.277 * @param {safaridriver.extension.Server.CommandHandler} handler The command278 * handler.279 * @return {*} The command result.280 * @private281 */282safaridriver.extension.Server.prototype.executeCommand_ = function(283 command, handler) {284 this.logMessage_('Executing command: ' + command.getName());285 var alertText = this.session_.getUnhandledAlertText();286 if (!goog.isNull(alertText)) {287 this.session_.setUnhandledAlertText(null);288 return safaridriver.alert.createResponse(alertText);289 }290 this.session_.setCurrentCommand(command);291 return handler(this.session_, command);292};293/**294 * @param {string} message The message to log.295 * @param {goog.debug.Logger.Level=} opt_level The level to log the message at;296 * Defaults to INFO.297 * @private298 */299safaridriver.extension.Server.prototype.logMessage_ = function(300 message, opt_level) {301 this.log_.log(opt_level || goog.debug.Logger.Level.INFO,302 '[' + this.session_.getId() + '] ' + message);303};304/**305 * Called when the WebSocket connection is opened.306 * @private307 */308safaridriver.extension.Server.prototype.onOpen_ = function() {309 this.logMessage_('WebSocket connection established.');310 if (!this.isDisposed() && this.ready_.isPending()) {311 this.ready_.fulfill();312 }313};314/**315 * Called when an attempt to open the WebSocket fails or there is a connection316 * failure after a successful connection has been established. Triggers the317 * disposable of this server.318 * @param {string} url The URL the WebSocket was connected to.319 * @private320 */321safaridriver.extension.Server.prototype.onClose_ = function(url) {322 safaridriver.extension.Server.connectedUrls_[url] = false;323 this.logMessage_('WebSocket connection was closed.',324 goog.debug.Logger.Level.WARNING);325 if (!this.isDisposed()) {326 if (this.ready_.isPending()) {327 var message = 'Failed to connect to ' + url;328 this.logMessage_(message);329 this.disposeWebSocket_();330 setTimeout(goog.bind(this.attemptConnect_, this, url), 500);331 } else {332 this.dispose();333 }334 }335};336/**337 * Called when there is a communication error with the WebSocket.338 * @param {!MessageEvent} event The error event.339 * @private340 */341safaridriver.extension.Server.prototype.onError_ = function(event) {342 this.logMessage_('There was an error in the WebSocket: ' + event.data,343 goog.debug.Logger.Level.SEVERE);344};345/**346 * Called when the WebSocket receives a message.347 * @param {!MessageEvent} event The message event.348 * @private349 */350safaridriver.extension.Server.prototype.onMessage_ = function(event) {351 this.logMessage_('Received a message: ' + event.data,352 goog.debug.Logger.Level.FINER);353 try {354 var message = safaridriver.message.fromEvent(event);355 if (!message.isType(safaridriver.message.Command.TYPE)) {356 throw Error('Not a command message: ' + message);357 }358 } catch (ex) {359 this.send_(null, bot.response.createErrorResponse(ex));360 return;361 }362 var command = message.getCommand();363 this.execute(command).364 thenCatch(bot.response.createErrorResponse).365 then(goog.bind(function(response) {366 this.send_(command, response);367 }, this));368};369/**370 * Sends a response to the client.371 * @param {safaridriver.Command} command The command this is a response to, or372 * {@code null} if the response indicates a parse error with the command.373 * @param {!bot.response.ResponseObject} response The response to send.374 * @private375 */376safaridriver.extension.Server.prototype.send_ = function(command, response) {...
navtreeindex0.js
Source:navtreeindex0.js
1var NAVTREEINDEX0 =2{3"_mtk___packet_8h_source.html":[2,0,0,0,0],4"dir_29c008a3d6007eb363d0585658336295.html":[2,0,0,0],5"dir_47892d94e1d0bf342f4cec549ae2e06e.html":[2,0,0],6"dir_74389ed8173ad57b461b9d623a1f3867.html":[2,0],7"files.html":[2],8"group__pmtk__appendix.html":[1,0],9"group__pmtk__command.html":[1,1],10"group__pmtk__command.html#ga6012e5fa857099f0e5fd61bb6d1f84be":[1,1,0],11"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84bea00bfa74b9ab4be1cb538d6720808c007":[1,1,0,89],12"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84bea037ee569708e29066d04d6b24a589998":[1,1,0,92],13"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84bea05ed0801721f44c80238d29c18bf9a02":[1,1,0,51],14"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84bea063d8815c8ee51cd08acda80daa1e81e":[1,1,0,64],15"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84bea08e334f61a3facbee28df70210d878d3":[1,1,0,66],16"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84bea1265f33d4aba1384f11ef5872119f573":[1,1,0,22],17"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84bea1397b023e0d48ec75adabef05a22e061":[1,1,0,87],18"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84bea144340c8d86359dce90bcdc73a1c3f47":[1,1,0,47],19"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84bea153232faf17c74620043aa97852fbf93":[1,1,0,33],20"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84bea1552640a94f244c1a0c27e14bafdd426":[1,1,0,100],21"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84bea19e1adb3e180af8c09c84c63ae9e789f":[1,1,0,90],22"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84bea1c16678ddc76189e4215f65893655821":[1,1,0,19],23"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84bea1ce00a71b2d49bed618e16eaf551cd9a":[1,1,0,52],24"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84bea1f021ebe90b969144edb422d2e41d62d":[1,1,0,88],25"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84bea2625b3468647086a44ea53b5e7b58288":[1,1,0,77],26"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84bea2855fd322f2e27500a2844b7776c1061":[1,1,0,26],27"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84bea2ac3e95cf254fb53202aa90270d17492":[1,1,0,98],28"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84bea2edaf5cac4aa4a2fc73b5312d7428b24":[1,1,0,41],29"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84bea32f454682a68a9c3bccef8e25b15b8ba":[1,1,0,63],30"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84bea349fe122413c42817cdd46f0888a6c5f":[1,1,0,61],31"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84bea377b4ea82070d970dbfa11b6cf426594":[1,1,0,43],32"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84bea37e936f37aef1900a7e5a87fddbf8861":[1,1,0,11],33"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84bea3ace760b44e085e0142fef46f1837e0d":[1,1,0,4],34"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84bea3c5bcc16f2cb139831b0c05d7e77d4d3":[1,1,0,3],35"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84bea3f53bb52d96bb7739b2c6cf17d05c268":[1,1,0,76],36"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84bea3fb309c02edc5daf43592d9f2959928e":[1,1,0,46],37"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84bea42011586fa1fca5a3643cac6b05b60c0":[1,1,0,97],38"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84bea466830c3723b4afc4ffaa5d389f528c3":[1,1,0,9],39"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84bea467817db20c8c590ea5c065e5faa1f53":[1,1,0,37],40"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84bea48aff60bb41ea828e9ccaf810f3f47f9":[1,1,0,7],41"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84bea55bd5f9f60b4113329eef6c1ad3ed296":[1,1,0,50],42"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84bea56cefa0d6551ed89dc1974929c35a875":[1,1,0,23],43"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84bea5d520ba1d9f1b61bcce90b521632c32d":[1,1,0,16],44"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84bea6732848b6864eda4c0bf2d6e665ebeb9":[1,1,0,71],45"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84bea684eb8a711e4201f6de6aa5067100f21":[1,1,0,0],46"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84bea69756339c6d97ad458e3ccadc60e3059":[1,1,0,14],47"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84bea6b852645bdf9e0680bb45017559105e5":[1,1,0,86],48"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84bea6dc3a9739c6f1928716ee2c97e28204b":[1,1,0,82],49"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84bea72e57a8d23a2f9d09d2c9685cb93d9c7":[1,1,0,81],50"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84bea7bc54655b91905cd5de5770adef0b58e":[1,1,0,91],51"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84bea7bd230a1d411831e909a6bdeaec2f7eb":[1,1,0,5],52"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84bea7cff33d092ea4b69a868898082a9383d":[1,1,0,8],53"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84bea8060ce5da125915a4b00f7aff4220889":[1,1,0,30],54"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84bea807d8bf7605b87d790f4593f06dbb2f6":[1,1,0,69],55"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84bea815b92d27ea9a9adb14e4dbf2c6eb939":[1,1,0,6],56"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84bea8371d87a4fab64e97e5a53200fa6cda2":[1,1,0,28],57"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84bea83e665f81bc20f6d8e425e0749f3f288":[1,1,0,29],58"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84bea86e6074288800bb3626e16e735dcc6f8":[1,1,0,96],59"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84bea8782a9c367032850565b8d449225ddda":[1,1,0,31],60"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84bea8789b7bc5c5abad0ab627ad50aba79d4":[1,1,0,17],61"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84bea8a11d9cb5cca390770b0f6b6ffc64b5a":[1,1,0,56],62"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84bea8d1f075aa6a35cbca97ca5fb7ac07fa1":[1,1,0,49],63"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84bea8ddbdbf2649933cc970f831500dfe66f":[1,1,0,39],64"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84bea94e91e0b1e6fa7207f32a1f49bdf5c94":[1,1,0,57],65"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84bea9873165a5537dafa3b4c57dbea50d258":[1,1,0,45],66"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84bea9b4d921b1fe8ac8f59195773a81a9aa3":[1,1,0,48],67"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84bea9b58e4f853bd537a8d44fe1021c57bb1":[1,1,0,34],68"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84bea9c0c1ca48067fdd105f70e04487ff701":[1,1,0,65],69"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84bea9c90d1ead04106ba8d52a532d9e0cb14":[1,1,0,83],70"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84bea9e2fbd7c984e5e6e082b3825b060ca00":[1,1,0,25],71"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84bea9e91e2fdcbc35d2cb5e9c9fe9f564e98":[1,1,0,18],72"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84beaa23a5c6e8e35b989498e6b6b101731e7":[1,1,0,24],73"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84beaa84af36afd8dbaa82b104bbf0b263592":[1,1,0,59],74"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84beaa8d6e40f333aff7e4435f88809042ac8":[1,1,0,40],75"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84beaa932726f1937dfdd7955fbee8819489a":[1,1,0,55],76"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84beaa93754c9b38d52d93c691c0ab53a7b7d":[1,1,0,94],77"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84beaa957fa7398464443cff5412f35fd0611":[1,1,0,2],78"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84beaa99559cfe61a412f1e302dc39021b879":[1,1,0,53],79"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84beaafb3f64364e21510313190785e3fc7d0":[1,1,0,36],80"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84beab0a80b268936db695d5a7ccff70e10bf":[1,1,0,78],81"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84beab139be3d7b4b2482f2838bac51db2b39":[1,1,0,62],82"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84beab2b4ec0b0540e9fc51bc8a839d44c8ff":[1,1,0,68],83"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84beab3eae09a18fc5417f8b359d9efdfd235":[1,1,0,60],84"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84beab7a9a31d9329df65b587ae512e1e6a14":[1,1,0,13],85"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84beab85d515c5cb70af97c6afb7f15e225b2":[1,1,0,70],86"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84beabadd7524424255f446ccfd0a37b1df97":[1,1,0,72],87"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84beabbbb799ada6d27a16cb6a9e7fabcc0fd":[1,1,0,27],88"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84beabf86ac7cc7d3b0ce907b0a86e6a1338b":[1,1,0,1],89"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84beac6d9aff834a28ac4feddf34a66102a43":[1,1,0,85],90"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84beac94b5ff1087757868d8afeff20c011fa":[1,1,0,20],91"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84beaca811436d2d5072939d0f5cee493231c":[1,1,0,12],92"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84beace569382848d8559a16fa090e8d56100":[1,1,0,42],93"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84bead2312b41c26e764ef34621c560f9973c":[1,1,0,58],94"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84bead7650c8cb304121491fdf61bc284c036":[1,1,0,80],95"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84bead7e27c02b08d6ff4296f7a67a00dfe26":[1,1,0,44],96"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84bead90684782d20bd184adebce214da0fb7":[1,1,0,74],97"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84bead90d6c9f7c3e751fd1cab1b92187bfb0":[1,1,0,95],98"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84beadd3af74a2c6d9ea8a5411dfdb51e93a4":[1,1,0,99],99"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84beae2dbe959ff5bc2dcd3dc71a92d5c053c":[1,1,0,93],100"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84beae4a762e079462ab42723d0052ad9c5b4":[1,1,0,73],101"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84beae8b254db5898fe8f36f6f650d81cb0d1":[1,1,0,79],102"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84beae96a7db722c3fbaececd2c8d9a45b19c":[1,1,0,84],103"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84beae99971090e79d0b006294059e32301b0":[1,1,0,67],104"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84beaeb41c59cd96e6d16e343046893ff7442":[1,1,0,32],105"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84beaec48bc94e3f15bdf3f9eda6d76fbd7ab":[1,1,0,21],106"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84beaf1a7e2d71a17c147d1ef007986a29cfb":[1,1,0,54],107"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84beaf38eaf459a6e12d9579a52ea433d2b3b":[1,1,0,15],108"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84beaf8a05f41e01df87665ca9237aa9f416e":[1,1,0,75],109"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84beaf8f88476f893e2e7445714372c99b6f3":[1,1,0,10],110"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84beafab5347f328ae50a3b524cad27b2be8d":[1,1,0,35],111"group__pmtk__command.html#gga6012e5fa857099f0e5fd61bb6d1f84beaff110d710ff9d5961dd33c7291e5824d":[1,1,0,38],112"index.html":[0],113"index.html":[],114"index.html#COMMAND_Chapter":[0,1],115"index.html#COMMAND_List_Chapter":[0,2],116"index.html#PMTK_Overview":[0,0],117"index.html#Version_Chapter":[0,3],118"index.html#license":[0,4],119"modules.html":[1],120"pages.html":[]
...
fckcommands.js
Source:fckcommands.js
...42 case 'Italic' :43 case 'Underline' :44 case 'StrikeThrough':45 case 'Subscript' :46 case 'Superscript' : oCommand = new FCKCoreStyleCommand( commandName ) ; break ;4748 case 'RemoveFormat' : oCommand = new FCKRemoveFormatCommand() ; break ;4950 case 'DocProps' : oCommand = new FCKDialogCommand( 'DocProps' , FCKLang.DocProps , 'dialog/fck_docprops.html' , 400, 380, FCKCommands.GetFullPageState ) ; break ;51 case 'Templates' : oCommand = new FCKDialogCommand( 'Templates' , FCKLang.DlgTemplatesTitle , 'dialog/fck_template.html' , 380, 450 ) ; break ;52 case 'Link' : oCommand = new FCKDialogCommand( 'Link' , FCKLang.DlgLnkWindowTitle , 'dialog/fck_link.html' , 400, 300 ) ; break ;53 case 'Unlink' : oCommand = new FCKUnlinkCommand() ; break ;54 case 'VisitLink' : oCommand = new FCKVisitLinkCommand() ; break ;55 case 'Anchor' : oCommand = new FCKDialogCommand( 'Anchor' , FCKLang.DlgAnchorTitle , 'dialog/fck_anchor.html' , 370, 160 ) ; break ;56 case 'AnchorDelete' : oCommand = new FCKAnchorDeleteCommand() ; break ;57 case 'BulletedList' : oCommand = new FCKDialogCommand( 'BulletedList', FCKLang.BulletedListProp , 'dialog/fck_listprop.html?UL' , 370, 160 ) ; break ;58 case 'NumberedList' : oCommand = new FCKDialogCommand( 'NumberedList', FCKLang.NumberedListProp , 'dialog/fck_listprop.html?OL' , 370, 160 ) ; break ;59 case 'About' : oCommand = new FCKDialogCommand( 'About' , FCKLang.About , 'dialog/fck_about.html' , 420, 330, function(){ return FCK_TRISTATE_OFF ; } ) ; break ;60 case 'Find' : oCommand = new FCKDialogCommand( 'Find' , FCKLang.DlgFindAndReplaceTitle, 'dialog/fck_replace.html' , 340, 230, null, null, 'Find' ) ; break ;61 case 'Replace' : oCommand = new FCKDialogCommand( 'Replace' , FCKLang.DlgFindAndReplaceTitle, 'dialog/fck_replace.html' , 340, 230, null, null, 'Replace' ) ; break ;6263 case 'Image' : oCommand = new FCKDialogCommand( 'Image' , FCKLang.DlgImgTitle , 'dialog/fck_image.html' , 450, 390 ) ; break ;64 case 'Flash' : oCommand = new FCKDialogCommand( 'Flash' , FCKLang.DlgFlashTitle , 'dialog/fck_flash.html' , 450, 390 ) ; break ;65 case 'SpecialChar' : oCommand = new FCKDialogCommand( 'SpecialChar', FCKLang.DlgSpecialCharTitle , 'dialog/fck_specialchar.html' , 400, 290 ) ; break ;66 case 'Smiley' : oCommand = new FCKDialogCommand( 'Smiley' , FCKLang.DlgSmileyTitle , 'dialog/fck_smiley.html' , FCKConfig.SmileyWindowWidth, FCKConfig.SmileyWindowHeight ) ; break ;67 case 'Table' : oCommand = new FCKDialogCommand( 'Table' , FCKLang.DlgTableTitle , 'dialog/fck_table.html' , 480, 250 ) ; break ;68 case 'TableProp' : oCommand = new FCKDialogCommand( 'Table' , FCKLang.DlgTableTitle , 'dialog/fck_table.html?Parent', 480, 250 ) ; break ;69 case 'TableCellProp': oCommand = new FCKDialogCommand( 'TableCell' , FCKLang.DlgCellTitle , 'dialog/fck_tablecell.html' , 550, 240 ) ; break ;7071 case 'Style' : oCommand = new FCKStyleCommand() ; break ;7273 case 'FontName' : oCommand = new FCKFontNameCommand() ; break ;74 case 'FontSize' : oCommand = new FCKFontSizeCommand() ; break ;75 case 'FontFormat' : oCommand = new FCKFormatBlockCommand() ; break ;7677 case 'Source' : oCommand = new FCKSourceCommand() ; break ;78 case 'Preview' : oCommand = new FCKPreviewCommand() ; break ;79 case 'Save' : oCommand = new FCKSaveCommand() ; break ;80 case 'NewPage' : oCommand = new FCKNewPageCommand() ; break ;81 case 'PageBreak' : oCommand = new FCKPageBreakCommand() ; break ;82 case 'Rule' : oCommand = new FCKRuleCommand() ; break ;83 case 'Nbsp' : oCommand = new FCKNbsp() ; break ;8485 case 'TextColor' : oCommand = new FCKTextColorCommand('ForeColor') ; break ;86 case 'BGColor' : oCommand = new FCKTextColorCommand('BackColor') ; break ;8788 case 'Paste' : oCommand = new FCKPasteCommand() ; break ;89 case 'PasteText' : oCommand = new FCKPastePlainTextCommand() ; break ;90 case 'PasteWord' : oCommand = new FCKPasteWordCommand() ; break ;9192 case 'JustifyLeft' : oCommand = new FCKJustifyCommand( 'left' ) ; break ;93 case 'JustifyCenter' : oCommand = new FCKJustifyCommand( 'center' ) ; break ;94 case 'JustifyRight' : oCommand = new FCKJustifyCommand( 'right' ) ; break ;95 case 'JustifyFull' : oCommand = new FCKJustifyCommand( 'justify' ) ; break ;96 case 'Indent' : oCommand = new FCKIndentCommand( 'indent', FCKConfig.IndentLength ) ; break ;97 case 'Outdent' : oCommand = new FCKIndentCommand( 'outdent', FCKConfig.IndentLength * -1 ) ; break ;98 case 'Blockquote' : oCommand = new FCKBlockQuoteCommand() ; break ;99 case 'CreateDiv' : oCommand = new FCKDialogCommand( 'CreateDiv', FCKLang.CreateDiv, 'dialog/fck_div.html', 380, 210, null, null, true ) ; break ;100 case 'EditDiv' : oCommand = new FCKDialogCommand( 'EditDiv', FCKLang.EditDiv, 'dialog/fck_div.html', 380, 210, null, null, false ) ; break ;101 case 'DeleteDiv' : oCommand = new FCKDeleteDivCommand() ; break ;102103 case 'TableInsertRowAfter' : oCommand = new FCKTableCommand('TableInsertRowAfter') ; break ;104 case 'TableInsertRowBefore' : oCommand = new FCKTableCommand('TableInsertRowBefore') ; break ;105 case 'TableDeleteRows' : oCommand = new FCKTableCommand('TableDeleteRows') ; break ;106 case 'TableInsertColumnAfter' : oCommand = new FCKTableCommand('TableInsertColumnAfter') ; break ;107 case 'TableInsertColumnBefore' : oCommand = new FCKTableCommand('TableInsertColumnBefore') ; break ;108 case 'TableDeleteColumns' : oCommand = new FCKTableCommand('TableDeleteColumns') ; break ;109 case 'TableInsertCellAfter' : oCommand = new FCKTableCommand('TableInsertCellAfter') ; break ;110 case 'TableInsertCellBefore' : oCommand = new FCKTableCommand('TableInsertCellBefore') ; break ;111 case 'TableDeleteCells' : oCommand = new FCKTableCommand('TableDeleteCells') ; break ;112 case 'TableMergeCells' : oCommand = new FCKTableCommand('TableMergeCells') ; break ;113 case 'TableMergeRight' : oCommand = new FCKTableCommand('TableMergeRight') ; break ;114 case 'TableMergeDown' : oCommand = new FCKTableCommand('TableMergeDown') ; break ;115 case 'TableHorizontalSplitCell' : oCommand = new FCKTableCommand('TableHorizontalSplitCell') ; break ;116 case 'TableVerticalSplitCell' : oCommand = new FCKTableCommand('TableVerticalSplitCell') ; break ;117 case 'TableDelete' : oCommand = new FCKTableCommand('TableDelete') ; break ;118119 case 'Form' : oCommand = new FCKDialogCommand( 'Form' , FCKLang.Form , 'dialog/fck_form.html' , 380, 210 ) ; break ;120 case 'Checkbox' : oCommand = new FCKDialogCommand( 'Checkbox' , FCKLang.Checkbox , 'dialog/fck_checkbox.html' , 380, 200 ) ; break ;121 case 'Radio' : oCommand = new FCKDialogCommand( 'Radio' , FCKLang.RadioButton , 'dialog/fck_radiobutton.html' , 380, 200 ) ; break ;122 case 'TextField' : oCommand = new FCKDialogCommand( 'TextField' , FCKLang.TextField , 'dialog/fck_textfield.html' , 380, 210 ) ; break ;123 case 'Textarea' : oCommand = new FCKDialogCommand( 'Textarea' , FCKLang.Textarea , 'dialog/fck_textarea.html' , 380, 210 ) ; break ;124 case 'HiddenField' : oCommand = new FCKDialogCommand( 'HiddenField', FCKLang.HiddenField , 'dialog/fck_hiddenfield.html' , 380, 190 ) ; break ;125 case 'Button' : oCommand = new FCKDialogCommand( 'Button' , FCKLang.Button , 'dialog/fck_button.html' , 380, 210 ) ; break ;126 case 'Select' : oCommand = new FCKDialogCommand( 'Select' , FCKLang.SelectionField, 'dialog/fck_select.html' , 400, 340 ) ; break ;127 case 'ImageButton' : oCommand = new FCKDialogCommand( 'ImageButton', FCKLang.ImageButton , 'dialog/fck_image.html?ImageButton', 450, 390 ) ; break ;128129 case 'SpellCheck' : oCommand = new FCKSpellCheckCommand() ; break ;130 case 'FitWindow' : oCommand = new FCKFitWindow() ; break ;131132 case 'Undo' : oCommand = new FCKUndoCommand() ; break ;133 case 'Redo' : oCommand = new FCKRedoCommand() ; break ;134 case 'Copy' : oCommand = new FCKCutCopyCommand( false ) ; break ;135 case 'Cut' : oCommand = new FCKCutCopyCommand( true ) ; break ;136137 case 'SelectAll' : oCommand = new FCKSelectAllCommand() ; break ;138 case 'InsertOrderedList' : oCommand = new FCKListCommand( 'insertorderedlist', 'ol' ) ; break ;139 case 'InsertUnorderedList' : oCommand = new FCKListCommand( 'insertunorderedlist', 'ul' ) ; break ;140 case 'ShowBlocks' : oCommand = new FCKShowBlockCommand( 'ShowBlocks', FCKConfig.StartupShowBlocks ? FCK_TRISTATE_ON : FCK_TRISTATE_OFF ) ; break ;141142 // Generic Undefined command (usually used when a command is under development).143 case 'Undefined' : oCommand = new FCKUndefinedCommand() ; break ;144145 // By default we assume that it is a named command.146 default:147 if ( FCKRegexLib.NamedCommands.test( commandName ) )148 oCommand = new FCKNamedCommand( commandName ) ;149 else150 {151 alert( FCKLang.UnknownCommand.replace( /%1/g, commandName ) ) ;152 return null ;153 }154 }155156 FCKCommands.LoadedCommands[ commandName ] = oCommand ;157158 return oCommand ;159}160161// Gets the state of the "Document Properties" button. It must be enabled only162// when "Full Page" editing is available.
...
commandRegister.js
Source:commandRegister.js
...15 * @param {String} script16 * @param {String} command17 * @param {String} groupId18 */19 function registerChatCommand(script, command, groupId) {20 // If groupId is undefined set it to 7 (viewer).21 groupId = (groupId === undefined ? 7 : groupId);22 if (commandExists(command)) {23 return;24 }25 // This is for the panel commands.26 if (groupId == 30) {27 if ($.inidb.exists('permcom', command)) {28 $.inidb.del('permcom', command);29 }30 commands[command] = {31 groupId: groupId,32 script: script,33 subcommands: {}34 };35 return;36 }37 // Handle disabled commands.38 if ($.inidb.exists('disabledCommands', command)) {39 $.inidb.set('tempDisabledCommandScript', command, script);40 return;41 }42 // Get and set the command permission.43 groupId = $.getSetIniDbNumber('permcom', command, groupId);44 commands[command] = {45 groupId: groupId,46 script: script,47 subcommands: {}48 };49 }50 /*51 * @function registerChatSubcommand52 *53 * @param {String} command54 * @param {String} subcommand55 * @param {String} groupId56 */57 function registerChatSubcommand(command, subcommand, groupId) {58 // If groupId is undefined set it to 7 (viewer).59 groupId = (groupId === undefined ? 7 : groupId);60 if (!commandExists(command) || subCommandExists(command, subcommand)) {61 return;62 }63 // Get and set the command permission.64 groupId = $.getSetIniDbNumber('permcom', (command + ' ' + subcommand), groupId);65 commands[command].subcommands[subcommand] = {66 groupId: groupId67 }68 }69 /*70 * @function registerChatAlias71 *72 * @param {String} alias73 */74 function registerChatAlias(alias) {75 if (!aliasExists(alias)) {76 aliases[alias] = true;77 }78 }79 /*80 * @function unregisterChatCommand81 *82 * @param {String} command83 */84 function unregisterChatCommand(command) {85 if (commandExists(command)) {86 delete commands[command];87 delete aliases[command];88 }89 $.inidb.del('permcom', command);90 $.inidb.del('disabledCommands', command);91 }92 /*93 * @function tempUnRegisterChatCommand94 *95 * @param {String} command96 */97 function tempUnRegisterChatCommand(command) {98 $.inidb.set('tempDisabledCommandScript', command, commands[command].script);99 if (commandExists(command)) {100 delete commands[command];101 delete aliases[command];102 }103 }104 /*105 * @function unregisterChatSubcommand106 *107 * @param {String} command108 * @param {String} subcommand109 */110 function unregisterChatSubcommand(command, subcommand) {111 if (subCommandExists(command, subcommand)) {...
registerCommand.js
Source:registerCommand.js
...188 * @param {string} scriptFile189 * @param {string} command190 * @param {int} permission191 */192 function registerCommand(scriptFile, command, permission) {193 if (!commandExists(command)) {194 commands[command] = {195 permission: $.getSetIniDbNumber('discordPermcom', command, permission),196 cost: ($.inidb.exists('discordPricecom', command) ? $.inidb.get('discordPricecom', command) : 0),197 alias: ($.inidb.exists('discordAliascom', command) ? $.inidb.get('discordAliascom', command) : ''),198 channel: [],199 scriptFile: scriptFile,200 subCommand: {}201 };202 if ($.inidb.exists('discordChannelcom', command)) {203 var keys = $.inidb.get('discordChannelcom', command).split(', '),204 i;205 for (i in keys) {206 commands[command].channel[keys[i]] = keys[i];207 }208 } else {209 commands[command].channel['_default_global_'] = '';210 }211 if (commands[command].alias !== '') {212 aliases[commands[command].alias] = command;213 }214 }215 }216 /**217 * @function registerSubCommand218 * 219 * @export $.discord220 * @param {string} command221 * @param {string} subCommand222 * @param {int} permission223 */224 function registerSubCommand(command, subCommand, permission) {225 if (commandExists(command) && !subCommandExists(command, subCommand)) {226 commands[command].subCommand[subCommand] = {227 permission: $.getSetIniDbNumber('discordPermcom', (command + ' ' + subCommand), permission)228 };229 }230 }231 /**232 * @function unregisterSubCommand233 * 234 * @export $.discord235 * @param {string} command236 * @param {string} subCommand237 */238 function unregisterSubCommand(command, subCommand) {239 if (commandExists(command) && subCommandExists(command, subCommand)) {240 delete commands[command].subCommand[subCommand];241 }242 }243 /**244 * @function unregisterCommand245 * 246 * @export $.discord247 * @param {string} command248 */249 function unregisterCommand(command) {250 if (commandExists(command)) {251 if (commands[command].alias !== '') {252 delete aliases[commands[command].alias];253 }254 delete commands[command];255 }256 }257 /* Export the function to the $.discord api. */258 $.discord.commands = commands;259 $.discord.commandExists = commandExists;260 $.discord.subCommandExists = subCommandExists;261 $.discord.getCommandPermission = getCommandPermission;262 $.discord.getSubCommandPermission = getSubCommandPermission;263 $.discord.registerCommand = registerCommand;...
Using AI Code Generation
1var istanbul = require('istanbul');2var collector = new istanbul.Collector();3var reporter = new istanbul.Reporter();4reporter.add('lcov');5collector.add(__coverage__);6reporter.write(collector, true, function () {7 console.log('Hello World!');8});
Using AI Code Generation
1var spawn = require('child_process').spawn;2var istanbul = spawn('istanbul', ['cover', 'test.js']);3istanbul.stdout.on('data', function (data) {4 console.log('stdout: ' + data);5});6istanbul.stderr.on('data', function (data) {7 console.log('stderr: ' + data);8});9istanbul.on('close', function (code) {10 console.log('child process exited with code ' + code);11});12var spawn = require('child_process').spawn;13var istanbul = spawn('istanbul', ['cover', 'test.js']);14istanbul.stdout.on('data', function (data) {15 console.log('stdout: ' + data);16});17istanbul.stderr.on('data', function (data) {18 console.log('stderr: ' + data);19});20istanbul.on('close', function (code) {21 console.log('child process exited with code ' + code);22});23var spawn = require('child_process').spawn;24var istanbul = spawn('istanbul', ['cover', 'test.js']);25istanbul.stdout.on('data', function (data) {26 console.log('stdout: ' + data);27});28istanbul.stderr.on('data', function (data) {29 console.log('stderr: ' + data);30});31istanbul.on('close', function (code) {32 console.log('child process exited with code ' + code);33});34var spawn = require('child_process').spawn;35var istanbul = spawn('istanbul', ['cover', 'test.js']);36istanbul.stdout.on('data', function (data) {37 console.log('stdout: ' + data);38});39istanbul.stderr.on('data', function (data) {40 console.log('stderr: ' + data);41});42istanbul.on('close', function (code) {43 console.log('child process exited with code ' + code);44});45var spawn = require('child_process').spawn;46var istanbul = spawn('istanbul', ['cover', 'test.js']);47istanbul.stdout.on('data', function (data)
Using AI Code Generation
1var istanbul = require('istanbul');2var instrumenter = new istanbul.Instrumenter();3var fs = require('fs');4var code = fs.readFileSync('test.js', 'utf8');5var instrumentedCode = instrumenter.instrumentSync(code, 'test.js');6fs.writeFileSync('test.js', instrumentedCode, 'utf8');7var istanbul = require('istanbul');8var instrumenter = new istanbul.Instrumenter();9var fs = require('fs');10var code = fs.readFileSync('test.js', 'utf8');11var instrumentedCode = instrumenter.instrumentSync(code, 'test.js');12fs.writeFileSync('test.js', instrumentedCode, 'utf8');13var istanbul = require('istanbul');14var instrumenter = new istanbul.Instrumenter();15var fs = require('fs');16var code = fs.readFileSync('test.js', 'utf8');17var instrumentedCode = instrumenter.instrumentSync(code, 'test.js');18fs.writeFileSync('test.js', instrumentedCode, 'utf8');19var istanbul = require('istanbul');20var instrumenter = new istanbul.Instrumenter();21var fs = require('fs');22var code = fs.readFileSync('test.js', 'utf8');23var instrumentedCode = instrumenter.instrumentSync(code, 'test.js');24fs.writeFileSync('test.js', instrumentedCode, 'utf8');25var istanbul = require('istanbul');26var instrumenter = new istanbul.Instrumenter();27var fs = require('fs');28var code = fs.readFileSync('test.js', 'utf8');29var instrumentedCode = instrumenter.instrumentSync(code, 'test.js');30fs.writeFileSync('test.js', instrumentedCode, 'utf8');31var istanbul = require('istanbul');32var instrumenter = new istanbul.Instrumenter();33var fs = require('fs');34var code = fs.readFileSync('test.js', 'utf8');35var instrumentedCode = instrumenter.instrumentSync(code, 'test.js');36fs.writeFileSync('test.js', instrumentedCode, 'utf8');
Using AI Code Generation
1var istanbul = require('istanbul');2var collector = new istanbul.Collector();3collector.add(coverage);4var reporter = new istanbul.Reporter();5reporter.add('lcov');6reporter.write(collector, true, function () {7 console.log('All reports generated');8});
Using AI Code Generation
1var istanbul = require('istanbul');2var collector = new istanbul.Collector();3var reporter = new istanbul.Reporter();4var sync = false;5reporter.add('text');6collector.add(JSON.parse(fs.readFileSync('coverage/coverage.json', 'utf8')));7reporter.write(collector, sync, function () {8 console.log('Reports generated');9});10 at Array.forEach (native)11 at Function.Collector.add (C:\Users\user\Desktop\tests12 at Object.<anonymous> (C:\Users\user\Desktop\tests\test.js:8:10)13 at Module._compile (module.js:413:34)14 at Object.Module._extensions..js (module.js:422:10)15 at Module.load (module.js:357:32)16 at Function.Module._load (module.js:314:12)17 at Function.Module.runMain (module.js:447:10)18 at startup (node.js:139:18)19 at Array.forEach (native)20 at Function.Collector.add (C:\Users\user\Desktop\tests
Using AI Code Generation
1var istanbul = require('istanbul');2var Command = istanbul.Command;3var command = new Command();4command.run();5var spawn = require('child_process').spawn;6var child = spawn('istanbul', ['cover', 'test.js']);7var istanbul = require('istanbul');8var collector = new istanbul.Collector();9var reporter = new istanbul.Reporter();10var sync = true;11reporter.add('text');12reporter.addAll(['lcov', 'text-summary']);13reporter.write(collector, sync, function () {14 console.log('All reports generated');15});16var istanbul = require('istanbul');17var collector = new istanbul.Collector();18var reporter = new istanbul.Reporter();19var sync = true;20reporter.add('text');21reporter.addAll(['lcov', 'text-summary']);22reporter.write(collector, sync, function () {23 console.log('All reports generated');24});25var istanbul = require('istanbul');26var collector = new istanbul.Collector();27var reporter = new istanbul.Reporter();28var sync = true;29reporter.add('text');30reporter.addAll(['lcov', 'text-summary']);31reporter.write(collector, sync, function () {32 console.log('All reports generated');33});34var istanbul = require('istanbul');35var collector = new istanbul.Collector();36var reporter = new istanbul.Reporter();37var sync = true;38reporter.add('text');39reporter.addAll(['lcov', 'text-summary']);40reporter.write(collector, sync, function () {41 console.log('All reports generated');42});43var istanbul = require('istanbul');44var collector = new istanbul.Collector();45var reporter = new istanbul.Reporter();46var sync = true;47reporter.add('text');48reporter.addAll(['lcov', 'text-summary']);49reporter.write(collector
Using AI Code Generation
1var istanbul = require('istanbul');2var collector = new istanbul.Collector();3var reporter = new istanbul.Reporter();4var sync = false;5collector.add(coverage);6reporter.add('text');7reporter.addAll([ 'lcov', 'json' ]);8reporter.write(collector, sync, function () {9 console.log('All reports generated');10});11var istanbul = require('istanbul');12var collector = new istanbul.Collector();13var reporter = new istanbul.Reporter();14var sync = false;15collector.add(coverage);16reporter.add('text');17reporter.addAll([ 'lcov', 'json' ]);18reporter.write(collector, sync, function () {19 console.log('All reports generated');20});
Using AI Code Generation
1var istanbul = require('istanbul');2var Command = istanbul.Command;3var cmd = new Command();4cmd.run('report', {reporter: 'html'});5cmd.run('check-coverage', {statements: 100, branches: 100, functions: 100, lines: 100});6cmd.run('cover', {reporter: 'html', file: 'test.js'});7cmd.run('help', {});8cmd.run('help', {command: 'check-coverage'});9cmd.run('version', {});
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!