How to use setTimeout method in pyatom

Best Python code snippet using pyatom_python

RGraph.common.zoom.js

Source:RGraph.common.zoom.js Github

copy

Full Screen

...64 areaDiv.style.backgroundColor = 'rgba(220,220,220,0.3)';65 areaDiv.style.display = 'none';66 areaDiv.onmouseover = function (e)67 {68 setTimeout(function () {e.target.style.opacity = 0.8;}, 50);69 setTimeout(function () {e.target.style.opacity = 0.6;}, 100);70 setTimeout(function () {e.target.style.opacity = 0.4;}, 150);71 setTimeout(function () {e.target.style.opacity = 0.2;}, 200);72 setTimeout(function () {e.target.style.opacity = 0;}, 250);73 setTimeout(function () {e.target.style.display = 'none';}, 300);74 setTimeout(function () {e.target = null;}, 350);75 }76 document.body.appendChild(areaDiv);77 RGraph.Registry.Set('chart.zoomed.area.div', null);78 RGraph.Registry.Set('chart.zoomed.area.mousedown', coords);79 RGraph.Registry.Set('chart.zoomed.area.areadiv', areaDiv);80 }81 var window_onmousemove = function (e)82 {83 var startCoords = RGraph.Registry.Get('chart.zoomed.area.mousedown');84 85 if (startCoords && startCoords.length) {86 var coords = RGraph.getMouseXY(e);87 var canvasXY = RGraph.getCanvasXY(e.target);88 var obj = e.target.__object__;89 var context = obj.context;90 var canvas = obj.canvas;91 var startx = startCoords[0];92 var starty = startCoords[1];93 var endx = coords[0];94 var endy = coords[1];95 var width = endx - startx;96 var height = endy - starty;97 var areaDiv = RGraph.Registry.Get('chart.zoomed.area.areadiv');98 99 if (width >= 0 && height >= 0) {100 101 if (width > 5 && height > 5) {102 areaDiv.style.width = (width - 15) + 'px';103 areaDiv.style.height = (height - 15) + 'px';104 areaDiv.style.display = 'inline';105 } else {106 areaDiv.style.display = 'none';107 }108 } else if (width < -5 || height < -5) {109 var canvasCoords = RGraph.getCanvasXY(canvas);110 var noticeDiv = document.createElement('DIV');111 noticeDiv.style.position = 'absolute';112 noticeDiv.style.top = 0;113 noticeDiv.style.left = 0;114 noticeDiv.style.zIndex = 99;115 noticeDiv.style.border = '1px dashed black';116 noticeDiv.style.backgroundColor = '#ffc1c1';117 noticeDiv.style.MozBoxShadow = '0 0 5px #999';118 noticeDiv.style.WebkitBoxShadow = '0 0 5px #999';119 noticeDiv.style.boxShadow = '0 0 5px #999';120 noticeDiv.style.padding = '2px';121 noticeDiv.innerHTML = 'Zoom goes right and down';122 document.body.appendChild(noticeDiv);123 // Reposition the warning124 noticeDiv.style.top = canvasCoords[1] + startCoords[1] - noticeDiv.offsetHeight + 'px';125 noticeDiv.style.left = canvasCoords[0] + startCoords[0] - (noticeDiv.offsetWidth / 2) + 'px';126 noticeDiv.style.width = noticeDiv.offsetWidth + 'px';127 128 setTimeout(function () {noticeDiv.style.opacity = 0.8;}, 2100);129 setTimeout(function () {noticeDiv.style.opacity = 0.6;}, 2200);130 setTimeout(function () {noticeDiv.style.opacity = 0.4;}, 2300);131 setTimeout(function () {noticeDiv.style.opacity = 0.2;}, 2400);132 setTimeout(function () {noticeDiv.style.display = 'none';}, 2500);133 setTimeout(function () {noticeDiv = null;}, 2600);134 }135 }136 }137 window.addEventListener('mousemove', window_onmousemove, false);138 RGraph.AddEventListener(canvas.id, 'window_mousemove', window_onmousemove);139 canvas.onmouseup = function (e)140 {141 RGraph.FixEventObject(e);142 var startCoords = RGraph.Registry.Get('chart.zoomed.area.mousedown');143 var coords = RGraph.getMouseXY(e);144 // Do the zooming here145 if (RGraph.Registry.Get('chart.zoomed.area.mousedown')) {146 //RGraph.Redraw();147 148 RGraph.Registry.Get('chart.zoomed.area.areadiv').style.display = 'none';149 RGraph.Registry.Get('chart.zoomed.area.areadiv').style.left = '-1000px';150 RGraph.Registry.Get('chart.zoomed.area.areadiv').style.top = '-1000px';151 RGraph.Registry.Set('chart.zoomed.area.areadiv', null);152 if (coords[0] < startCoords[0] || coords[1] < startCoords[1]) {153 RGraph.Registry.Set('chart.zoomed.area.mousedown', false);154 return;155 }156 var canvas = e.target;157 var obj = canvas.__object__;158 var context = obj.context;159 var canvasCoords = RGraph.getCanvasXY(e.target);160 var coords = RGraph.getMouseXY(e);161 var startCoords = RGraph.Registry.Get('chart.zoomed.area.mousedown');162 var startx = startCoords[0];163 var starty = startCoords[1];164 var endx = coords[0] - 15;165 var endy = coords[1] - 15;166 var width = Math.abs(endx - startx);167 var height = Math.abs(endy - starty);168 var factor = obj.Get('chart.zoom.factor') - 1;169 170 var img = document.createElement('IMG');171 img.src = canvas.toDataURL();172 img.style.position = 'relative';173 img.style.left = (factor + 1) * -1 * startx + 'px';174 img.style.top = (factor + 1) * -1 * starty + 'px';175 img.width = (factor + 1) * canvas.width;176 img.height = (factor + 1) * canvas.height;177 var div = document.createElement('DIV');178 div.__object__ = obj;179 div.className = 'RGraph_zoomed_area';180 div.style.position = 'absolute';181 div.style.backgroundColor = 'white';182 div.style.cursor = 'move';183 div.style.top = e.pageY + 'px';184 div.style.left = e.pageX + 'px';185 div.origWidth = width;186 div.origHeight = height;187 div.style.width = width + 'px';188 div.style.height = height + 'px';189 div.style.border = '1px solid black'; 190 div.style.boxShadow = '0 0 15px black';191 div.style.MozBoxShadow = '0 0 15px black';192 div.style.WebkitBoxShadow = '0 0 15px black';193 div.style.overflow = 'hidden';194 div.style.opacity = 0;195 div.style.zIndex = 99;196 197 document.body.appendChild(div);198 div.appendChild(img);199 /**200 * This facilitates expanding the zoomed area once visible (the double click)201 */202 div.ondblclick = function (event)203 {204 var event = RGraph.FixEventObject(event);205 var img = event.target;206 var div = event.target.parentNode;207 208 var current_width = div.offsetWidth209 var current_height = div.offsetHeight210 var target_width = img.offsetWidth;211 var target_height = img.offsetHeight;212 var diff_width = target_width - current_width;213 var diff_height = target_height - current_height;214 215 var img_offset_left = parseInt(img.offsetLeft);216 var img_offset_top = parseInt(img.offsetTop);217 218 // Global vars on purpose so the timers can access them219 __zoomed_div_style__ = div.style;220 __zoomed_img_style__ = img.style;221 222 setTimeout("__zoomed_div_style__.left = parseInt(__zoomed_div_style__.left) - " + (diff_width * 0.1) + " + 'px'", 50);223 setTimeout("__zoomed_div_style__.left = parseInt(__zoomed_div_style__.left) - " + (diff_width * 0.1) + " + 'px'", 100);224 setTimeout("__zoomed_div_style__.left = parseInt(__zoomed_div_style__.left) - " + (diff_width * 0.1) + " + 'px'", 150);225 setTimeout("__zoomed_div_style__.left = parseInt(__zoomed_div_style__.left) - " + (diff_width * 0.1) + " + 'px'", 200);226 setTimeout("__zoomed_div_style__.left = parseInt(__zoomed_div_style__.left) - " + (diff_width * 0.1) + " + 'px'", 250);227 228 setTimeout("__zoomed_div_style__.top = parseInt(__zoomed_div_style__.top) - " + (diff_height * 0.1) + " + 'px'", 50);229 setTimeout("__zoomed_div_style__.top = parseInt(__zoomed_div_style__.top) - " + (diff_height * 0.1) + " + 'px'", 100);230 setTimeout("__zoomed_div_style__.top = parseInt(__zoomed_div_style__.top) - " + (diff_height * 0.1) + " + 'px'", 150);231 setTimeout("__zoomed_div_style__.top = parseInt(__zoomed_div_style__.top) - " + (diff_height * 0.1) + " + 'px'", 200);232 setTimeout("__zoomed_div_style__.top = parseInt(__zoomed_div_style__.top) - " + (diff_height * 0.1) + " + 'px'", 250);233 234 setTimeout("__zoomed_div_style__.width = parseInt(__zoomed_div_style__.width) + " + (diff_width * 0.2) + " + 'px'", 50);235 setTimeout("__zoomed_div_style__.width = parseInt(__zoomed_div_style__.width) + " + (diff_width * 0.2) + " + 'px'", 100);236 setTimeout("__zoomed_div_style__.width = parseInt(__zoomed_div_style__.width) + " + (diff_width * 0.2) + " + 'px'", 150);237 setTimeout("__zoomed_div_style__.width = parseInt(__zoomed_div_style__.width) + " + (diff_width * 0.2) + " + 'px'", 200);238 setTimeout("__zoomed_div_style__.width = parseInt(__zoomed_div_style__.width) + " + (diff_width * 0.2) + " + 'px'", 250);239 240 setTimeout("__zoomed_div_style__.height = parseInt(__zoomed_div_style__.height) + " + (diff_height * 0.2) + " + 'px'", 50);241 setTimeout("__zoomed_div_style__.height = parseInt(__zoomed_div_style__.height) + " + (diff_height * 0.2) + " + 'px'", 100);242 setTimeout("__zoomed_div_style__.height = parseInt(__zoomed_div_style__.height) + " + (diff_height * 0.2) + " + 'px'", 150);243 setTimeout("__zoomed_div_style__.height = parseInt(__zoomed_div_style__.height) + " + (diff_height * 0.2) + " + 'px'", 200);244 setTimeout("__zoomed_div_style__.height = parseInt(__zoomed_div_style__.height) + " + (diff_height * 0.2) + " + 'px'", 250);245 246 // Move the image within the div247 setTimeout("__zoomed_img_style__.left = " + (img_offset_left * 0.8) + " + 'px'", 50);248 setTimeout("__zoomed_img_style__.left = " + (img_offset_left * 0.6) + " + 'px'", 100);249 setTimeout("__zoomed_img_style__.left = " + (img_offset_left * 0.4) + " + 'px'", 150);250 setTimeout("__zoomed_img_style__.left = " + (img_offset_left * 0.2) + " + 'px'", 200);251 setTimeout("__zoomed_img_style__.left = 0", 250);252 253 setTimeout("__zoomed_img_style__.top = " + (img_offset_top * 0.8) + " + 'px'", 50);254 setTimeout("__zoomed_img_style__.top = " + (img_offset_top * 0.6) + " + 'px'", 100);255 setTimeout("__zoomed_img_style__.top = " + (img_offset_top * 0.4) + " + 'px'", 150);256 setTimeout("__zoomed_img_style__.top = " + (img_offset_top * 0.2) + " + 'px'", 200);257 setTimeout("__zoomed_img_style__.top = 0", 250);258 259 div.ondblclick = null;260 }261 /**262 * Make the zoomed bit draggable263 */264 div.onmousedown = function (e)265 {266 e = RGraph.FixEventObject(e);267 268 var div = e.target.parentNode;269 var img = div.childNodes[0];270 271 if (e.button == 0 || e.button == 1 ) {272 273 div.__offsetx__ = e.offsetX + img.offsetLeft;274 div.__offsety__ = e.offsetY + img.offsetTop;275 276 RGraph.Registry.Set('chart.mousedown', div);277 RGraph.Registry.Set('chart.button', 0);278 279 } else {280 281 img.__startx__ = e.pageX;282 img.__starty__ = e.pageY;283 284 img.__originalx__ = img.offsetLeft;285 img.__originaly__ = img.offsetTop;286 RGraph.Registry.Set('chart.mousedown', img);287 RGraph.Registry.Set('chart.button', 2);288 289 /**290 * Don't show a context menu when the zoomed area is right-clicked on291 */292 window.oncontextmenu = function (e)293 {294 e = RGraph.FixEventObject(e);295 e.stopPropagation();296 297 // [18th July 2010] Is this reallly necessary?298 window.oncontextmenu = function (e)299 {300 return true;301 }302 303 return false;304 }305 }306 e.stopPropagation();307 return false;308 }309 310 window.onmouseup = function (e)311 {312 RGraph.Registry.Set('chart.mousedown', false);313 }314 315 window.onmousemove = function (e)316 {317 if (RGraph.Registry.Get('chart.mousedown') && RGraph.Registry.Get('chart.button') == 0) {318 319 var div = RGraph.Registry.Get('chart.mousedown');320 321 var x = e.pageX - div.__offsetx__;322 var y = e.pageY - div.__offsety__;323 324 div.style.left = x + 'px';325 div.style.top = y + 'px';326 } else if (RGraph.Registry.Get('chart.mousedown') && RGraph.Registry.Get('chart.button') == 2) {327 328 var img = RGraph.Registry.Get('chart.mousedown');329 330 var x = img.__originalx__ + e.pageX - img.__startx__;331 var y = img.__originaly__ + e.pageY - img.__starty__;332 333 img.style.left = x + 'px';334 img.style.top = y + 'px';335 }336 }337 // End dragging code338 var divs = RGraph.Registry.Get('chart.zoomed.area.divs');339 if (typeof(divs) == 'object') {340 divs.push(div);341 } else {342 RGraph.Registry.Set('chart.zoomed.area.divs', [div])343 }344 345 // Create the background346 var bg = document.createElement('DIV');347 bg.style.position = 'fixed'348 bg.style.zIndex = 98;349 bg.style.top = 0;350 bg.style.left = 0;351 bg.style.backgroundColor = '#999';352 bg.style.opacity = 0;353 bg.style.width = (screen.width + 100) + 'px';354 bg.style.height = (screen.height + 100) + 'px';355 document.body.appendChild(bg);356 357 bg.onclick = function (e)358 {359 div.style.display = 'none';360 bg.style.display = 'none';361 div = null;362 bg = null;363 }364 365 setTimeout(function (){div.style.opacity = 0.2;}, 50);366 setTimeout(function (){div.style.opacity = 0.4;}, 100);367 setTimeout(function (){div.style.opacity = 0.6;}, 150);368 setTimeout(function (){div.style.opacity = 0.8;}, 200);369 setTimeout(function (){div.style.opacity = 1.0;}, 250);370 371 setTimeout(function () {div.style.left = canvasCoords[0] + startx - (width * factor * 0.1) + 'px'}, 50);372 setTimeout(function () {div.style.left = canvasCoords[0] + startx - (width * factor * 0.2) + 'px'}, 100);373 setTimeout(function () {div.style.left = canvasCoords[0] + startx - (width * factor * 0.3) + 'px'}, 150);374 setTimeout(function () {div.style.left = canvasCoords[0] + startx - (width * factor * 0.4) + 'px'}, 200);375 setTimeout(function () {div.style.left = canvasCoords[0] + startx - (width * factor * 0.5) + 'px'}, 250);376 setTimeout(function () {div.style.top = canvasCoords[1] + starty - (height * factor * 0.1) + 'px'}, 50);377 setTimeout(function () {div.style.top = canvasCoords[1] + starty - (height * factor * 0.2) + 'px'}, 100);378 setTimeout(function () {div.style.top = canvasCoords[1] + starty - (height * factor * 0.3) + 'px'}, 150);379 setTimeout(function () {div.style.top = canvasCoords[1] + starty - (height * factor * 0.4) + 'px'}, 200);380 setTimeout(function () {div.style.top = canvasCoords[1] + starty - (height * factor * 0.5) + 'px'}, 250);381 setTimeout(function () {div.style.width = width + (width * factor * 0.2) + 'px'}, 50);382 setTimeout(function () {div.style.width = width + (width * factor * 0.4) + 'px'}, 100);383 setTimeout(function () {div.style.width = width + (width * factor * 0.6) + 'px'}, 150);384 setTimeout(function () {div.style.width = width + (width * factor * 0.8) + 'px'}, 200);385 setTimeout(function () {div.style.width = width + (width * factor * 1.0) + 'px'}, 250);386 387 setTimeout(function () {div.style.height = height + (height * factor * 0.2) + 'px'}, 50);388 setTimeout(function () {div.style.height = height + (height * factor * 0.4) + 'px'}, 100);389 setTimeout(function () {div.style.height = height + (height * factor * 0.6) + 'px'}, 150);390 setTimeout(function () {div.style.height = height + (height * factor * 0.8) + 'px'}, 200);391 setTimeout(function () {div.style.height = height + (height * factor * 1.0) + 'px'}, 250);392 setTimeout(function (){bg.style.opacity = 0.1;}, 50);393 setTimeout(function (){bg.style.opacity = 0.2;}, 100);394 setTimeout(function (){bg.style.opacity = 0.3;}, 150);395 setTimeout(function (){bg.style.opacity = 0.4;}, 200);396 setTimeout(function (){bg.style.opacity = 0.5;}, 250);397 RGraph.Registry.Set('chart.zoomed.area.bg', bg);398 RGraph.Registry.Set('chart.zoomed.area.img', img);399 RGraph.Registry.Set('chart.zoomed.area.div', div);400 RGraph.Registry.Set('chart.zoomed.area.mousedown', null);401 }402 /**403 * Fire the zoom event404 */405 RGraph.FireCustomEvent(obj, 'onzoom');406 }407 408 canvas.onmouseout = function (e)409 {410 RGraph.Registry.Set('chart.zoomed.area.areadiv', null);411 RGraph.Registry.Set('chart.zoomed.area.mousedown', null);412 RGraph.Registry.Set('chart.zoomed.area.div', null);413 }414 }415 }416 /**417 * This function sets up the zoom window if requested418 * 419 * @param obj object The graph object420 */421 RGraph.ShowZoomWindow = function (obj)422 {423 if (obj.Get('chart.zoom.mode') == 'thumbnail') {424 RGraph.ZoomWindow(obj.canvas);425 }426 if (obj.Get('chart.zoom.mode') == 'area') {427 RGraph.ZoomArea(obj);428 }429 }430 /**431 * Installs the evnt handler for the zoom window/THUMBNAIL432 */433 RGraph.ZoomWindow = function (canvas)434 {435 ZoomWindow_mousemove = function (e)436 {437 e = RGraph.FixEventObject(e);438 var obj = e.target.__object__;439 var canvas = obj.canvas;440 var context = obj.context;441 var coords = RGraph.getMouseXY(e);442 /**443 * Create the DIV444 */445 if (!RGraph.Registry.Get('chart.zoomed.div')) {446 var div = document.createElement('div');447 div.className = 'RGraph_zoom_window';448 div.style.width = obj.Get('chart.zoom.thumbnail.width') + 'px';449 div.style.height = obj.Get('chart.zoom.thumbnail.height') + 'px';450 div.style.position = 'absolute';451 div.style.overflow = 'hidden';452 div.style.backgroundColor = 'white';453 454 // Initially the zoomed layer should be off-screen455 div.style.left = '-1000px';456 div.style.top = '-1000px';457 // Should these be 0? No.458 div.style.borderRadius =459 div.style.MozBorderRadius =460 div.style.WebkitBorderRadius = '5px';461 if (obj.Get('chart.zoom.shadow')) {462 div.style.boxShadow = 463 div.style.MozBoxShadow = 464 div.style.WebkitBoxShadow = 'rgba(0,0,0,0.5) 0 0 15px';465 }466 //div.style.opacity = 0.2;467 div.__object__ = obj;468 document.body.appendChild(div);469 470 /**471 * Get the canvas as an image472 */473 var img = document.createElement('img');474 img.width = obj.canvas.width * obj.Get('chart.zoom.factor');475 img.height = obj.canvas.height * obj.Get('chart.zoom.factor');476 img.style.position = 'relative';477 img.style.backgroundColor = 'white';478 img.__object__ = obj;479 div.appendChild(img);480 RGraph.Registry.Set('chart.zoomed.div', div);481 RGraph.Registry.Set('chart.zoomed.img', img);482 483 // Fade the zoom in484 setTimeout("RGraph.Registry.Get('chart.zoomed.div').__object__.canvas.onmouseover()", 5);485 } else {486 div = RGraph.Registry.Get('chart.zoomed.div');487 img = RGraph.Registry.Get('chart.zoomed.img');488 }489 // Make sure the image is up-to-date490 img.src = canvas.toDataURL();491 492 /**493 * Ensure the div is visible494 */495 if (div && div.style.opacity < 1) {496 setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.opacity = 1", 400);497 }498 /**499 * Get the canvas x/y coords500 */501 var c = RGraph.getCanvasXY(obj.canvas);502 var x = c[0];503 var y = c[1];504 /**505 * Position the div and img506 */507 var offset = 7;508 if (obj.Get('chart.zoom.thumbnail.fixed')) {509 div.style.left = (x + obj.Get('chart.gutter.left') + 5) + 'px';510 div.style.top = (y + obj.Get('chart.gutter.top') + 5) + 'px';511 } else {512 div.style.left = (e.pageX - obj.Get('chart.zoom.thumbnail.width') - offset) + 'px';513 div.style.top = (e.pageY - obj.Get('chart.zoom.thumbnail.height') - offset) + 'px';514 }515 516 var l = (obj.Get('chart.zoom.thumbnail.width') / 2) - (coords[0] * obj.Get('chart.zoom.factor'));517 var t = (obj.Get('chart.zoom.thumbnail.height') / 2) - (coords[1] * obj.Get('chart.zoom.factor'));518 // More positioning519 img.style.left = (l + ((obj.Get('chart.zoom.thumbnail.width') / 2) * obj.Get('chart.zoom.factor'))) + 'px';520 img.style.top = (t + ((obj.Get('chart.zoom.thumbnail.height') / 2) * obj.Get('chart.zoom.factor'))) + 'px';521 522 if (obj.Get('chart.zoom.thumbnail.fixed')) {523 img.style.left = (l + (obj.Get('chart.zoom.factor'))) + 'px';524 img.style.top = (t + (obj.Get('chart.zoom.factor'))) + 'px';525 }526 527 /**528 * Fire the onzoom event529 */530 RGraph.FireCustomEvent(obj, 'onzoom');531 }532 533 /**534 * The onmouseover event. Evidently. Fades the zoom window in535 */536 ZoomWindow_mouseover = function (e)537 {538 var div = RGraph.Registry.Get('chart.zoomed.div');539 // ???540 if (!div) return;541 /**542 * Allow for fixed positioning543 */544 if (div && RGraph.Registry.Get('chart.zoomed.div').__object__.Get('chart.zoom.thumbnail.fixed')) {545 return546 }547 var obj = div.__object__;548 // Used for the enlargement animation549 var targetWidth = obj.Get('chart.zoom.thumbnail.width');550 var targetHeight = obj.Get('chart.zoom.thumbnail.height');551 div.style.width = 0;552 div.style.height = 0;553 if (obj.Get('chart.zoom.fade.in')) {554 555 RGraph.Registry.Get('chart.zoomed.div').style.opacity = 0.2;556 setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.opacity = 0.1", 25);557 setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.opacity = 0.2", 50);558 setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.opacity = 0.3", 75);559 setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.opacity = 0.4", 100);560 setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.opacity = 0.5", 125);561 setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.opacity = 0.6", 150);562 setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.opacity = 0.7", 175);563 setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.opacity = 0.8", 200);564 setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.opacity = 0.9", 225);565 setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.opacity = 1.0", 250);566 } else {567 setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.opacity = 1", 1);568 }569 // The enlargement animation frames570 setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.width = '" + (targetWidth * (1/10) ) + "px'", 25);571 setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.width = '" + (targetWidth * (2/10) ) + "px'", 50);572 setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.width = '" + (targetWidth * (3/10) ) + "px'", 75);573 setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.width = '" + (targetWidth * (4/10) ) + "px'", 100);574 setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.width = '" + (targetWidth * (5/10) ) + "px'", 125);575 setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.width = '" + (targetWidth * (6/10) ) + "px'", 150);576 setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.width = '" + (targetWidth * (7/10) ) + "px'", 175);577 setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.width = '" + (targetWidth * (8/10) ) + "px'", 200);578 setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.width = '" + (targetWidth * (9/10) ) + "px'", 225);579 setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.width = '" + (targetWidth * (10/10) ) + "px'", 250);580 581 setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.height = '" + (targetHeight * (1/10) ) + "px'", 25);582 setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.height = '" + (targetHeight * (2/10) ) + "px'", 50);583 setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.height = '" + (targetHeight * (3/10) ) + "px'", 75);584 setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.height = '" + (targetHeight * (4/10) ) + "px'", 100);585 setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.height = '" + (targetHeight * (5/10) ) + "px'", 125);586 setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.height = '" + (targetHeight * (6/10) ) + "px'", 150);587 setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.height = '" + (targetHeight * (7/10) ) + "px'", 175);588 setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.height = '" + (targetHeight * (8/10) ) + "px'", 200);589 setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.height = '" + (targetHeight * (9/10) ) + "px'", 225);590 setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.height = '" + (targetHeight * (10/10) ) + "px'", 250);591 }592 ZoomWindow_mouseout = function (e)593 {594 var div = RGraph.Registry.Get('chart.zoomed.div');595 if (div && div.__object__.Get('chart.zoom.fade.out') && !div.__object__.Get('chart.zoom.thumbnail.fixed')) {596 RGraph.Registry.Get('chart.zoomed.div').style.opacity = 0.8;597 setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.opacity = 0.6", 100);598 setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.opacity = 0.4", 200);599 setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.opacity = 0.2", 300);600 setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.opacity = 0", 400);601 // Get rid of the zoom window602 setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.left = '-400px'", 400);603 setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.top = '-400px'", 400);604 605 } else if (!div.__object__.Get('chart.zoom.thumbnail.fixed')) {606 // Get rid of the zoom window607 if (RGraph.Registry.Get('chart.zoomed.div')) {608 setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.left = '-400px'", 1);609 setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.top = '-400px'", 41);610 }611 }612 }613 }614 /**615 * A zoom in function616 * 617 * @param e object The event object618 */619 RGraph.Zoom = function (e) {620 e = RGraph.FixEventObject(e);621 /**622 * Show the zoom window623 */624 //if ((e.target.__canvas__ && e.target.__canvas__.__object__.Get('chart.zoom.mode') == 'thumbnail') || (e.target.parentNode.__canvas__ && e.target.parentNode.__canvas__.__object__.Get('chart.zoom.mode') == 'thumbnail') ) {625 // return RGraph.ZoomWindow(e);626 //}627 if (e && e.target && e.target.__canvas__) {628 var canvas = e.target.__canvas__;629 /*******************************************************630 * This is here to facilitate zooming by just a single left click631 *******************************************************/632 } else if (e && e.target && e.target.__object__) {633 var canvas = e.target.__object__.canvas;634 e.stopPropagation(); // Hmmmm635 }636 // Fallback for MSIE9637 if (!canvas) {638 var registry_canvas = RGraph.Registry.Get('chart.contextmenu').__canvas__;639 if (registry_canvas) {640 var canvas = registry_canvas;641 }642 }643 var context = canvas.getContext('2d');644 var obj = canvas.__object__;645 var dataurl = canvas.toDataURL();646 var tmp = canvas;647 var coords = RGraph.getCanvasXY(canvas);648 var factor = obj.Get('chart.zoom.factor') - 1;649 var x = coords[0];650 var y = coords[1];651 var img = document.createElement('img');652 img.className = 'RGraph_zoomed_canvas';653 img.style.border = '3px solid gray';654 img.style.width = canvas.width + 'px';655 img.style.height = canvas.height + 'px';656 img.style.position = 'absolute';657 img.style.left = x + 'px';658 img.style.top = y + 'px';659 img.style.backgroundColor = obj.Get('chart.zoom.background.color');660 img.style.opacity = obj.Get('chart.zoom.fade.in') ? 0 : 1;661 img.style.zIndex = 99;662 img.src = dataurl;663 document.body.appendChild(img);664 //RGraph.Registry.Set('chart.zoomedimage', img);665 // Store the zoomed image in a global var - NOT the registry666 __zoomedimage__ = img;667 __zoomedimage__.obj = obj;668 // Image onclick should not hide the image669 img.onclick = function (e) {670 e = RGraph.FixEventObject(e);671 e.stopPropagation();672 return false;673 }674 setTimeout(function () { window.onclick = RGraph.HideZoomedCanvas; }, 1);675 var width = parseInt(canvas.width);676 var height = parseInt(canvas.height);677 var frames = obj.Get('chart.zoom.frames');678 var delay = obj.Get('chart.zoom.delay');679 // Increase the width over 10 frames - center680 if (obj.Get('chart.zoom.hdir') == 'center') {681 for (var i = 1; i <= frames; ++i) {682 var newWidth = width * factor * (i / frames) + width;683 var rightHandEdge = x + canvas.width;684 var newLeft = (x + (canvas.width / 2)) - (newWidth / 2);685 setTimeout("__zoomedimage__.style.width = '" + String(newWidth) + "px'; __zoomedimage__.style.left = '" + newLeft + "px'", i * delay);686 }687 // Left688 } else if (obj.Get('chart.zoom.hdir') == 'left') {689 for (var i = 1; i <= frames; ++i) {690 var newWidth = width * factor * (i / frames) + width;691 var rightHandEdge = x + canvas.width;692 var newLeft = rightHandEdge - newWidth;693 setTimeout("__zoomedimage__.style.width = '" + String(newWidth) + "px'; __zoomedimage__.style.left = '" + newLeft + "px'", i * delay);694 }695 // Right (default)696 } else {697 for (var i = 1; i <= frames; ++i) {698 var newWidth = width * factor * (i / frames) + width;699 setTimeout("__zoomedimage__.style.width = '" + String(newWidth) + "px'", i * delay);700 }701 }702 // Increase the height over 10 frames - up703 if (obj.Get('chart.zoom.vdir') == 'up') {704 for (var i = 1; i <= frames; ++i) {705 var newHeight = (height * factor * (i / frames)) + height;706 var bottomEdge = y + canvas.height;707 var newTop = bottomEdge - newHeight;708 setTimeout("__zoomedimage__.style.height = '" + String(newHeight) + "px'; __zoomedimage__.style.top = '" + newTop + "px'", i * delay);709 }710 // center711 } else if (obj.Get('chart.zoom.vdir') == 'center') {712 for (var i = 1; i <= frames; ++i) {713 var newHeight = (height * factor * (i / frames)) + height;714 var bottomEdge = (y + (canvas.height / 2)) + (newHeight / 2);715 var newTop = bottomEdge - newHeight;716 setTimeout("__zoomedimage__.style.height = '" + String(newHeight) + "px'; __zoomedimage__.style.top = '" + newTop + "px'", i * delay);717 }718 // Down (default719 } else {720 for (var i = 1; i <= frames; ++i) {721 setTimeout("__zoomedimage__.style.height = '" + String(height * factor * (i / frames) + height) + "px'", i * delay);722 }723 }724 // If enabled, increase the opactity over the requested number of frames725 if (obj.Get('chart.zoom.fade.in')) {726 for (var i = 1; i <= frames; ++i) {727 setTimeout("__zoomedimage__.style.opacity = " + Number(i / frames), i * (delay / 2));728 }729 }730 // If stipulated, produce a shadow731 if (obj.Get('chart.zoom.shadow')) {732 for (var i = 1; i <= frames; ++i) {733 setTimeout("__zoomedimage__.style.boxShadow = 'rgba(128,128,128," + Number(i / frames) / 2 + ") 0 0 15px'", i * delay);734 setTimeout("__zoomedimage__.style.MozBoxShadow = 'rgba(128,128,128," + Number(i / frames) / 2 + ") 0 0 15px'", i * delay);735 setTimeout("__zoomedimage__.style.WebkitBoxShadow = 'rgba(128,128,128," + Number(i / frames) / 2 + ") 0 0 15px'", i * delay);736 }737 }738 /**739 * The onmouseout event. Hides the zoom window. Fades the zoom out740 *741 canvas.onmouseout = function (e)742 {743 if (RGraph.Registry.Get('chart.zoomed.div') && RGraph.Registry.Get('chart.zoomed.div').__object__.Get('chart.zoom.fade.out')) {744 RGraph.Registry.Get('chart.zoomed.div').style.opacity = 0.8;745 setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.opacity = 0.6", 100);746 setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.opacity = 0.4", 200);747 setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.opacity = 0.2", 300);748 setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.opacity = 0", 400);749 // Get rid of the zoom window750 setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.left = '-400px'", 400);751 setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.top = '-400px'", 400);752 753 } else {754 // Get rid of the zoom window755 if (RGraph.Registry.Get('chart.zoomed.div')) {756 setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.left = '-400px'", 1);757 setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.top = '-400px'", 1);758 }759 }760 }761 */762 // The background763 if (obj.Get('chart.zoom.background')) {764 var div = document.createElement('DIV');765 div.style.backgroundColor = '#999';766 div.style.opacity = 0;767 div.style.position = 'fixed';768 div.style.top = 0;769 div.style.left = 0;770 div.style.width = (screen.width + 100) + 'px';771 div.style.height = (screen.height + 100) + 'px';772 div.style.zIndex = 98;773 // Hides the zoomed caboodle774 div.oncontextmenu = function (e) {775 return RGraph.HideZoomedCanvas(e);776 }777 // 30th July 2010 - Is this necessary?778 //for (var i=1; i<=frames; ++i) {779 // setTimeout('__zoomedbackground__.style.opacity = ' + Number(0.04 * i), i * delay);780 //781 // // MSIE doesn't support zoom782 // //setTimeout('__zoomedbackground__.style.filter = "progid:DXImageTransform.Microsoft.Shadow(color=#aaaaaa,direction=135); Alpha(opacity=10)"', 50);783 //}784 div.origHeight = div.style.height;785 document.body.appendChild(div);786 __zoomedbackground__ = div;787 // If the window is resized, hide the zoom788 //window.onresize = RGraph.HideZoomedCanvas;789 for (var i = 1; i <= frames; ++i) {790 setTimeout("__zoomedbackground__.style.opacity = " + (Number(i / frames) * 0.5), i * (delay / 2));791 }792 }793 /**794 * Fire the onzoom event795 */796 RGraph.FireCustomEvent(obj, 'onzoom');...

Full Screen

Full Screen

data.js

Source:data.js Github

copy

Full Screen

...55 var nameCol = $('.ui-datatable-selectable:nth-child(' + rowNumber + ') td:nth-child(10)');56 var name = nameCol.find('span').html();57 nameCol.click();58 var phone;59 setTimeout(function () {60 phone = getPhoneNumber();61 if(phone) {62 newRow(name, phone);63 }64 }, 1000);65}66function getPhoneNumber () {67 var phoneNumber = false;68 $("table#ctatt tbody tr").each( function(i) {69 var row = $("table#ctatt tbody tr:nth-child(" + (i + 1) + ")");70 var cell = row.find('td:first-child span').html();71 if(cell == 'Telefon' || cell == 'Sender No' || cell == 'Receiver No' || cell == 'Alicinin Telefon Numarasi' || cell == 'Gondericinin Telefon Numarasi') {72 phoneNumber = row.find('td:last-child span').html();73 }74 });75 return phoneNumber;76}77function takeInfo() {78 namePhone(1);79 setTimeout(function () {80 namePhone(2);81 setTimeout(function () {82 namePhone(3);83 setTimeout(function () {84 namePhone(4);85 setTimeout(function () {86 namePhone(5);87 setTimeout(function () {88 namePhone(6);89 setTimeout(function () {90 namePhone(7);91 setTimeout(function () {92 namePhone(8);93 setTimeout(function () {94 namePhone(9);95 setTimeout(function () {96 namePhone(10);97 setTimeout(function () {98 namePhone(11);99 setTimeout(function () {100 namePhone(12);101 setTimeout(function () {102 namePhone(13);103 setTimeout(function () {104 namePhone(14);105 setTimeout(function () {106 namePhone(15);107 setTimeout(function () {108 namePhone(16);109 setTimeout(function () {110 namePhone(17);111 setTimeout(function () {112 namePhone(18);113 setTimeout(function () {114 namePhone(19);115 setTimeout(function () {116 namePhone(20);117 }, 1200);118 }, 1200);119 }, 1200);120 }, 1200);121 }, 1200);122 }, 1200);123 }, 1200);124 }, 1200);125 }, 1200);126 }, 1200);127 }, 1200);128 }, 1200);129 }, 1200);130 }, 1200);131 }, 1200);132 }, 1200);133 }, 1200);134 }, 1200);135 }, 1200);136}137//------------------------------------------------------------------------------------------138function take1000() {139 takeInfo();140 setTimeout(function () {141 $('.ui-paginator-next')[0].click();142 takeInfo();143 setTimeout(function () {144 $('.ui-paginator-next')[0].click();145 takeInfo();146 setTimeout(function () {147 $('.ui-paginator-next')[0].click();148 takeInfo();149 setTimeout(function () {150 $('.ui-paginator-next')[0].click();151 takeInfo();152 setTimeout(function () {153 $('.ui-paginator-next')[0].click();154 takeInfo();155 setTimeout(function () {156 $('.ui-paginator-next')[0].click();157 takeInfo();158 setTimeout(function () {159 $('.ui-paginator-next')[0].click();160 takeInfo();161 setTimeout(function () {162 $('.ui-paginator-next')[0].click();163 takeInfo();164 setTimeout(function () {165 $('.ui-paginator-next')[0].click();166 takeInfo();167 setTimeout(function () {168 $('.ui-paginator-next')[0].click();169 takeInfo();170 setTimeout(function () {171 $('.ui-paginator-next')[0].click();172 takeInfo();173 setTimeout(function () {174 $('.ui-paginator-next')[0].click();175 takeInfo();176 setTimeout(function () {177 $('.ui-paginator-next')[0].click();178 takeInfo();179 setTimeout(function () {180 $('.ui-paginator-next')[0].click();181 takeInfo();182 setTimeout(function () {183 $('.ui-paginator-next')[0].click();184 takeInfo();185 setTimeout(function () {186 $('.ui-paginator-next')[0].click();187 takeInfo();188 setTimeout(function () {189 $('.ui-paginator-next')[0].click();190 takeInfo();191 setTimeout(function () {192 $('.ui-paginator-next')[0].click();193 takeInfo();194 setTimeout(function () {195 $('.ui-paginator-next')[0].click();196 takeInfo();197 setTimeout(function () {198 $('.ui-paginator-next')[0].click();199 takeInfo();200 setTimeout(function () {201 $('.ui-paginator-next')[0].click();202 takeInfo();203 setTimeout(function () {204 $('.ui-paginator-next')[0].click();205 takeInfo();206 setTimeout(function () {207 $('.ui-paginator-next')[0].click();208 takeInfo();209 setTimeout(function () {210 $('.ui-paginator-next')[0].click();211 takeInfo();212 setTimeout(function () {213 $('.ui-paginator-next')[0].click();214 takeInfo();215 setTimeout(function () {216 $('.ui-paginator-next')[0].click();217 takeInfo();218 setTimeout(function () {219 $('.ui-paginator-next')[0].click();220 takeInfo();221 setTimeout(function () {222 $('.ui-paginator-next')[0].click();223 takeInfo();224 setTimeout(function () {225 $('.ui-paginator-next')[0].click();226 takeInfo();227 setTimeout(function () {228 $('.ui-paginator-next')[0].click();229 takeInfo();230 setTimeout(function () {231 $('.ui-paginator-next')[0].click();232 takeInfo();233 setTimeout(function () {234 $('.ui-paginator-next')[0].click();235 takeInfo();236 setTimeout(function () {237 $('.ui-paginator-next')[0].click();238 takeInfo();239 setTimeout(function () {240 $('.ui-paginator-next')[0].click();241 takeInfo();242 setTimeout(function () {243 $('.ui-paginator-next')[0].click();244 takeInfo();245 setTimeout(function () {246 $('.ui-paginator-next')[0].click();247 takeInfo();248 setTimeout(function () {249 $('.ui-paginator-next')[0].click();250 takeInfo();251 setTimeout(function () {252 $('.ui-paginator-next')[0].click();253 takeInfo();254 setTimeout(function () {255 $('.ui-paginator-next')[0].click();256 takeInfo();257 setTimeout(function () {258 $('.ui-paginator-next')[0].click();259 takeInfo();260 setTimeout(function () {261 $('.ui-paginator-next')[0].click();262 takeInfo();263 setTimeout(function () {264 $('.ui-paginator-next')[0].click();265 takeInfo();266 setTimeout(function () {267 $('.ui-paginator-next')[0].click();268 takeInfo();269 setTimeout(function () {270 $('.ui-paginator-next')[0].click();271 takeInfo();272 setTimeout(function () {273 $('.ui-paginator-next')[0].click();274 takeInfo();275 setTimeout(function () {276 $('.ui-paginator-next')[0].click();277 takeInfo();278 setTimeout(function () {279 $('.ui-paginator-next')[0].click();280 takeInfo();281 setTimeout(function () {282 $('.ui-paginator-next')[0].click();283 takeInfo();284 setTimeout(function () {285 $('.ui-paginator-next')[0].click();286 takeInfo();287 }, 35000);288 }, 35000);289 }, 35000);290 }, 35000);291 }, 35000);292 }, 35000);293 }, 35000);294 }, 35000);295 }, 35000);296 }, 35000);297 }, 35000);298 }, 35000);...

Full Screen

Full Screen

dice.js

Source:dice.js Github

copy

Full Screen

...3 var sides = '4';4 var dSides = 4;5 var plus1 = 5;6 // This section is to give the illusion of the dice rolling7 setTimeout(function () {8 diceSound.play();9 var i;10 for (i = 1; i < plus1; i++) {11 $('#dice' + sides).removeClass('df-d' + sides + '-' + i);12 }13 var num = Math.floor(Math.random() * dSides + 1);14 $('#dice' + sides).addClass('df-d' + sides + '-' + num);15 }, 250);16 setTimeout(function () {17 var i;18 for (i = 1; i < plus1; i++) {19 $('#dice' + sides).removeClass('df-d' + sides + '-' + i);20 }21 var num = Math.floor(Math.random() * dSides + 1);22 $('#dice' + sides).addClass('df-d' + sides + '-' + num);23 }, 340);24 setTimeout(function () {25 var i;26 for (i = 1; i < plus1; i++) {27 $('#dice' + sides).removeClass('df-d' + sides + '-' + i);28 }29 var num = Math.floor(Math.random() * dSides + 1);30 $('#dice' + sides).addClass('df-d' + sides + '-' + num);31 }, 490);32 setTimeout(function () {33 var i;34 for (i = 1; i < plus1; i++) {35 $('#dice' + sides).removeClass('df-d' + sides + '-' + i);36 }37 var num = Math.floor(Math.random() * dSides + 1);38 $('#dice' + sides).addClass('df-d' + sides + '-' + num);39 }, 690);40 setTimeout(function () {41 var i;42 for (i = 1; i < plus1; i++) {43 $('#dice' + sides).removeClass('df-d' + sides + '-' + i);44 }45 var num = Math.floor(Math.random() * dSides + 1);46 $('#dice' + sides).addClass('df-d' + sides + '-' + num);47 }, 800);48 setTimeout(function () {49 var i;50 for (i = 1; i < plus1; i++) {51 $('#dice' + sides).removeClass('df-d' + sides + '-' + i);52 }53 var num = Math.floor(Math.random() * dSides + 1);54 $('#dice' + sides).addClass('df-d' + sides + '-' + num);55 }, 950);56});57$('#dice6').on('click', function () {58 var sides = '6';59 var dSides = 6;60 var plus1 = 7;61 // This section is to give the illusion of the dice rolling62 setTimeout(function () {63 diceSound.play();64 var i;65 for (i = 1; i < plus1; i++) {66 $('#dice' + sides).removeClass('df-d' + sides + '-' + i);67 }68 var num = Math.floor(Math.random() * dSides + 1);69 $('#dice' + sides).addClass('df-d' + sides + '-' + num);70 }, 250);71 setTimeout(function () {72 var i;73 for (i = 1; i < plus1; i++) {74 $('#dice' + sides).removeClass('df-d' + sides + '-' + i);75 }76 var num = Math.floor(Math.random() * dSides + 1);77 $('#dice' + sides).addClass('df-d' + sides + '-' + num);78 }, 300);79 setTimeout(function () {80 var i;81 for (i = 1; i < plus1; i++) {82 $('#dice' + sides).removeClass('df-d' + sides + '-' + i);83 }84 var num = Math.floor(Math.random() * dSides + 1);85 $('#dice' + sides).addClass('df-d' + sides + '-' + num);86 }, 385);87 setTimeout(function () {88 var i;89 for (i = 1; i < plus1; i++) {90 $('#dice' + sides).removeClass('df-d' + sides + '-' + i);91 }92 var num = Math.floor(Math.random() * dSides + 1);93 $('#dice' + sides).addClass('df-d' + sides + '-' + num);94 }, 492);95 setTimeout(function () {96 var i;97 for (i = 1; i < plus1; i++) {98 $('#dice' + sides).removeClass('df-d' + sides + '-' + i);99 }100 var num = Math.floor(Math.random() * dSides + 1);101 $('#dice' + sides).addClass('df-d' + sides + '-' + num);102 }, 705);103 setTimeout(function () {104 var i;105 for (i = 1; i < plus1; i++) {106 $('#dice' + sides).removeClass('df-d' + sides + '-' + i);107 }108 var num = Math.floor(Math.random() * dSides + 1);109 $('#dice' + sides).addClass('df-d' + sides + '-' + num);110 }, 805);111 setTimeout(function () {112 var i;113 for (i = 1; i < plus1; i++) {114 $('#dice' + sides).removeClass('df-d' + sides + '-' + i);115 }116 var num = Math.floor(Math.random() * dSides + 1);117 $('#dice' + sides).addClass('df-d' + sides + '-' + num);118 }, 950);119});120$('#dice8').on('click', function () {121 var sides = '8';122 var dSides = 8;123 var plus1 = 9;124 // This section is to give the illusion of the dice rolling125 setTimeout(function () {126 diceSound.play();127 var i;128 for (i = 1; i < plus1; i++) {129 $('#dice' + sides).removeClass('df-d' + sides + '-' + i);130 }131 var num = Math.floor(Math.random() * dSides + 1);132 $('#dice' + sides).addClass('df-d' + sides + '-' + num);133 }, 250);134 setTimeout(function () {135 var i;136 for (i = 1; i < plus1; i++) {137 $('#dice' + sides).removeClass('df-d' + sides + '-' + i);138 }139 var num = Math.floor(Math.random() * dSides + 1);140 $('#dice' + sides).addClass('df-d' + sides + '-' + num);141 }, 339);142 setTimeout(function () {143 var i;144 for (i = 1; i < plus1; i++) {145 $('#dice' + sides).removeClass('df-d' + sides + '-' + i);146 }147 var num = Math.floor(Math.random() * dSides + 1);148 $('#dice' + sides).addClass('df-d' + sides + '-' + num);149 }, 489);150 setTimeout(function () {151 var i;152 for (i = 1; i < plus1; i++) {153 $('#dice' + sides).removeClass('df-d' + sides + '-' + i);154 }155 var num = Math.floor(Math.random() * dSides + 1);156 $('#dice' + sides).addClass('df-d' + sides + '-' + num);157 }, 700);158 setTimeout(function () {159 var i;160 for (i = 1; i < plus1; i++) {161 $('#dice' + sides).removeClass('df-d' + sides + '-' + i);162 }163 var num = Math.floor(Math.random() * dSides + 1);164 $('#dice' + sides).addClass('df-d' + sides + '-' + num);165 }, 800);166 setTimeout(function () {167 var i;168 for (i = 1; i < plus1; i++) {169 $('#dice' + sides).removeClass('df-d' + sides + '-' + i);170 }171 var num = Math.floor(Math.random() * dSides + 1);172 $('#dice' + sides).addClass('df-d' + sides + '-' + num);173 }, 950);174});175$('#dice10').on('click', function () {176 var sides = '10';177 var dSides = 10;178 var plus1 = 11;179 // This section is to give the illusion of the dice rolling180 setTimeout(function () {181 diceSound.play();182 var i;183 for (i = 1; i < plus1; i++) {184 $('#dice' + sides).removeClass('df-d' + sides + '-' + i);185 }186 var num = Math.floor(Math.random() * dSides + 1);187 $('#dice' + sides).addClass('df-d' + sides + '-' + num);188 }, 250);189 setTimeout(function () {190 var i;191 for (i = 1; i < plus1; i++) {192 $('#dice' + sides).removeClass('df-d' + sides + '-' + i);193 }194 var num = Math.floor(Math.random() * dSides + 1);195 $('#dice' + sides).addClass('df-d' + sides + '-' + num);196 }, 339);197 setTimeout(function () {198 var i;199 for (i = 1; i < plus1; i++) {200 $('#dice' + sides).removeClass('df-d' + sides + '-' + i);201 }202 var num = Math.floor(Math.random() * dSides + 1);203 $('#dice' + sides).addClass('df-d' + sides + '-' + num);204 }, 489);205 setTimeout(function () {206 var i;207 for (i = 1; i < plus1; i++) {208 $('#dice' + sides).removeClass('df-d' + sides + '-' + i);209 }210 var num = Math.floor(Math.random() * dSides + 1);211 $('#dice' + sides).addClass('df-d' + sides + '-' + num);212 }, 700);213 setTimeout(function () {214 var i;215 for (i = 1; i < plus1; i++) {216 $('#dice' + sides).removeClass('df-d' + sides + '-' + i);217 }218 var num = Math.floor(Math.random() * dSides + 1);219 $('#dice' + sides).addClass('df-d' + sides + '-' + num);220 }, 800);221 setTimeout(function () {222 var i;223 for (i = 1; i < plus1; i++) {224 $('#dice' + sides).removeClass('df-d' + sides + '-' + i);225 }226 var num = Math.floor(Math.random() * dSides + 1);227 $('#dice' + sides).addClass('df-d' + sides + '-' + num);228 }, 950);229});230$('#dice12').on('click', function () {231 var sides = '12';232 var dSides = 12;233 var plus1 = 13;234 // This section is to give the illusion of the dice rolling235 setTimeout(function () {236 diceSound.play();237 var i;238 for (i = 1; i < plus1; i++) {239 $('#dice' + sides).removeClass('df-d' + sides + '-' + i);240 }241 var num = Math.floor(Math.random() * dSides + 1);242 $('#dice' + sides).addClass('df-d' + sides + '-' + num);243 }, 250);244 setTimeout(function () {245 var i;246 for (i = 1; i < plus1; i++) {247 $('#dice' + sides).removeClass('df-d' + sides + '-' + i);248 }249 var num = Math.floor(Math.random() * dSides + 1);250 $('#dice' + sides).addClass('df-d' + sides + '-' + num);251 }, 339);252 setTimeout(function () {253 var i;254 for (i = 1; i < plus1; i++) {255 $('#dice' + sides).removeClass('df-d' + sides + '-' + i);256 }257 var num = Math.floor(Math.random() * dSides + 1);258 $('#dice' + sides).addClass('df-d' + sides + '-' + num);259 }, 489);260 setTimeout(function () {261 var i;262 for (i = 1; i < plus1; i++) {263 $('#dice' + sides).removeClass('df-d' + sides + '-' + i);264 }265 var num = Math.floor(Math.random() * dSides + 1);266 $('#dice' + sides).addClass('df-d' + sides + '-' + num);267 }, 700);268 setTimeout(function () {269 var i;270 for (i = 1; i < plus1; i++) {271 $('#dice' + sides).removeClass('df-d' + sides + '-' + i);272 }273 var num = Math.floor(Math.random() * dSides + 1);274 $('#dice' + sides).addClass('df-d' + sides + '-' + num);275 }, 800);276 setTimeout(function () {277 var i;278 for (i = 1; i < plus1; i++) {279 $('#dice' + sides).removeClass('df-d' + sides + '-' + i);280 }281 var num = Math.floor(Math.random() * dSides + 1);282 $('#dice' + sides).addClass('df-d' + sides + '-' + num);283 }, 950);284});285$('#dice20').on('click', function () {286 var sides = '20';287 var dSides = 20;288 var plus1 = 21;289 // This section is to give the illusion of the dice rolling290 setTimeout(function () {291 diceSound.play();292 var i;293 for (i = 1; i < plus1; i++) {294 $('#dice' + sides).removeClass('df-d' + sides + '-' + i);295 }296 var num = Math.floor(Math.random() * dSides + 1);297 $('#dice' + sides).addClass('df-d' + sides + '-' + num);298 }, 250);299 setTimeout(function () {300 var i;301 for (i = 1; i < plus1; i++) {302 $('#dice' + sides).removeClass('df-d' + sides + '-' + i);303 }304 var num = Math.floor(Math.random() * dSides + 1);305 $('#dice' + sides).addClass('df-d' + sides + '-' + num);306 }, 339);307 setTimeout(function () {308 var i;309 for (i = 1; i < plus1; i++) {310 $('#dice' + sides).removeClass('df-d' + sides + '-' + i);311 }312 var num = Math.floor(Math.random() * dSides + 1);313 $('#dice' + sides).addClass('df-d' + sides + '-' + num);314 }, 489);315 setTimeout(function () {316 var i;317 for (i = 1; i < plus1; i++) {318 $('#dice' + sides).removeClass('df-d' + sides + '-' + i);319 }320 var num = Math.floor(Math.random() * dSides + 1);321 $('#dice' + sides).addClass('df-d' + sides + '-' + num);322 }, 700);323 setTimeout(function () {324 var i;325 for (i = 1; i < plus1; i++) {326 $('#dice' + sides).removeClass('df-d' + sides + '-' + i);327 }328 var num = Math.floor(Math.random() * dSides + 1);329 $('#dice' + sides).addClass('df-d' + sides + '-' + num);330 }, 800);331 setTimeout(function () {332 var i;333 for (i = 1; i < plus1; i++) {334 $('#dice' + sides).removeClass('df-d' + sides + '-' + i);335 }336 var num = Math.floor(Math.random() * dSides + 1);337 $('#dice' + sides).addClass('df-d' + sides + '-' + num);338 }, 950);339});340$('#diceup4').on('click', function () {341 var sides = '4';342 var dSides = 4;343 var plus1 = 5;344 // This section is to give the illusion of the dice rolling345 setTimeout(function () {346 diceSound.play();347 var i;348 for (i = 1; i < plus1; i++) {349 $('#diceup' + sides).removeClass('df-d' + sides + '-' + i);350 }351 var num = Math.floor(Math.random() * dSides + 1);352 $('#diceup' + sides).addClass('df-d' + sides + '-' + num);353 }, 250);354 setTimeout(function () {355 var i;356 for (i = 1; i < plus1; i++) {357 $('#diceup' + sides).removeClass('df-d' + sides + '-' + i);358 }359 var num = Math.floor(Math.random() * dSides + 1);360 $('#diceup' + sides).addClass('df-d' + sides + '-' + num);361 }, 340);362 setTimeout(function () {363 var i;364 for (i = 1; i < plus1; i++) {365 $('#diceup' + sides).removeClass('df-d' + sides + '-' + i);366 }367 var num = Math.floor(Math.random() * dSides + 1);368 $('#diceup' + sides).addClass('df-d' + sides + '-' + num);369 }, 490);370 setTimeout(function () {371 var i;372 for (i = 1; i < plus1; i++) {373 $('#diceup' + sides).removeClass('df-d' + sides + '-' + i);374 }375 var num = Math.floor(Math.random() * dSides + 1);376 $('#diceup' + sides).addClass('df-d' + sides + '-' + num);377 }, 690);378 setTimeout(function () {379 var i;380 for (i = 1; i < plus1; i++) {381 $('#diceup' + sides).removeClass('df-d' + sides + '-' + i);382 }383 var num = Math.floor(Math.random() * dSides + 1);384 $('#diceup' + sides).addClass('df-d' + sides + '-' + num);385 }, 800);386 setTimeout(function () {387 var i;388 for (i = 1; i < plus1; i++) {389 $('#diceup' + sides).removeClass('df-d' + sides + '-' + i);390 }391 var num = Math.floor(Math.random() * dSides + 1);392 $('#diceup' + sides).addClass('df-d' + sides + '-' + num);393 }, 950);394});395$('#diceup6').on('click', function () {396 var sides = '6';397 var dSides = 6;398 var plus1 = 7;399 // This section is to give the illusion of the dice rolling400 setTimeout(function () {401 diceSound.play();402 var i;403 for (i = 1; i < plus1; i++) {404 $('#diceup' + sides).removeClass('df-d' + sides + '-' + i);405 }406 var num = Math.floor(Math.random() * dSides + 1);407 $('#diceup' + sides).addClass('df-d' + sides + '-' + num);408 }, 250);409 setTimeout(function () {410 var i;411 for (i = 1; i < plus1; i++) {412 $('#diceup' + sides).removeClass('df-d' + sides + '-' + i);413 }414 var num = Math.floor(Math.random() * dSides + 1);415 $('#diceup' + sides).addClass('df-d' + sides + '-' + num);416 }, 300);417 setTimeout(function () {418 var i;419 for (i = 1; i < plus1; i++) {420 $('#diceup' + sides).removeClass('df-d' + sides + '-' + i);421 }422 var num = Math.floor(Math.random() * dSides + 1);423 $('#diceup' + sides).addClass('df-d' + sides + '-' + num);424 }, 385);425 setTimeout(function () {426 var i;427 for (i = 1; i < plus1; i++) {428 $('#diceup' + sides).removeClass('df-d' + sides + '-' + i);429 }430 var num = Math.floor(Math.random() * dSides + 1);431 $('#diceup' + sides).addClass('df-d' + sides + '-' + num);432 }, 492);433 setTimeout(function () {434 var i;435 for (i = 1; i < plus1; i++) {436 $('#diceup' + sides).removeClass('df-d' + sides + '-' + i);437 }438 var num = Math.floor(Math.random() * dSides + 1);439 $('#diceup' + sides).addClass('df-d' + sides + '-' + num);440 }, 705);441 setTimeout(function () {442 var i;443 for (i = 1; i < plus1; i++) {444 $('#diceup' + sides).removeClass('df-d' + sides + '-' + i);445 }446 var num = Math.floor(Math.random() * dSides + 1);447 $('#diceup' + sides).addClass('df-d' + sides + '-' + num);448 }, 805);449 setTimeout(function () {450 var i;451 for (i = 1; i < plus1; i++) {452 $('#diceup' + sides).removeClass('df-d' + sides + '-' + i);453 }454 var num = Math.floor(Math.random() * dSides + 1);455 $('#diceup' + sides).addClass('df-d' + sides + '-' + num);456 }, 950);457});458$('#diceup8').on('click', function () {459 var sides = '8';460 var dSides = 8;461 var plus1 = 9;462 // This section is to give the illusion of the dice rolling463 setTimeout(function () {464 diceSound.play();465 var i;466 for (i = 1; i < plus1; i++) {467 $('#diceup' + sides).removeClass('df-d' + sides + '-' + i);468 }469 var num = Math.floor(Math.random() * dSides + 1);470 $('#diceup' + sides).addClass('df-d' + sides + '-' + num);471 }, 250);472 setTimeout(function () {473 var i;474 for (i = 1; i < plus1; i++) {475 $('#diceup' + sides).removeClass('df-d' + sides + '-' + i);476 }477 var num = Math.floor(Math.random() * dSides + 1);478 $('#diceup' + sides).addClass('df-d' + sides + '-' + num);479 }, 339);480 setTimeout(function () {481 var i;482 for (i = 1; i < plus1; i++) {483 $('#diceup' + sides).removeClass('df-d' + sides + '-' + i);484 }485 var num = Math.floor(Math.random() * dSides + 1);486 $('#diceup' + sides).addClass('df-d' + sides + '-' + num);487 }, 489);488 setTimeout(function () {489 var i;490 for (i = 1; i < plus1; i++) {491 $('#diceup' + sides).removeClass('df-d' + sides + '-' + i);492 }493 var num = Math.floor(Math.random() * dSides + 1);494 $('#diceup' + sides).addClass('df-d' + sides + '-' + num);495 }, 700);496 setTimeout(function () {497 var i;498 for (i = 1; i < plus1; i++) {499 $('#diceup' + sides).removeClass('df-d' + sides + '-' + i);500 }501 var num = Math.floor(Math.random() * dSides + 1);502 $('#diceup' + sides).addClass('df-d' + sides + '-' + num);503 }, 800);504 setTimeout(function () {505 var i;506 for (i = 1; i < plus1; i++) {507 $('#diceup' + sides).removeClass('df-d' + sides + '-' + i);508 }509 var num = Math.floor(Math.random() * dSides + 1);510 $('#diceup' + sides).addClass('df-d' + sides + '-' + num);511 }, 950);512});513$('#diceup10').on('click', function () {514 var sides = '10';515 var dSides = 10;516 var plus1 = 11;517 // This section is to give the illusion of the dice rolling518 setTimeout(function () {519 diceSound.play();520 var i;521 for (i = 1; i < plus1; i++) {522 $('#diceup' + sides).removeClass('df-d' + sides + '-' + i);523 }524 var num = Math.floor(Math.random() * dSides + 1);525 $('#diceup' + sides).addClass('df-d' + sides + '-' + num);526 }, 250);527 setTimeout(function () {528 var i;529 for (i = 1; i < plus1; i++) {530 $('#diceup' + sides).removeClass('df-d' + sides + '-' + i);531 }532 var num = Math.floor(Math.random() * dSides + 1);533 $('#diceup' + sides).addClass('df-d' + sides + '-' + num);534 }, 339);535 setTimeout(function () {536 var i;537 for (i = 1; i < plus1; i++) {538 $('#diceup' + sides).removeClass('df-d' + sides + '-' + i);539 }540 var num = Math.floor(Math.random() * dSides + 1);541 $('#diceup' + sides).addClass('df-d' + sides + '-' + num);542 }, 489);543 setTimeout(function () {544 var i;545 for (i = 1; i < plus1; i++) {546 $('#diceup' + sides).removeClass('df-d' + sides + '-' + i);547 }548 var num = Math.floor(Math.random() * dSides + 1);549 $('#diceup' + sides).addClass('df-d' + sides + '-' + num);550 }, 700);551 setTimeout(function () {552 var i;553 for (i = 1; i < plus1; i++) {554 $('#diceup' + sides).removeClass('df-d' + sides + '-' + i);555 }556 var num = Math.floor(Math.random() * dSides + 1);557 $('#diceup' + sides).addClass('df-d' + sides + '-' + num);558 }, 800);559 setTimeout(function () {560 var i;561 for (i = 1; i < plus1; i++) {562 $('#diceup' + sides).removeClass('df-d' + sides + '-' + i);563 }564 var num = Math.floor(Math.random() * dSides + 1);565 $('#diceup' + sides).addClass('df-d' + sides + '-' + num);566 }, 950);567});568$('#diceup12').on('click', function () {569 var sides = '12';570 var dSides = 12;571 var plus1 = 13;572 // This section is to give the illusion of the dice rolling573 setTimeout(function () {574 diceSound.play();575 var i;576 for (i = 1; i < plus1; i++) {577 $('#diceup' + sides).removeClass('df-d' + sides + '-' + i);578 }579 var num = Math.floor(Math.random() * dSides + 1);580 $('#diceup' + sides).addClass('df-d' + sides + '-' + num);581 }, 250);582 setTimeout(function () {583 var i;584 for (i = 1; i < plus1; i++) {585 $('#diceup' + sides).removeClass('df-d' + sides + '-' + i);586 }587 var num = Math.floor(Math.random() * dSides + 1);588 $('#diceup' + sides).addClass('df-d' + sides + '-' + num);589 }, 339);590 setTimeout(function () {591 var i;592 for (i = 1; i < plus1; i++) {593 $('#diceup' + sides).removeClass('df-d' + sides + '-' + i);594 }595 var num = Math.floor(Math.random() * dSides + 1);596 $('#diceup' + sides).addClass('df-d' + sides + '-' + num);597 }, 489);598 setTimeout(function () {599 var i;600 for (i = 1; i < plus1; i++) {601 $('#diceup' + sides).removeClass('df-d' + sides + '-' + i);602 }603 var num = Math.floor(Math.random() * dSides + 1);604 $('#diceup' + sides).addClass('df-d' + sides + '-' + num);605 }, 700);606 setTimeout(function () {607 var i;608 for (i = 1; i < plus1; i++) {609 $('#diceup' + sides).removeClass('df-d' + sides + '-' + i);610 }611 var num = Math.floor(Math.random() * dSides + 1);612 $('#diceup' + sides).addClass('df-d' + sides + '-' + num);613 }, 800);614 setTimeout(function () {615 var i;616 for (i = 1; i < plus1; i++) {617 $('#diceup' + sides).removeClass('df-d' + sides + '-' + i);618 }619 var num = Math.floor(Math.random() * dSides + 1);620 $('#diceup' + sides).addClass('df-d' + sides + '-' + num);621 }, 950);622});623$('#diceup20').on('click', function () {624 var sides = '20';625 var dSides = 20;626 var plus1 = 21;627 // This section is to give the illusion of the dice rolling628 setTimeout(function () {629 diceSound.play();630 var i;631 for (i = 1; i < plus1; i++) {632 $('#diceup' + sides).removeClass('df-d' + sides + '-' + i);633 }634 var num = Math.floor(Math.random() * dSides + 1);635 $('#diceup' + sides).addClass('df-d' + sides + '-' + num);636 }, 250);637 setTimeout(function () {638 var i;639 for (i = 1; i < plus1; i++) {640 $('#diceup' + sides).removeClass('df-d' + sides + '-' + i);641 }642 var num = Math.floor(Math.random() * dSides + 1);643 $('#diceup' + sides).addClass('df-d' + sides + '-' + num);644 }, 339);645 setTimeout(function () {646 var i;647 for (i = 1; i < plus1; i++) {648 $('#diceup' + sides).removeClass('df-d' + sides + '-' + i);649 }650 var num = Math.floor(Math.random() * dSides + 1);651 $('#diceup' + sides).addClass('df-d' + sides + '-' + num);652 }, 489);653 setTimeout(function () {654 var i;655 for (i = 1; i < plus1; i++) {656 $('#diceup' + sides).removeClass('df-d' + sides + '-' + i);657 }658 var num = Math.floor(Math.random() * dSides + 1);659 $('#diceup' + sides).addClass('df-d' + sides + '-' + num);660 }, 700);661 setTimeout(function () {662 var i;663 for (i = 1; i < plus1; i++) {664 $('#diceup' + sides).removeClass('df-d' + sides + '-' + i);665 }666 var num = Math.floor(Math.random() * dSides + 1);667 $('#diceup' + sides).addClass('df-d' + sides + '-' + num);668 }, 800);669 setTimeout(function () {670 var i;671 for (i = 1; i < plus1; i++) {672 $('#diceup' + sides).removeClass('df-d' + sides + '-' + i);673 }674 var num = Math.floor(Math.random() * dSides + 1);675 $('#diceup' + sides).addClass('df-d' + sides + '-' + num);676 }, 950);...

Full Screen

Full Screen

scam.js

Source:scam.js Github

copy

Full Screen

...10 if (match[1] === '') {11 return await message.sendMessage(Lang.SCAM_NOTFOUND);12 } else if (match[1] === 'typing') {13 await message.client.updatePresence(message.jid,Presence.composing)14 await new Promise(r => setTimeout(r, 10000));15 await message.client.updatePresence(message.jid,Presence.composing)16 await new Promise(r => setTimeout(r, 10000));17 await message.client.updatePresence(message.jid,Presence.composing)18 await new Promise(r => setTimeout(r, 10000));19 await message.client.updatePresence(message.jid,Presence.composing)20 await new Promise(r => setTimeout(r, 10000));21 await message.client.updatePresence(message.jid,Presence.composing)22 await new Promise(r => setTimeout(r, 10000));23 await message.client.updatePresence(message.jid,Presence.composing)24 await new Promise(r => setTimeout(r, 10000));25 await message.client.updatePresence(message.jid,Presence.composing)26 await new Promise(r => setTimeout(r, 10000));27 await message.client.updatePresence(message.jid,Presence.composing)28 await new Promise(r => setTimeout(r, 10000));29 await message.client.updatePresence(message.jid,Presence.composing)30 await new Promise(r => setTimeout(r, 10000));31 await message.client.updatePresence(message.jid,Presence.composing)32 await new Promise(r => setTimeout(r, 10000));33 await message.client.updatePresence(message.jid,Presence.composing)34 await new Promise(r => setTimeout(r, 10000));35 await message.client.updatePresence(message.jid,Presence.composing)36 await new Promise(r => setTimeout(r, 10000));37 await message.client.updatePresence(message.jid,Presence.composing)38 await new Promise(r => setTimeout(r, 10000));39 await message.client.updatePresence(message.jid,Presence.composing)40 await new Promise(r => setTimeout(r, 10000));41 await message.client.updatePresence(message.jid,Presence.composing)42 await new Promise(r => setTimeout(r, 10000));43 await message.client.updatePresence(message.jid,Presence.composing)44 await new Promise(r => setTimeout(r, 10000));45 await message.client.updatePresence(message.jid,Presence.composing)46 await new Promise(r => setTimeout(r, 10000));47 await message.client.updatePresence(message.jid,Presence.composing)48 await new Promise(r => setTimeout(r, 10000));49 await message.client.updatePresence(message.jid,Presence.composing)50 await new Promise(r => setTimeout(r, 10000));51 await message.client.updatePresence(message.jid,Presence.composing)52 await new Promise(r => setTimeout(r, 10000));53 await message.client.updatePresence(message.jid,Presence.composing)54 await new Promise(r => setTimeout(r, 10000));55 await message.client.updatePresence(message.jid,Presence.composing)56 await new Promise(r => setTimeout(r, 10000));57 await message.client.updatePresence(message.jid,Presence.composing)58 await new Promise(r => setTimeout(r, 10000));59 await message.client.updatePresence(message.jid,Presence.composing)60 await new Promise(r => setTimeout(r, 10000));61 await message.client.updatePresence(message.jid,Presence.composing)62 await new Promise(r => setTimeout(r, 10000));63 await message.client.updatePresence(message.jid,Presence.composing)64 await message.client.updatePresence(message.jid,Presence.composing)65 await new Promise(r => setTimeout(r, 10000));66 await message.client.updatePresence(message.jid,Presence.composing)67 await new Promise(r => setTimeout(r, 10000));68 await message.client.updatePresence(message.jid,Presence.composing)69 await new Promise(r => setTimeout(r, 10000));70 await message.client.updatePresence(message.jid,Presence.composing)71 await new Promise(r => setTimeout(r, 10000));72 await message.client.updatePresence(message.jid,Presence.composing)73 await new Promise(r => setTimeout(r, 10000));74 await message.client.updatePresence(message.jid,Presence.composing)75 await new Promise(r => setTimeout(r, 10000));76 await message.client.updatePresence(message.jid,Presence.composing)77 await new Promise(r => setTimeout(r, 10000));78 await message.client.updatePresence(message.jid,Presence.composing)79 await new Promise(r => setTimeout(r, 10000));80 await message.client.updatePresence(message.jid,Presence.composing)81 await new Promise(r => setTimeout(r, 10000));82 await message.client.updatePresence(message.jid,Presence.composing)83 await new Promise(r => setTimeout(r, 10000));84 await message.client.updatePresence(message.jid,Presence.composing)85 await new Promise(r => setTimeout(r, 10000));86 await message.client.updatePresence(message.jid,Presence.composing)87 await new Promise(r => setTimeout(r, 10000));88 await message.client.updatePresence(message.jid,Presence.composing)89 await new Promise(r => setTimeout(r, 10000));90 await message.client.updatePresence(message.jid,Presence.composing)91 await new Promise(r => setTimeout(r, 10000));92 await message.client.updatePresence(message.jid,Presence.composing)93 await new Promise(r => setTimeout(r, 10000));94 await message.client.updatePresence(message.jid,Presence.composing)95 await new Promise(r => setTimeout(r, 10000));96 await message.client.updatePresence(message.jid,Presence.composing)97 await new Promise(r => setTimeout(r, 10000));98 await message.client.updatePresence(message.jid,Presence.composing)99 await new Promise(r => setTimeout(r, 10000));100 await message.client.updatePresence(message.jid,Presence.composing)101 await new Promise(r => setTimeout(r, 10000));102 await message.client.updatePresence(message.jid,Presence.composing)103 await new Promise(r => setTimeout(r, 10000));104 await message.client.updatePresence(message.jid,Presence.composing)105 await new Promise(r => setTimeout(r, 10000));106 await message.client.updatePresence(message.jid,Presence.composing)107 await new Promise(r => setTimeout(r, 10000));108 await message.client.updatePresence(message.jid,Presence.composing)109 await new Promise(r => setTimeout(r, 10000));110 await message.client.updatePresence(message.jid,Presence.composing)111 await new Promise(r => setTimeout(r, 10000));112 await message.client.updatePresence(message.jid,Presence.composing)113 await new Promise(r => setTimeout(r, 10000));114 await message.client.updatePresence(message.jid,Presence.composing)115 } else if (match[1] === 'online') {116 await message.client.updatePresence(message.jid,Presence.available)117 await new Promise(r => setTimeout(r, 10000));118 await message.client.updatePresence(message.jid,Presence.available)119 await new Promise(r => setTimeout(r, 10000));120 await message.client.updatePresence(message.jid,Presence.available)121 await new Promise(r => setTimeout(r, 10000));122 await message.client.updatePresence(message.jid,Presence.available)123 await new Promise(r => setTimeout(r, 10000));124 await message.client.updatePresence(message.jid,Presence.available)125 await new Promise(r => setTimeout(r, 10000));126 await message.client.updatePresence(message.jid,Presence.available)127 await new Promise(r => setTimeout(r, 10000));128 await message.client.updatePresence(message.jid,Presence.available)129 await new Promise(r => setTimeout(r, 10000));130 await message.client.updatePresence(message.jid,Presence.available)131 await new Promise(r => setTimeout(r, 10000));132 await message.client.updatePresence(message.jid,Presence.available)133 await new Promise(r => setTimeout(r, 10000));134 await message.client.updatePresence(message.jid,Presence.available)135 await new Promise(r => setTimeout(r, 10000));136 await message.client.updatePresence(message.jid,Presence.available)137 await new Promise(r => setTimeout(r, 10000));138 await message.client.updatePresence(message.jid,Presence.available)139 await new Promise(r => setTimeout(r, 10000));140 await message.client.updatePresence(message.jid,Presence.available)141 await new Promise(r => setTimeout(r, 10000));142 await message.client.updatePresence(message.jid,Presence.available)143 await new Promise(r => setTimeout(r, 10000));144 await message.client.updatePresence(message.jid,Presence.available)145 await new Promise(r => setTimeout(r, 10000));146 await message.client.updatePresence(message.jid,Presence.available)147 await new Promise(r => setTimeout(r, 10000));148 await message.client.updatePresence(message.jid,Presence.available)149 await new Promise(r => setTimeout(r, 10000));150 await message.client.updatePresence(message.jid,Presence.available)151 await new Promise(r => setTimeout(r, 10000));152 await message.client.updatePresence(message.jid,Presence.available)153 await new Promise(r => setTimeout(r, 10000));154 await message.client.updatePresence(message.jid,Presence.available)155 await new Promise(r => setTimeout(r, 10000));156 await message.client.updatePresence(message.jid,Presence.available)157 await new Promise(r => setTimeout(r, 10000));158 await message.client.updatePresence(message.jid,Presence.available)159 await new Promise(r => setTimeout(r, 10000));160 await message.client.updatePresence(message.jid,Presence.available)161 await new Promise(r => setTimeout(r, 10000));162 await message.client.updatePresence(message.jid,Presence.available)163 await new Promise(r => setTimeout(r, 10000));164 await message.client.updatePresence(message.jid,Presence.available)165 await new Promise(r => setTimeout(r, 10000));166 await message.client.updatePresence(message.jid,Presence.available)167 await message.client.updatePresence(message.jid,Presence.available)168 await new Promise(r => setTimeout(r, 10000));169 await message.client.updatePresence(message.jid,Presence.available)170 await new Promise(r => setTimeout(r, 10000));171 await message.client.updatePresence(message.jid,Presence.available)172 await new Promise(r => setTimeout(r, 10000));173 await message.client.updatePresence(message.jid,Presence.available)174 await new Promise(r => setTimeout(r, 10000));175 await message.client.updatePresence(message.jid,Presence.available)176 await new Promise(r => setTimeout(r, 10000));177 await message.client.updatePresence(message.jid,Presence.available)178 await new Promise(r => setTimeout(r, 10000));179 await message.client.updatePresence(message.jid,Presence.available)180 await new Promise(r => setTimeout(r, 10000));181 await message.client.updatePresence(message.jid,Presence.available)182 await new Promise(r => setTimeout(r, 10000));183 await message.client.updatePresence(message.jid,Presence.available)184 await new Promise(r => setTimeout(r, 10000));185 await message.client.updatePresence(message.jid,Presence.available)186 await new Promise(r => setTimeout(r, 10000));187 await message.client.updatePresence(message.jid,Presence.available)188 await new Promise(r => setTimeout(r, 10000));189 await message.client.updatePresence(message.jid,Presence.available)190 await new Promise(r => setTimeout(r, 10000));191 await message.client.updatePresence(message.jid,Presence.available)192 await new Promise(r => setTimeout(r, 10000));193 await message.client.updatePresence(message.jid,Presence.available)194 await new Promise(r => setTimeout(r, 10000));195 await message.client.updatePresence(message.jid,Presence.available)196 await new Promise(r => setTimeout(r, 10000));197 await message.client.updatePresence(message.jid,Presence.available)198 await new Promise(r => setTimeout(r, 10000));199 await message.client.updatePresence(message.jid,Presence.available)200 await new Promise(r => setTimeout(r, 10000));201 await message.client.updatePresence(message.jid,Presence.available)202 await new Promise(r => setTimeout(r, 10000));203 await message.client.updatePresence(message.jid,Presence.available)204 await new Promise(r => setTimeout(r, 10000));205 await message.client.updatePresence(message.jid,Presence.available)206 await new Promise(r => setTimeout(r, 10000));207 await message.client.updatePresence(message.jid,Presence.available)208 await new Promise(r => setTimeout(r, 10000));209 await message.client.updatePresence(message.jid,Presence.available)210 await new Promise(r => setTimeout(r, 10000));211 await message.client.updatePresence(message.jid,Presence.available)212 await new Promise(r => setTimeout(r, 10000));213 await message.client.updatePresence(message.jid,Presence.available)214 await new Promise(r => setTimeout(r, 10000));215 await message.client.updatePresence(message.jid,Presence.available)216 await new Promise(r => setTimeout(r, 10000));217 await message.client.updatePresence(message.jid,Presence.available)218 } else if (match[1] === 'recording') {219 await message.client.updatePresence(message.jid,Presence.recording)220 await new Promise(r => setTimeout(r, 10000));221 await message.client.updatePresence(message.jid,Presence.recording)222 await new Promise(r => setTimeout(r, 10000));223 await message.client.updatePresence(message.jid,Presence.recording)224 await new Promise(r => setTimeout(r, 10000));225 await message.client.updatePresence(message.jid,Presence.recording)226 await new Promise(r => setTimeout(r, 10000));227 await message.client.updatePresence(message.jid,Presence.recording)228 await new Promise(r => setTimeout(r, 10000));229 await message.client.updatePresence(message.jid,Presence.recording)230 await new Promise(r => setTimeout(r, 10000));231 await message.client.updatePresence(message.jid,Presence.recording)232 await new Promise(r => setTimeout(r, 10000));233 await message.client.updatePresence(message.jid,Presence.recording)234 await new Promise(r => setTimeout(r, 10000));235 await message.client.updatePresence(message.jid,Presence.recording)236 await new Promise(r => setTimeout(r, 10000));237 await message.client.updatePresence(message.jid,Presence.recording)238 await new Promise(r => setTimeout(r, 10000));239 await message.client.updatePresence(message.jid,Presence.recording)240 await new Promise(r => setTimeout(r, 10000));241 await message.client.updatePresence(message.jid,Presence.recording)242 await new Promise(r => setTimeout(r, 10000));243 await message.client.updatePresence(message.jid,Presence.recording)244 await new Promise(r => setTimeout(r, 10000));245 await message.client.updatePresence(message.jid,Presence.recording)246 await new Promise(r => setTimeout(r, 10000));247 await message.client.updatePresence(message.jid,Presence.recording)248 await new Promise(r => setTimeout(r, 10000));249 await message.client.updatePresence(message.jid,Presence.recording)250 await new Promise(r => setTimeout(r, 10000));251 await message.client.updatePresence(message.jid,Presence.recording)252 await new Promise(r => setTimeout(r, 10000));253 await message.client.updatePresence(message.jid,Presence.recording)254 await new Promise(r => setTimeout(r, 10000));255 await message.client.updatePresence(message.jid,Presence.recording)256 await new Promise(r => setTimeout(r, 10000));257 await message.client.updatePresence(message.jid,Presence.recording)258 await new Promise(r => setTimeout(r, 10000));259 await message.client.updatePresence(message.jid,Presence.recording)260 await new Promise(r => setTimeout(r, 10000));261 await message.client.updatePresence(message.jid,Presence.recording)262 await new Promise(r => setTimeout(r, 10000));263 await message.client.updatePresence(message.jid,Presence.recording)264 await new Promise(r => setTimeout(r, 10000));265 await message.client.updatePresence(message.jid,Presence.recording)266 await new Promise(r => setTimeout(r, 10000));267 await message.client.updatePresence(message.jid,Presence.recording)268 await new Promise(r => setTimeout(r, 10000));269 await message.client.updatePresence(message.jid,Presence.recording)270 await message.client.updatePresence(message.jid,Presence.recording)271 await new Promise(r => setTimeout(r, 10000));272 await message.client.updatePresence(message.jid,Presence.recording)273 await new Promise(r => setTimeout(r, 10000));274 await message.client.updatePresence(message.jid,Presence.recording)275 await new Promise(r => setTimeout(r, 10000));276 await message.client.updatePresence(message.jid,Presence.recording)277 await new Promise(r => setTimeout(r, 10000));278 await message.client.updatePresence(message.jid,Presence.recording)279 await new Promise(r => setTimeout(r, 10000));280 await message.client.updatePresence(message.jid,Presence.recording)281 await new Promise(r => setTimeout(r, 10000));282 await message.client.updatePresence(message.jid,Presence.recording)283 await new Promise(r => setTimeout(r, 10000));284 await message.client.updatePresence(message.jid,Presence.recording)285 await new Promise(r => setTimeout(r, 10000));286 await message.client.updatePresence(message.jid,Presence.recording)287 await new Promise(r => setTimeout(r, 10000));288 await message.client.updatePresence(message.jid,Presence.recording)289 await new Promise(r => setTimeout(r, 10000));290 await message.client.updatePresence(message.jid,Presence.recording)291 await new Promise(r => setTimeout(r, 10000));292 await message.client.updatePresence(message.jid,Presence.recording)293 await new Promise(r => setTimeout(r, 10000));294 await message.client.updatePresence(message.jid,Presence.recording)295 await new Promise(r => setTimeout(r, 10000));296 await message.client.updatePresence(message.jid,Presence.recording)297 await new Promise(r => setTimeout(r, 10000));298 await message.client.updatePresence(message.jid,Presence.recording)299 await new Promise(r => setTimeout(r, 10000));300 await message.client.updatePresence(message.jid,Presence.recording)301 await new Promise(r => setTimeout(r, 10000));302 await message.client.updatePresence(message.jid,Presence.recording)303 await new Promise(r => setTimeout(r, 10000));304 await message.client.updatePresence(message.jid,Presence.recording)305 await new Promise(r => setTimeout(r, 10000));306 await message.client.updatePresence(message.jid,Presence.recording)307 await new Promise(r => setTimeout(r, 10000));308 await message.client.updatePresence(message.jid,Presence.recording)309 await new Promise(r => setTimeout(r, 10000));310 await message.client.updatePresence(message.jid,Presence.recording)311 await new Promise(r => setTimeout(r, 10000));312 await message.client.updatePresence(message.jid,Presence.recording)313 await new Promise(r => setTimeout(r, 10000));314 await message.client.updatePresence(message.jid,Presence.recording)315 await new Promise(r => setTimeout(r, 10000));316 await message.client.updatePresence(message.jid,Presence.recording)317 await new Promise(r => setTimeout(r, 10000));318 await message.client.updatePresence(message.jid,Presence.recording)319 await new Promise(r => setTimeout(r, 10000));320 await message.client.updatePresence(message.jid,Presence.recording)321 } else if (match[1] === 'stop') {322 return await message.client.updatePresence(message.jid,Presence.paused)323 } else {324 await message.sendMessage(Lang.SCAM_NULL);325 }...

Full Screen

Full Screen

Automation Testing Tutorials

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.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run pyatom automation tests on LambdaTest cloud grid

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

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful