How to use querySelectorAll method in Playwright Internal

Best JavaScript code snippet using playwright-internal

main.js

Source:main.js Github

copy

Full Screen

...55 var sati = d.getHours();56 var minuta = d.getMinutes();57 5859 var gasi = document.querySelectorAll(".s1, .s2, .s3, .s4, .s5, .s6, .s7")60 var gasi2 = document.querySelectorAll(".s12, .s22, .s32, .s42, .s52, .s62, .s72");6162 for(var i = 0; i<gasi.length; i++){63 gasi[i].classList.remove("inactive");64 }65 for(var j = 0; j<gasi2.length; j++){66 gasi2[j].classList.remove("inactive");67 }6869 var mgasi = document.querySelectorAll(".m1, .m2, .m3, .m4, .m5, .m6, .m7");70 var mgasi2 = document.querySelectorAll(".m12, .m22, .m32, .m42, .m52, .m62, .m72");7172 for(var m = 0; m<mgasi.length; m++){73 mgasi[m].classList.remove("inactive");74 }75 for(var m2 = 0; m2<mgasi2.length; m2++){76 mgasi2[m2].classList.remove("inactive");77 }7879 if(sati == 0){80 var gasi = document.querySelectorAll(".s4");81 var gasi2 = document.querySelectorAll(".s42");8283 for(var i = 0; i<gasi.length; i++){84 gasi[i].classList.add("inactive");85 }86 for(var j = 0; j<gasi2.length; j++){87 gasi2[j].classList.add("inactive");88 }89 }9091 if(sati == 1){92 var gasi = document.querySelectorAll(".s4");93 var gasi2 = document.querySelectorAll(".s12, .s22, .s42, .s52, .s72");9495 for(var i = 0; i<gasi.length; i++){96 gasi[i].classList.add("inactive");97 }98 for(var j = 0; j<gasi2.length; j++){99 gasi2[j].classList.add("inactive");100 }101 }102103 if(sati == 2){104 var gasi = document.querySelectorAll(".s4");105 var gasi2 = document.querySelectorAll(".s22, .s62");106107 for(var i = 0; i<gasi.length; i++){108 gasi[i].classList.add("inactive");109 }110 for(var j = 0; j<gasi2.length; j++){111 gasi2[j].classList.add("inactive");112 }113 }114115 if(sati == 3){116 var gasi = document.querySelectorAll(".s4");117 var gasi2 = document.querySelectorAll(".s22, .s52");118119 for(var i = 0; i<gasi.length; i++){120 gasi[i].classList.add("inactive");121 }122 for(var j = 0; j<gasi2.length; j++){123 gasi2[j].classList.add("inactive");124 }125 }126127 if(sati == 4){128 var gasi = document.querySelectorAll(".s4");129 var gasi2 = document.querySelectorAll(".s12, .s52, .s72");130131 for(var i = 0; i<gasi.length; i++){132 gasi[i].classList.add("inactive");133 }134 for(var j = 0; j<gasi2.length; j++){135 gasi2[j].classList.add("inactive");136 }137 }138139 if(sati == 5){140 var gasi = document.querySelectorAll(".s4");141 var gasi2 = document.querySelectorAll(".s32, .s52");142143 for(var i = 0; i<gasi.length; i++){144 gasi[i].classList.add("inactive");145 }146 for(var j = 0; j<gasi2.length; j++){147 gasi2[j].classList.add("inactive");148 }149 }150151 if(sati == 6){152 var gasi = document.querySelectorAll(".s4");153 var gasi2 = document.querySelectorAll(".s32");154155 for(var i = 0; i<gasi.length; i++){156 gasi[i].classList.add("inactive");157 }158 for(var j = 0; j<gasi2.length; j++){159 gasi2[j].classList.add("inactive");160 }161 }162163 if(sati == 7){164 var gasi = document.querySelectorAll(".s4");165 var gasi2 = document.querySelectorAll(".s22, .s42, .s52, .s72");166167 for(var i = 0; i<gasi.length; i++){168 gasi[i].classList.add("inactive");169 }170 for(var j = 0; j<gasi2.length; j++){171 gasi2[j].classList.add("inactive");172 }173 }174175 if(sati == 8){176 var gasi = document.querySelectorAll(".s4");177178 for(var i = 0; i<gasi.length; i++){179 gasi[i].classList.add("inactive");180 }181 182 183 }184185 if(sati == 9){186 var gasi = document.querySelectorAll(".s4");187 var gasi2 = document.querySelectorAll(".s52");188189 for(var i = 0; i<gasi.length; i++){190 gasi[i].classList.add("inactive");191 }192 for(var j = 0; j<gasi2.length; j++){193 gasi2[j].classList.add("inactive");194 }195 }196197 if(sati == 10){198 var gasi = document.querySelectorAll(".s1, .s2, .s4, .s5, .s7");199 var gasi2 = document.querySelectorAll(".s42");200201 for(var i = 0; i<gasi.length; i++){202 gasi[i].classList.add("inactive");203 }204 for(var j = 0; j<gasi2.length; j++){205 gasi2[j].classList.add("inactive");206 }207 }208209 if(sati == 11){210 var gasi = document.querySelectorAll(".s1, .s2, .s4, .s5, .s7");211 var gasi2 = document.querySelectorAll(".s12, .s22, .s42, .s52, .s72");212213 for(var i = 0; i<gasi.length; i++){214 gasi[i].classList.add("inactive");215 }216 for(var j = 0; j<gasi2.length; j++){217 gasi2[j].classList.add("inactive");218 }219 }220221 if(sati == 12){222 var gasi = document.querySelectorAll(".s1, .s2, .s4, .s5, .s7");223 var gasi2 = document.querySelectorAll(".s22, .s62");224225 for(var i = 0; i<gasi.length; i++){226 gasi[i].classList.add("inactive");227 }228 for(var j = 0; j<gasi2.length; j++){229 gasi2[j].classList.add("inactive");230 }231 }232233234 if(sati == 13){235 var gasi = document.querySelectorAll(".s1, .s2, .s4, .s5, .s7");236 var gasi2 = document.querySelectorAll(".s22, .s52");237238 for(var i = 0; i<gasi.length; i++){239 gasi[i].classList.add("inactive");240 }241 for(var j = 0; j<gasi2.length; j++){242 gasi2[j].classList.add("inactive");243 }244 }245246 if(sati == 14){247 var gasi = document.querySelectorAll(".s1, .s2, .s4, .s5, .s7");248 var gasi2 = document.querySelectorAll(".s12, .s52, .s72");249250 for(var i = 0; i<gasi.length; i++){251 gasi[i].classList.add("inactive");252 }253 for(var j = 0; j<gasi2.length; j++){254 gasi2[j].classList.add("inactive");255 }256257 }258259 if(sati == 15){260 var gasi = document.querySelectorAll(".s1, .s2, .s4, .s5, .s7");261 var gasi2 = document.querySelectorAll(".s32, .s52");262263 for(var i = 0; i<gasi.length; i++){264 gasi[i].classList.add("inactive");265 }266 for(var j = 0; j<gasi2.length; j++){267 gasi2[j].classList.add("inactive");268 }269270 }271272 if(sati == 16){273 var gasi = document.querySelectorAll(".s1, .s2, .s4, .s5, .s7");274 var gasi2 = document.querySelectorAll(".s32");275276 for(var i = 0; i<gasi.length; i++){277 gasi[i].classList.add("inactive");278 }279 for(var j = 0; j<gasi2.length; j++){280 gasi2[j].classList.add("inactive");281 }282283 }284285 if(sati == 17){286 var gasi = document.querySelectorAll(".s1, .s2, .s4, .s5, .s7");287 var gasi2 = document.querySelectorAll(".s22, .s42, .s52, .s72");288289 for(var i = 0; i<gasi.length; i++){290 gasi[i].classList.add("inactive");291 }292 for(var j = 0; j<gasi2.length; j++){293 gasi2[j].classList.add("inactive");294 }295296 }297298 if(sati == 18){299 var gasi = document.querySelectorAll(".s1, .s2, .s4, .s5, .s7");300301 for(var i = 0; i<gasi.length; i++){302 gasi[i].classList.add("inactive");303 }304 305306 }307308 if(sati == 19){309 var gasi = document.querySelectorAll(".s1, .s2, .s4, .s5, .s7");310 var gasi2 = document.querySelectorAll(".s52");311312 for(var i = 0; i<gasi.length; i++){313 gasi[i].classList.add("inactive");314 }315 for(var j = 0; j<gasi2.length; j++){316 gasi2[j].classList.add("inactive");317 }318319 }320321 if(sati == 20){322 var gasi = document.querySelectorAll(".s2, .s6");323 var gasi2 = document.querySelectorAll(".s42");324325 for(var i = 0; i<gasi.length; i++){326 gasi[i].classList.add("inactive");327 }328 for(var j = 0; j<gasi2.length; j++){329 gasi2[j].classList.add("inactive");330 }331332 }333334 if(sati == 21){335 var gasi = document.querySelectorAll(".s2, .s6");336 var gasi2 = document.querySelectorAll(".s12, .s22, .s42, .s52, .s72");337338 for(var i = 0; i<gasi.length; i++){339 gasi[i].classList.add("inactive");340 }341 for(var j = 0; j<gasi2.length; j++){342 gasi2[j].classList.add("inactive");343 }344345 }346347 if(sati == 22){348 var gasi = document.querySelectorAll(".s2, .s6");349 var gasi2 = document.querySelectorAll(".s22, .s62");350351 for(var i = 0; i<gasi.length; i++){352 gasi[i].classList.add("inactive");353 }354 for(var j = 0; j<gasi2.length; j++){355 gasi2[j].classList.add("inactive");356 }357358 }359360 if(sati == 23){361 var gasi = document.querySelectorAll(".s2, .s6");362 var gasi2 = document.querySelectorAll(".s22, .s52");363364 for(var i = 0; i<gasi.length; i++){365 gasi[i].classList.add("inactive");366 }367 for(var j = 0; j<gasi2.length; j++){368 gasi2[j].classList.add("inactive");369 }370371372 }373374375376377378379 if(minuta == 0){380 var mgasi = document.querySelectorAll(".m4");381 var mgasi2 = document.querySelectorAll(".m42");382383 for(var m = 0; m<mgasi.length; m++){384 mgasi[m].classList.add("inactive");385 }386 for(var m2 = 0; m2<mgasi2.length; m2++){387 mgasi2[m2].classList.add("inactive");388 }389390 }391392393 if(minuta == 1){394 var mgasi = document.querySelectorAll(".m4");395 var mgasi2 = document.querySelectorAll(".m12, .m22, .m42, .m52, .m72");396397 for(var m = 0; m<mgasi.length; m++){398 mgasi[m].classList.add("inactive");399 }400 for(var m2 = 0; m2<mgasi2.length; m2++){401 mgasi2[m2].classList.add("inactive");402 }403 }404405406 if(minuta == 2){407 var mgasi = document.querySelectorAll(".m4");408 var mgasi2 = document.querySelectorAll(".m22, .m62");409410 for(var m = 0; m<mgasi.length; m++){411 mgasi[m].classList.add("inactive");412 }413 for(var m2 = 0; m2<mgasi2.length; m2++){414 mgasi2[m2].classList.add("inactive");415 }416417 }418419420 if(minuta == 3){421 var mgasi = document.querySelectorAll(".m4");422 var mgasi2 = document.querySelectorAll(".m22, .m52");423424 for(var m = 0; m<mgasi.length; m++){425 mgasi[m].classList.add("inactive");426 }427 for(var m2 = 0; m2<mgasi2.length; m2++){428 mgasi2[m2].classList.add("inactive");429 }430 431 }432433434 if(minuta == 4){435 var mgasi = document.querySelectorAll(".m4");436 var mgasi2 = document.querySelectorAll(".m12, .m52, .m72");437438 for(var m = 0; m<mgasi.length; m++){439 mgasi[m].classList.add("inactive");440 }441 for(var m2 = 0; m2<mgasi2.length; m2++){442 mgasi2[m2].classList.add("inactive");443 }444 445 }446447448 if(minuta == 5){449 var mgasi = document.querySelectorAll(".m4");450 var mgasi2 = document.querySelectorAll(".m32, .m52");451452 for(var m = 0; m<mgasi.length; m++){453 mgasi[m].classList.add("inactive");454 }455 for(var m2 = 0; m2<mgasi2.length; m2++){456 mgasi2[m2].classList.add("inactive");457 }458 459 }460461462 if(minuta == 6){463 var mgasi = document.querySelectorAll(".m4");464 var mgasi2 = document.querySelectorAll(".m32");465466 for(var m = 0; m<mgasi.length; m++){467 mgasi[m].classList.add("inactive");468 }469 for(var m2 = 0; m2<mgasi2.length; m2++){470 mgasi2[m2].classList.add("inactive");471 }472 473 }474475476 if(minuta == 7){477 var mgasi = document.querySelectorAll(".m4");478 var mgasi2 = document.querySelectorAll(".m22, .m42, .m52, .m72");479480 for(var m = 0; m<mgasi.length; m++){481 mgasi[m].classList.add("inactive");482 }483 for(var m2 = 0; m2<mgasi2.length; m2++){484 mgasi2[m2].classList.add("inactive");485 }486 487 }488489490 if(minuta == 8){491 var mgasi = document.querySelectorAll(".m4");492493 for(var m = 0; m<mgasi.length; m++){494 mgasi[m].classList.add("inactive");495 }496 497 498 }499500501502 if(minuta == 9){503 var mgasi = document.querySelectorAll(".m4");504 var mgasi2 = document.querySelectorAll(".m52");505506 for(var m = 0; m<mgasi.length; m++){507 mgasi[m].classList.add("inactive");508 }509 for(var m2 = 0; m2<mgasi2.length; m2++){510 mgasi2[m2].classList.add("inactive");511 }512 513 }514515 if(minuta == 10){516 var mgasi = document.querySelectorAll(".m1, .m2, .m4, .m5, .m7");517 var mgasi2 = document.querySelectorAll(".m42");518519 for(var m = 0; m<mgasi.length; m++){520 mgasi[m].classList.add("inactive");521 }522 for(var m2 = 0; m2<mgasi2.length; m2++){523 mgasi2[m2].classList.add("inactive");524 }525526 }527528529 if(minuta == 11){530 var mgasi = document.querySelectorAll(".m1, .m2, .m4, .m5, .m7");531 var mgasi2 = document.querySelectorAll(".m12, .m22, .m42, .m52, .m72");532533 for(var m = 0; m<mgasi.length; m++){534 mgasi[m].classList.add("inactive");535 }536 for(var m2 = 0; m2<mgasi2.length; m2++){537 mgasi2[m2].classList.add("inactive");538 }539 }540541542 if(minuta == 12){543 var mgasi = document.querySelectorAll(".m1, .m2, .m4, .m5, .m7");544 var mgasi2 = document.querySelectorAll(".m22, .m62");545546 for(var m = 0; m<mgasi.length; m++){547 mgasi[m].classList.add("inactive");548 }549 for(var m2 = 0; m2<mgasi2.length; m2++){550 mgasi2[m2].classList.add("inactive");551 }552553 }554555556 if(minuta == 13){557 var mgasi = document.querySelectorAll(".m1, .m2, .m4, .m5, .m7");558 var mgasi2 = document.querySelectorAll(".m22, .m52");559560 for(var m = 0; m<mgasi.length; m++){561 mgasi[m].classList.add("inactive");562 }563 for(var m2 = 0; m2<mgasi2.length; m2++){564 mgasi2[m2].classList.add("inactive");565 }566 567 }568569570 if(minuta == 14){571 var mgasi = document.querySelectorAll(".m1, .m2, .m4, .m5, .m7");572 var mgasi2 = document.querySelectorAll(".m12, .m52, .m72");573574 for(var m = 0; m<mgasi.length; m++){575 mgasi[m].classList.add("inactive");576 }577 for(var m2 = 0; m2<mgasi2.length; m2++){578 mgasi2[m2].classList.add("inactive");579 }580 581 }582583584 if(minuta == 15){585 var mgasi = document.querySelectorAll(".m1, .m2, .m4, .m5, .m7");586 var mgasi2 = document.querySelectorAll(".m32, .m52");587588 for(var m = 0; m<mgasi.length; m++){589 mgasi[m].classList.add("inactive");590 }591 for(var m2 = 0; m2<mgasi2.length; m2++){592 mgasi2[m2].classList.add("inactive");593 }594 595 }596597598 if(minuta == 16){599 var mgasi = document.querySelectorAll(".m1, .m2, .m4, .m5, .m7");600 var mgasi2 = document.querySelectorAll(".m32");601602 for(var m = 0; m<mgasi.length; m++){603 mgasi[m].classList.add("inactive");604 }605 for(var m2 = 0; m2<mgasi2.length; m2++){606 mgasi2[m2].classList.add("inactive");607 }608 609 }610611612 if(minuta == 17){613 var mgasi = document.querySelectorAll(".m1, .m2, .m4, .m5, .m7");614 var mgasi2 = document.querySelectorAll(".m22, .m42, .m52, .m72");615616 for(var m = 0; m<mgasi.length; m++){617 mgasi[m].classList.add("inactive");618 }619 for(var m2 = 0; m2<mgasi2.length; m2++){620 mgasi2[m2].classList.add("inactive");621 }622 623 }624625626 if(minuta == 18){627 var mgasi = document.querySelectorAll(".m1, .m2, .m4, .m5, .m7");628 629630 for(var m = 0; m<mgasi.length; m++){631 mgasi[m].classList.add("inactive");632 }633634 635 636 }637638639640 if(minuta == 19){641 var mgasi = document.querySelectorAll(".m1, .m2, .m4, .m5, .m7");642 var mgasi2 = document.querySelectorAll(".m52");643644 for(var m = 0; m<mgasi.length; m++){645 mgasi[m].classList.add("inactive");646 }647 for(var m2 = 0; m2<mgasi2.length; m2++){648 mgasi2[m2].classList.add("inactive");649 }650 651 652 }653654655656 if(minuta == 20){657 var mgasi = document.querySelectorAll(".m2, .m6");658 var mgasi2 = document.querySelectorAll(".m42");659 660 for(var m = 0; m<mgasi.length; m++){661 mgasi[m].classList.add("inactive");662 }663 for(var m2 = 0; m2<mgasi2.length; m2++){664 mgasi2[m2].classList.add("inactive");665 }666 667668 }669670671 if(minuta == 21){672 var mgasi = document.querySelectorAll(".m2, .m6");673 var mgasi2 = document.querySelectorAll(".m12, .m22, .m42, .m52, .m72");674675 for(var m = 0; m<mgasi.length; m++){676 mgasi[m].classList.add("inactive");677 }678 for(var m2 = 0; m2<mgasi2.length; m2++){679 mgasi2[m2].classList.add("inactive");680 }681 }682683684 if(minuta == 22){685 var mgasi = document.querySelectorAll(".m2, .m6");686 var mgasi2 = document.querySelectorAll(".m22, .m62");687688 for(var m = 0; m<mgasi.length; m++){689 mgasi[m].classList.add("inactive");690 }691 for(var m2 = 0; m2<mgasi2.length; m2++){692 mgasi2[m2].classList.add("inactive");693 }694695 }696697698 if(minuta == 23){699 var mgasi = document.querySelectorAll(".m2, .m6");700 var mgasi2 = document.querySelectorAll(".m22, .m52");701702 for(var m = 0; m<mgasi.length; m++){703 mgasi[m].classList.add("inactive");704 }705 for(var m2 = 0; m2<mgasi2.length; m2++){706 mgasi2[m2].classList.add("inactive");707 }708 709 }710711712 if(minuta == 24){713 var mgasi = document.querySelectorAll(".m2, .m6");714 var mgasi2 = document.querySelectorAll(".m12, .m52, .m72");715716 for(var m = 0; m<mgasi.length; m++){717 mgasi[m].classList.add("inactive");718 }719 for(var m2 = 0; m2<mgasi2.length; m2++){720 mgasi2[m2].classList.add("inactive");721 }722 723 }724725726 if(minuta == 25){727 var mgasi = document.querySelectorAll(".m2, .m6");728 var mgasi2 = document.querySelectorAll(".m32, .m52");729730 for(var m = 0; m<mgasi.length; m++){731 mgasi[m].classList.add("inactive");732 }733 for(var m2 = 0; m2<mgasi2.length; m2++){734 mgasi2[m2].classList.add("inactive");735 }736 737 }738739740 if(minuta == 26){741 var mgasi = document.querySelectorAll(".m2, .m6");742 var mgasi2 = document.querySelectorAll(".m32");743744 for(var m = 0; m<mgasi.length; m++){745 mgasi[m].classList.add("inactive");746 }747 for(var m2 = 0; m2<mgasi2.length; m2++){748 mgasi2[m2].classList.add("inactive");749 }750 751 }752753754 if(minuta == 27){755 var mgasi = document.querySelectorAll(".m2, .m6");756 var mgasi2 = document.querySelectorAll(".m22, .m42, .m52, .m72");757758 for(var m = 0; m<mgasi.length; m++){759 mgasi[m].classList.add("inactive");760 }761 for(var m2 = 0; m2<mgasi2.length; m2++){762 mgasi2[m2].classList.add("inactive");763 }764 765 }766767768 if(minuta == 28){769 var mgasi = document.querySelectorAll(".m2, .m6");770 771 772773 for(var m = 0; m<mgasi.length; m++){774 mgasi[m].classList.add("inactive");775 }776 777 778 779 }780781782783 if(minuta == 29){784 var mgasi = document.querySelectorAll(".m2, .m6");785 var mgasi2 = document.querySelectorAll(".m52");786787 for(var m = 0; m<mgasi.length; m++){788 mgasi[m].classList.add("inactive");789 }790 for(var m2 = 0; m2<mgasi2.length; m2++){791 mgasi2[m2].classList.add("inactive");792 }793 794 }795796 if(minuta == 30){797 var mgasi = document.querySelectorAll(".m2, .m5");798 var mgasi2 = document.querySelectorAll(".m42");799800 for(var m = 0; m<mgasi.length; m++){801 mgasi[m].classList.add("inactive");802 }803 for(var m2 = 0; m2<mgasi2.length; m2++){804 mgasi2[m2].classList.add("inactive");805 }806807 }808809810 if(minuta == 31){811 var mgasi = document.querySelectorAll(".m2, .m5");812 var mgasi2 = document.querySelectorAll(".m12, .m22, .m42, .m52, .m72");813814 for(var m = 0; m<mgasi.length; m++){815 mgasi[m].classList.add("inactive");816 }817 for(var m2 = 0; m2<mgasi2.length; m2++){818 mgasi2[m2].classList.add("inactive");819 }820 }821822823 if(minuta == 32){824 var mgasi = document.querySelectorAll(".m2, .m5");825 var mgasi2 = document.querySelectorAll(".m22, .m62");826827 for(var m = 0; m<mgasi.length; m++){828 mgasi[m].classList.add("inactive");829 }830 for(var m2 = 0; m2<mgasi2.length; m2++){831 mgasi2[m2].classList.add("inactive");832 }833834 }835836837 if(minuta == 33){838 var mgasi = document.querySelectorAll(".m2, .m5");839 var mgasi2 = document.querySelectorAll(".m22, .m52");840841 for(var m = 0; m<mgasi.length; m++){842 mgasi[m].classList.add("inactive");843 }844 for(var m2 = 0; m2<mgasi2.length; m2++){845 mgasi2[m2].classList.add("inactive");846 }847 848 }849850851 if(minuta == 34){852 var mgasi = document.querySelectorAll(".m2, .m5");853 var mgasi2 = document.querySelectorAll(".m12, .m52, .m72");854855 for(var m = 0; m<mgasi.length; m++){856 mgasi[m].classList.add("inactive");857 }858 for(var m2 = 0; m2<mgasi2.length; m2++){859 mgasi2[m2].classList.add("inactive");860 }861 862 }863864865 if(minuta == 35){866 var mgasi = document.querySelectorAll(".m2, .m5");867 var mgasi2 = document.querySelectorAll(".m32, .m52");868869 for(var m = 0; m<mgasi.length; m++){870 mgasi[m].classList.add("inactive");871 }872 for(var m2 = 0; m2<mgasi2.length; m2++){873 mgasi2[m2].classList.add("inactive");874 }875 876 }877878879 if(minuta == 36){880 var mgasi = document.querySelectorAll(".m2, .m5");881 var mgasi2 = document.querySelectorAll(".m32");882883 for(var m = 0; m<mgasi.length; m++){884 mgasi[m].classList.add("inactive");885 }886 for(var m2 = 0; m2<mgasi2.length; m2++){887 mgasi2[m2].classList.add("inactive");888 }889 890 }891892893 if(minuta == 37){894 var mgasi = document.querySelectorAll(".m2, .m5");895 var mgasi2 = document.querySelectorAll(".m22, .m42, .m52, .m72");896897 for(var m = 0; m<mgasi.length; m++){898 mgasi[m].classList.add("inactive");899 }900 for(var m2 = 0; m2<mgasi2.length; m2++){901 mgasi2[m2].classList.add("inactive");902 }903 904 }905906907 if(minuta == 38){908 var mgasi = document.querySelectorAll(".m2, .m5");909 910 911912 for(var m = 0; m<mgasi.length; m++){913 mgasi[m].classList.add("inactive");914 }915 916 917 918 }919920921922 if(minuta == 39){923 var mgasi = document.querySelectorAll(".m2, .m5");924 var mgasi2 = document.querySelectorAll(".m52");925926 for(var m = 0; m<mgasi.length; m++){927 mgasi[m].classList.add("inactive");928 }929 for(var m2 = 0; m2<mgasi2.length; m2++){930 mgasi2[m2].classList.add("inactive");931 }932 933 }934935936 if(minuta == 40){937 var mgasi = document.querySelectorAll(".m1, .m5, .m7");938 var mgasi2 = document.querySelectorAll(".m42");939940 for(var m = 0; m<mgasi.length; m++){941 mgasi[m].classList.add("inactive");942 }943 for(var m2 = 0; m2<mgasi2.length; m2++){944 mgasi2[m2].classList.add("inactive");945 }946 }947948949950 if(minuta == 41){951 var mgasi = document.querySelectorAll(".m1, .m5, .m7");952 var mgasi2 = document.querySelectorAll(".m12, .m22, .m42, .m52, .m72");953954 for(var m = 0; m<mgasi.length; m++){955 mgasi[m].classList.add("inactive");956 }957 for(var m2 = 0; m2<mgasi2.length; m2++){958 mgasi2[m2].classList.add("inactive");959 }960 }961962963 if(minuta == 42){964 var mgasi = document.querySelectorAll(".m1, .m5, .m7");965 var mgasi2 = document.querySelectorAll(".m22, .m62");966967 for(var m = 0; m<mgasi.length; m++){968 mgasi[m].classList.add("inactive");969 }970 for(var m2 = 0; m2<mgasi2.length; m2++){971 mgasi2[m2].classList.add("inactive");972 }973974 }975976977 if(minuta == 43){978 var mgasi = document.querySelectorAll(".m1, .m5, .m7");979 var mgasi2 = document.querySelectorAll(".m22, .m52");980981 for(var m = 0; m<mgasi.length; m++){982 mgasi[m].classList.add("inactive");983 }984 for(var m2 = 0; m2<mgasi2.length; m2++){985 mgasi2[m2].classList.add("inactive");986 }987 988 }989990991 if(minuta == 44){992 var mgasi = document.querySelectorAll(".m1, .m5, .m7");993 var mgasi2 = document.querySelectorAll(".m12, .m52, .m72");994995 for(var m = 0; m<mgasi.length; m++){996 mgasi[m].classList.add("inactive");997 }998 for(var m2 = 0; m2<mgasi2.length; m2++){999 mgasi2[m2].classList.add("inactive");1000 }1001 1002 }100310041005 if(minuta == 45){1006 var mgasi = document.querySelectorAll(".m1, .m5, .m7");1007 var mgasi2 = document.querySelectorAll(".m32, .m52");10081009 for(var m = 0; m<mgasi.length; m++){1010 mgasi[m].classList.add("inactive");1011 }1012 for(var m2 = 0; m2<mgasi2.length; m2++){1013 mgasi2[m2].classList.add("inactive");1014 }1015 1016 }101710181019 if(minuta == 46){1020 var mgasi = document.querySelectorAll(".m1, .m5, .m7");1021 var mgasi2 = document.querySelectorAll(".m32");10221023 for(var m = 0; m<mgasi.length; m++){1024 mgasi[m].classList.add("inactive");1025 }1026 for(var m2 = 0; m2<mgasi2.length; m2++){1027 mgasi2[m2].classList.add("inactive");1028 }1029 1030 }103110321033 if(minuta == 47){1034 var mgasi = document.querySelectorAll(".m1, .m5, .m7");1035 var mgasi2 = document.querySelectorAll(".m22, .m42, .m52, .m72");10361037 for(var m = 0; m<mgasi.length; m++){1038 mgasi[m].classList.add("inactive");1039 }1040 for(var m2 = 0; m2<mgasi2.length; m2++){1041 mgasi2[m2].classList.add("inactive");1042 }1043 1044 }104510461047 if(minuta == 48){1048 var mgasi = document.querySelectorAll(".m1, .m5, .m7");1049 1050 10511052 for(var m = 0; m<mgasi.length; m++){1053 mgasi[m].classList.add("inactive");1054 }1055 1056 1057 1058 }1059106010611062 if(minuta == 49){1063 var mgasi = document.querySelectorAll(".m1, .m5, .m7");1064 var mgasi2 = document.querySelectorAll(".m52");10651066 for(var m = 0; m<mgasi.length; m++){1067 mgasi[m].classList.add("inactive");1068 }1069 for(var m2 = 0; m2<mgasi2.length; m2++){1070 mgasi2[m2].classList.add("inactive");1071 }1072 1073 }1074107510761077 if(minuta == 50){1078 var mgasi = document.querySelectorAll(".m3, .m5");1079 var mgasi2 = document.querySelectorAll(".m42");10801081 for(var m = 0; m<mgasi.length; m++){1082 mgasi[m].classList.add("inactive");1083 }1084 for(var m2 = 0; m2<mgasi2.length; m2++){1085 mgasi2[m2].classList.add("inactive");1086 }1087 }108810891090 if(minuta == 51){1091 var mgasi = document.querySelectorAll(".m3, .m5");1092 var mgasi2 = document.querySelectorAll(".m12, .m22, .m42, .m52, .m72");10931094 for(var m = 0; m<mgasi.length; m++){1095 mgasi[m].classList.add("inactive");1096 }1097 for(var m2 = 0; m2<mgasi2.length; m2++){1098 mgasi2[m2].classList.add("inactive");1099 }1100 }110111021103 if(minuta == 52){1104 var mgasi = document.querySelectorAll(".m3, .m5");1105 var mgasi2 = document.querySelectorAll(".m22, .m62");11061107 for(var m = 0; m<mgasi.length; m++){1108 mgasi[m].classList.add("inactive");1109 }1110 for(var m2 = 0; m2<mgasi2.length; m2++){1111 mgasi2[m2].classList.add("inactive");1112 }11131114 }111511161117 if(minuta == 53){1118 var mgasi = document.querySelectorAll(".m3, .m5");1119 var mgasi2 = document.querySelectorAll(".m22, .m52");11201121 for(var m = 0; m<mgasi.length; m++){1122 mgasi[m].classList.add("inactive");1123 }1124 for(var m2 = 0; m2<mgasi2.length; m2++){1125 mgasi2[m2].classList.add("inactive");1126 }1127 1128 }112911301131 if(minuta == 54){1132 var mgasi = document.querySelectorAll(".m3, .m5");1133 var mgasi2 = document.querySelectorAll(".m12, .m52, .m72");11341135 for(var m = 0; m<mgasi.length; m++){1136 mgasi[m].classList.add("inactive");1137 }1138 for(var m2 = 0; m2<mgasi2.length; m2++){1139 mgasi2[m2].classList.add("inactive");1140 }1141 1142 }114311441145 if(minuta == 55){1146 var mgasi = document.querySelectorAll(".m3, .m5");1147 var mgasi2 = document.querySelectorAll(".m32, .m52");11481149 for(var m = 0; m<mgasi.length; m++){1150 mgasi[m].classList.add("inactive");1151 }1152 for(var m2 = 0; m2<mgasi2.length; m2++){1153 mgasi2[m2].classList.add("inactive");1154 }1155 1156 }115711581159 if(minuta == 56){1160 var mgasi = document.querySelectorAll(".m3, .m5");1161 var mgasi2 = document.querySelectorAll(".m32");11621163 for(var m = 0; m<mgasi.length; m++){1164 mgasi[m].classList.add("inactive");1165 }1166 for(var m2 = 0; m2<mgasi2.length; m2++){1167 mgasi2[m2].classList.add("inactive");1168 }1169 1170 }117111721173 if(minuta == 57){1174 var mgasi = document.querySelectorAll(".m3, .m5");1175 var mgasi2 = document.querySelectorAll(".m22, .m42, .m52, .m72");11761177 for(var m = 0; m<mgasi.length; m++){1178 mgasi[m].classList.add("inactive");1179 }1180 for(var m2 = 0; m2<mgasi2.length; m2++){1181 mgasi2[m2].classList.add("inactive");1182 }1183 1184 }118511861187 if(minuta == 58){1188 var mgasi = document.querySelectorAll(".m3, .m5");1189 1190 11911192 for(var m = 0; m<mgasi.length; m++){1193 mgasi[m].classList.add("inactive");1194 }1195 1196 1197 1198 }1199120012011202 if(minuta == 59){1203 var mgasi = document.querySelectorAll(".m3, .m5");1204 var mgasi2 = document.querySelectorAll(".m52");12051206 for(var m = 0; m<mgasi.length; m++){1207 mgasi[m].classList.add("inactive");1208 }1209 for(var m2 = 0; m2<mgasi2.length; m2++){1210 mgasi2[m2].classList.add("inactive");1211 }1212 1213 }121412151216 1217 1218 } ...

Full Screen

Full Screen

index.js

Source:index.js Github

copy

Full Screen

...15 const [tipoUser, setTipoUser] = useState('');16 const [colorMenuSelected, setColorMenuSelected] = useState('');17 const history = useHistory();18 function changeMenu(e){19 let imgLogo = document.querySelectorAll('img');20 if(imgLogo[0].attributes[1].value === 'Logo'){21 setPageActive('FirstPage');22 }23 24 if(tipoUser === 'Admin'){25 if(e.innerText === 'EMPRESAS'){26 // Classe Active //27 setActive(document.querySelectorAll('li')[0].classList.add('active'));28 setActive(document.querySelectorAll('li')[1].classList.remove('active'));29 setActive(document.querySelectorAll('li')[2].classList.remove('active'));30 setActive(document.querySelectorAll('li')[3].classList.remove('active'));31 setActive(document.querySelectorAll('li')[4].classList.remove('active'));32 // Classe sidebar-menu-selected //33 setColorMenuSelected(document.querySelectorAll('li')[0].style.color = '#FFF');34 setColorMenuSelected(document.querySelectorAll('li')[1].style.color = '#0472c7');35 setColorMenuSelected(document.querySelectorAll('li')[2].style.color = '#0472c7');36 setColorMenuSelected(document.querySelectorAll('li')[3].style.color = '#0472c7');37 setColorMenuSelected(document.querySelectorAll('li')[4].style.color = '#0472c7');38 setPageActive('EMPRESAS')39 } else if(e.innerText === 'USUÁRIOS'){40 // Classe Active //41 setActive(document.querySelectorAll('li')[0].classList.remove('active'));42 setActive(document.querySelectorAll('li')[1].classList.add('active'));43 setActive(document.querySelectorAll('li')[2].classList.remove('active'));44 setActive(document.querySelectorAll('li')[3].classList.remove('active'));45 setActive(document.querySelectorAll('li')[4].classList.remove('active'));46 // Classe sidebar-menu-selected //47 setColorMenuSelected(document.querySelectorAll('li')[0].style.color = '#0472c7');48 setColorMenuSelected(document.querySelectorAll('li')[1].style.color = '#FFF');49 setColorMenuSelected(document.querySelectorAll('li')[2].style.color = '#0472c7');50 setColorMenuSelected(document.querySelectorAll('li')[3].style.color = '#0472c7');51 setColorMenuSelected(document.querySelectorAll('li')[4].style.color = '#0472c7');52 setPageActive('USUÁRIOS')53 } else if(e.innerText === 'LISTAR PRODUTOS'){54 // Classe Active //55 setActive(document.querySelectorAll('li')[0].classList.remove('active'));56 setActive(document.querySelectorAll('li')[1].classList.remove('active'));57 setActive(document.querySelectorAll('li')[2].classList.add('active'));58 setActive(document.querySelectorAll('li')[3].classList.remove('active'));59 setActive(document.querySelectorAll('li')[4].classList.remove('active'));60 // Classe sidebar-menu-selected //61 setColorMenuSelected(document.querySelectorAll('li')[0].style.color = '#0472c7');62 setColorMenuSelected(document.querySelectorAll('li')[1].style.color = '#0472C7');63 setColorMenuSelected(document.querySelectorAll('li')[2].style.color = '#FFF');64 setColorMenuSelected(document.querySelectorAll('li')[3].style.color = '#0472c7');65 setColorMenuSelected(document.querySelectorAll('li')[4].style.color = '#0472c7');66 setPageActive('LISTAR PRODUTOS')67 } else if(e.innerText === 'IMPORTAR PRODUTOS'){68 // Classe Active //69 setActive(document.querySelectorAll('li')[0].classList.remove('active'));70 setActive(document.querySelectorAll('li')[1].classList.remove('active'));71 setActive(document.querySelectorAll('li')[2].classList.remove('active'));72 setActive(document.querySelectorAll('li')[3].classList.add('active'));73 setActive(document.querySelectorAll('li')[4].classList.remove('active'));74 // Classe sidebar-menu-selected //75 setColorMenuSelected(document.querySelectorAll('li')[0].style.color = '#0472c7');76 setColorMenuSelected(document.querySelectorAll('li')[1].style.color = '#0472c7');77 setColorMenuSelected(document.querySelectorAll('li')[2].style.color = '#0472c7');78 setColorMenuSelected(document.querySelectorAll('li')[3].style.color = '#FFF');79 setColorMenuSelected(document.querySelectorAll('li')[4].style.color = '#0472c7');80 setPageActive('IMPORTAR PRODUTOS')81 } else if(e.innerText === 'GERAR AUDITORIA'){82 // Classe Active //83 setActive(document.querySelectorAll('li')[0].classList.remove('active'));84 setActive(document.querySelectorAll('li')[1].classList.remove('active'));85 setActive(document.querySelectorAll('li')[2].classList.remove('active'));86 setActive(document.querySelectorAll('li')[3].classList.remove('active'));87 setActive(document.querySelectorAll('li')[4].classList.add('active'));88 // Classe sidebar-menu-selected //89 setColorMenuSelected(document.querySelectorAll('li')[0].style.color = '#0472c7');90 setColorMenuSelected(document.querySelectorAll('li')[1].style.color = '#0472c7');91 setColorMenuSelected(document.querySelectorAll('li')[2].style.color = '#0472c7');92 setColorMenuSelected(document.querySelectorAll('li')[3].style.color = '#0472c7');93 setColorMenuSelected(document.querySelectorAll('li')[4].style.color = '#FFF');94 setPageActive('GERAR AUDITORIA')95 }96 }else{97 if(e.innerText === 'LISTAR PRODUTOS'){98 // Classe Active //99 setActive(document.querySelectorAll('li')[0].classList.add('active'));100 setActive(document.querySelectorAll('li')[1].classList.remove('active'));101 setActive(document.querySelectorAll('li')[2].classList.remove('active'));102 // Classe sidebar-menu-selected //103 setColorMenuSelected(document.querySelectorAll('li')[0].style.color = '#FFF');104 setColorMenuSelected(document.querySelectorAll('li')[1].style.color = '#0472c7');105 setColorMenuSelected(document.querySelectorAll('li')[2].style.color = '#0472c7');106 setPageActive('LISTAR PRODUTOS')107 } else if(e.innerText === 'IMPORTAR PRODUTOS'){108 setActive(document.querySelectorAll('li')[0].classList.remove('active'));109 setActive(document.querySelectorAll('li')[1].classList.add('active'));110 setActive(document.querySelectorAll('li')[2].classList.remove('active'));111 // Classe sidebar-menu-selected //112 setColorMenuSelected(document.querySelectorAll('li')[0].style.color = '#0472c7');113 setColorMenuSelected(document.querySelectorAll('li')[1].style.color = '#FFF');114 setColorMenuSelected(document.querySelectorAll('li')[2].style.color = '#0472c7');115 setPageActive('IMPORTAR PRODUTOS')116 } else if(e.innerText === 'GERAR AUDITORIA'){117 setActive(document.querySelectorAll('li')[0].classList.remove('active'));118 setActive(document.querySelectorAll('li')[1].classList.remove('active'));119 setActive(document.querySelectorAll('li')[2].classList.add('active'));120 // Classe sidebar-menu-selected //121 setColorMenuSelected(document.querySelectorAll('li')[0].style.color = '#0472c7');122 setColorMenuSelected(document.querySelectorAll('li')[1].style.color = '#0472c7');123 setColorMenuSelected(document.querySelectorAll('li')[2].style.color = '#FFF');124 setPageActive('GERAR AUDITORIA')125 }126 }127 }128 async function getTipoUser(){129 let tipo = await JSON.parse(localStorage.getItem('@auth'));130 setTipoUser(tipo['tipo']);131 132 } 133 useEffect(() => {134 recoverUser();135 getTipoUser();136 },[email, active, tipoUser])137 ...

Full Screen

Full Screen

script.js

Source:script.js Github

copy

Full Screen

1let p1_active = 02document.querySelector(".right-arrow-music").addEventListener("click", () => {3 p1_active++4 for (let i=0; i<document.querySelectorAll(".card-music").length; i++) {5 if (p1_active%4 != i) {6 //document.querySelectorAll(".card")[i].style.display = "none"7 document.querySelectorAll(".card-music")[i].style.visibility="hidden";8 document.querySelectorAll(".card-music")[i].style.opacity= 0;9 }10 else {11 12 //document.querySelectorAll(".card")[i].style.display = "inline-block"13 document.querySelectorAll(".card-music")[i].style.visibility="visible";14 document.querySelectorAll(".card-music")[i].style.opacity= 1;15 }16 }17})18document.querySelector(".left-arrow-music").addEventListener("click", () => {19 p1_active--20 if (p1_active < 0) p1_active+=421 for (let i=0; i<document.querySelectorAll(".card-music").length; i++) {22 if (p1_active%4 != i) {23 //document.querySelectorAll(".card")[i].style.display = "none"24 document.querySelectorAll(".card-music")[i].style.visibility="hidden";25 document.querySelectorAll(".card-music")[i].style.opacity= 0;26 }27 else {28 29 //document.querySelectorAll(".card")[i].style.display = "inline-block"30 document.querySelectorAll(".card-music")[i].style.visibility="visible";31 document.querySelectorAll(".card-music")[i].style.opacity= 1;32 }33 }34})35/******************************* */36let p2_active = 037document.querySelector(".right-arrow-fut").addEventListener("click", () => {38 p2_active++39 for (let i=0; i<document.querySelectorAll(".card-fut").length; i++) {40 if (p2_active%5 != i) {41 //document.querySelectorAll(".card")[i].style.display = "none"42 document.querySelectorAll(".card-fut")[i].style.visibility="hidden";43 document.querySelectorAll(".card-fut")[i].style.opacity= 0;44 }45 else {46 47 //document.querySelectorAll(".card")[i].style.display = "inline-block"48 document.querySelectorAll(".card-fut")[i].style.visibility="visible";49 document.querySelectorAll(".card-fut")[i].style.opacity= 1;50 }51 }52})53document.querySelector(".left-arrow-fut").addEventListener("click", () => {54 p2_active--55 if (p2_active < 0) p2_active+=556 for (let i=0; i<document.querySelectorAll(".card-fut").length; i++) {57 if (p2_active%5 != i) {58 //document.querySelectorAll(".card")[i].style.display = "none"59 document.querySelectorAll(".card-fut")[i].style.visibility="hidden";60 document.querySelectorAll(".card-fut")[i].style.opacity= 0;61 }62 else {63 64 //document.querySelectorAll(".card")[i].style.display = "inline-block"65 document.querySelectorAll(".card-fut")[i].style.visibility="visible";66 document.querySelectorAll(".card-fut")[i].style.opacity= 1;67 }68 }69})70/************************************ */71let p3_active = 072document.querySelector(".right-arrow-game").addEventListener("click", () => {73 p3_active++74 for (let i=0; i<document.querySelectorAll(".card-game").length; i++) {75 if (p3_active%5 != i) {76 //document.querySelectorAll(".card")[i].style.display = "none"77 document.querySelectorAll(".card-game")[i].style.visibility="hidden";78 document.querySelectorAll(".card-game")[i].style.opacity= 0;79 }80 else {81 82 //document.querySelectorAll(".card")[i].style.display = "inline-block"83 document.querySelectorAll(".card-game")[i].style.visibility="visible";84 document.querySelectorAll(".card-game")[i].style.opacity= 1;85 }86 }87})88document.querySelector(".left-arrow-game").addEventListener("click", () => {89 p3_active--90 if (p3_active < 0) p3_active+=591 for (let i=0; i<document.querySelectorAll(".card-game").length; i++) {92 if (p3_active%5 != i) {93 //document.querySelectorAll(".card")[i].style.display = "none"94 document.querySelectorAll(".card-game")[i].style.visibility="hidden";95 document.querySelectorAll(".card-game")[i].style.opacity= 0;96 }97 else {98 99 //document.querySelectorAll(".card")[i].style.display = "inline-block"100 document.querySelectorAll(".card-game")[i].style.visibility="visible";101 document.querySelectorAll(".card-game")[i].style.opacity= 1;102 }103 }104})105/************************************ */106let p4_active = 0107document.querySelector(".right-arrow-youtube").addEventListener("click", () => {108 p4_active++109 for (let i=0; i<document.querySelectorAll(".card-youtube").length; i++) {110 if (p4_active%5 != i) {111 //document.querySelectorAll(".card")[i].style.display = "none"112 document.querySelectorAll(".card-youtube")[i].style.visibility="hidden";113 document.querySelectorAll(".card-youtube")[i].style.opacity= 0;114 }115 else {116 117 //document.querySelectorAll(".card")[i].style.display = "inline-block"118 document.querySelectorAll(".card-youtube")[i].style.visibility="visible";119 document.querySelectorAll(".card-youtube")[i].style.opacity= 1;120 }121 }122})123document.querySelector(".left-arrow-youtube").addEventListener("click", () => {124 p4_active--125 if (p4_active < 0) p4_active+=5126 for (let i=0; i<document.querySelectorAll(".card-youtube").length; i++) {127 if (p4_active%5 != i) {128 //document.querySelectorAll(".card")[i].style.display = "none"129 document.querySelectorAll(".card-youtube")[i].style.visibility="hidden";130 document.querySelectorAll(".card-youtube")[i].style.opacity= 0;131 }132 else {133 134 //document.querySelectorAll(".card")[i].style.display = "inline-block"135 document.querySelectorAll(".card-youtube")[i].style.visibility="visible";136 document.querySelectorAll(".card-youtube")[i].style.opacity= 1;137 }138 }139})140/************************************ */141let p5_active = 0142document.querySelector(".right-arrow-tekken").addEventListener("click", () => {143 p5_active++144 for (let i=0; i<document.querySelectorAll(".card-tekken").length; i++) {145 if (p5_active%5 != i) {146 //document.querySelectorAll(".card")[i].style.display = "none"147 document.querySelectorAll(".card-tekken")[i].style.visibility="hidden";148 document.querySelectorAll(".card-tekken")[i].style.opacity= 0;149 }150 else {151 152 //document.querySelectorAll(".card")[i].style.display = "inline-block"153 document.querySelectorAll(".card-tekken")[i].style.visibility="visible";154 document.querySelectorAll(".card-tekken")[i].style.opacity= 1;155 }156 }157})158document.querySelector(".left-arrow-tekken").addEventListener("click", () => {159 p5_active--160 if (p5_active < 0) p5_active+=5161 for (let i=0; i<document.querySelectorAll(".card-tekken").length; i++) {162 if (p5_active%5 != i) {163 //document.querySelectorAll(".card")[i].style.display = "none"164 document.querySelectorAll(".card-tekken")[i].style.visibility="hidden";165 document.querySelectorAll(".card-tekken")[i].style.opacity= 0;166 }167 else {168 169 //document.querySelectorAll(".card")[i].style.display = "inline-block"170 document.querySelectorAll(".card-tekken")[i].style.visibility="visible";171 document.querySelectorAll(".card-tekken")[i].style.opacity= 1;172 }173 }...

Full Screen

Full Screen

categorySaves.js

Source:categorySaves.js Github

copy

Full Screen

1function saveItemData(ele, id, catId, availability){2 let dataElements = ele.parentNode;3 let token = dataElements.querySelectorAll("input[name='_token']")[0].value;4 let name = dataElements.querySelectorAll("div[name='name']")[0].innerHTML;5 let note = dataElements.querySelectorAll("div[name='note']")[0].innerHTML;6 let place = dataElements.querySelectorAll("div[name='place']")[0].innerHTML;7 let inventory_number = dataElements.querySelectorAll("div[name='inventory_number']")[0].innerHTML;8 let price = dataElements.querySelectorAll("div[name='price']")[0].innerHTML;9 price = price.replace(",", ".");10 price = price.replace(/ /g, "");11 let created_at = dataElements.querySelectorAll("div[name='created_at']")[0].innerHTML;12 ele.querySelectorAll("div[id='buttonText']")[0].setAttribute("hidden","");13 ele.querySelectorAll("div[id='buttonLoading']")[0].removeAttribute("hidden");14 $.ajax({15 method: "POST",16 url: '/item/' + id + '/saveItemData',17 data: { _token: token, name: name, price: price, created_at: created_at, note: note, place: place, inventory_number: inventory_number, itemId: id, categoriesId: catId, availability: availability },18 success: function (response){19 ele.querySelectorAll("div[id='buttonText']")[0].removeAttribute("hidden");20 ele.querySelectorAll("div[id='buttonLoading']")[0].setAttribute("hidden", "");21 if(response == "1"){22 ele.querySelectorAll("div[id='buttonText']")[0].innerHTML = '<b>&#10003;</b>';23 }else{24 ele.querySelectorAll("div[id='buttonText']")[0].innerHTML = '<b>&#x2715;</b>';25 }26 setTimeout(function (ele){27 ele.setAttribute("hidden","");28 ele.querySelectorAll("div[id='buttonText']")[0].innerHTML = "Uložit změny";29 },1000,ele);30 },31 error: function(response){32 alert(response.responseText);33 }34 });35}36function saveItemLoansData(ele){37 let dataElements = ele.parentNode.parentNode.parentNode.querySelectorAll("form[id='form']")[0];38 let token = dataElements.querySelectorAll("input[name='_token']")[0].value;39 let itemId = dataElements.querySelectorAll("input[name='itemId']")[0].value;40 let rent_from = dataElements.querySelectorAll("input[name='rent_from']")[0].value.trim().replaceAll(". ","-");41 let rent_to = dataElements.querySelectorAll("input[name='rent_to']")[0].value.trim().replaceAll(". ","-");42 if(rent_from == "" || rent_to == ""){43 dataElements.querySelectorAll("input[id='newLoanFormSubmit']")[0].click();44 return;45 }46 ele.querySelectorAll("div[id='buttonText']")[0].setAttribute("hidden","");47 ele.querySelectorAll("div[id='buttonLoading']")[0].removeAttribute("hidden");48 $.ajax({49 method: "POST",50 url: '/item/' + itemId + '/saveItemLoansData',51 data: { _token: token, itemId: itemId, rent_from: rent_from, rent_to: rent_to},52 success: function (response){53 let from = new Date(rent_from.replace( /(\d{2})-(\d{2})-(\d{4})/, "$2/$1/$3"));54 let to = new Date(rent_to.replace( /(\d{2})-(\d{2})-(\d{4})/, "$2/$1/$3"));55 let addon = String(from.getDate()).padStart(2, '0') + "-" + String(from.getMonth() + 1).padStart(2, '0') + "-" + from.getFullYear() + "/";56 while(from < to){57 from.setDate(from.getDate()+1);58 addon += String(from.getDate()).padStart(2, '0') + "-" + String(from.getMonth() + 1).padStart(2, '0') + "-" + from.getFullYear() + "/";59 }60 let dataElement = dataElements.querySelectorAll("input[name='rent_from']")[0].parentNode.parentNode;61 dataElement.setAttribute("data",dataElement.getAttribute("data") + addon);62 dataElements.querySelectorAll("input[name='rent_from']")[0].value = "";63 dataElements.querySelectorAll("input[name='rent_to']")[0].value = "";64 ele.querySelectorAll("div[id='buttonText']")[0].removeAttribute("hidden");65 ele.querySelectorAll("div[id='buttonLoading']")[0].setAttribute("hidden", "");66 if(response == "1"){67 ele.querySelectorAll("div[id='buttonText']")[0].innerHTML = 'Vypůjčeno <b>&#10003;</b> ';68 }else{69 ele.querySelectorAll("div[id='buttonText']")[0].innerHTML = '<b>&#x2715;</b>';70 }71 setTimeout(function (ele){72 ele.querySelectorAll("div[id='buttonLoading']")[0].setAttribute("hidden", "");73 ele.querySelectorAll("div[id='buttonText']")[0].removeAttribute("hidden");74 ele.querySelectorAll("div[id='buttonText']")[0].innerHTML = "Vypůjčit";75 },1000,ele);76 },77 });78}79function changeItemAvailability(ele, id){80 ele.querySelectorAll("div[id='buttonText']")[0].setAttribute("hidden","");81 let availability = ele.getAttribute("bool");82 ele.querySelectorAll("div[id='buttonLoading']")[0].removeAttribute("hidden");83 $.ajax({84 url: '/item/' + id + '/changeItemAvailability',85 method: "GET",86 data: { availability: availability },87 success: function (response) {88 let lastClass = 0;89 let actualClass = 0;90 let actualText = "";91 if(response["availability"] == "1"){92 lastClass = "btn-danger";93 actualClass = "btn-success";94 actualText = "Viditelné: ANO";95 }else{96 lastClass = "btn-success";97 actualClass = "btn-danger";98 actualText = "Viditelné: NE";99 }100 if(response["return"] == "1"){101 ele.querySelectorAll("div[id='buttonText']")[0].innerHTML = '<b>&#10003;</b>';102 ele.querySelectorAll("div[id='buttonText']")[0].removeAttribute("hidden");103 ele.querySelectorAll("div[id='buttonLoading']")[0].setAttribute("hidden", "");104 ele.setAttribute("bool",response["availability"] );105 setTimeout(function (ele){106 ele.querySelectorAll("div[id='buttonText']")[0].innerHTML = actualText;107 ele.classList.remove(lastClass);108 ele.classList.add(actualClass);109 },1000,ele);110 }else{111 ele.querySelectorAll("div[id='buttonText']")[0].innerHTML = '<b>&#x2715;</b>';112 ele.querySelectorAll("div[id='buttonText']")[0].removeAttribute("hidden");113 ele.querySelectorAll("div[id='buttonLoading']")[0].setAttribute("hidden", "");114 setTimeout(function (ele, actualText){115 ele.querySelectorAll("div[id='buttonText']")[0].innerHTML = actualText;116 },1000,ele, actualText);117 }118 }119 });...

Full Screen

Full Screen

home.js

Source:home.js Github

copy

Full Screen

...8 })9 socket.emit('queue',queKeys)10} else {11 document.title = `Modern Digital Archive`12 document.querySelectorAll('.noResults')[0].style.display = 'grid'13 document.querySelectorAll('.results')[0].style.display = 'none'14 document.querySelectorAll('.results .loading')[0].style.display = 'none'15}16var once = true17socket.on('loading',check=>{ 18 if (check){19 console.log(check);20 document.title = `MDA | Loading`21 document.querySelectorAll('.noResults')[0].style.display = 'none'22 document.querySelectorAll('.results')[0].style.display = 'grid'23 document.querySelectorAll('.results .loading')[0].style.display = 'grid'24 }else{25 socket.emit('request',true)26 }27})28socket.on('results',results=>{29 if (results.length != 0){30 document.title = `MDA | (${results.length})`31 document.querySelectorAll('.results .loading')[0].style.display = 'none'32 var o = document.querySelectorAll('.results')[0]33 results.forEach(result=>{34 var d = document.createElement('div')35 d.classList.add('result')36 var a = document.createElement('a')37 a.href = `/d/show/${result[0]}`38 var img = document.createElement('img')39 img.src = `${result[2]}`40 var h2 = document.createElement('h2')41 h2.innerText = `${result[1]}`42 var d2 = document.createElement('div')43 d2.classList.add('border')44 a.appendChild(img)45 a.appendChild(h2)46 d.appendChild(a)47 d.appendChild(d2)48 o.appendChild(d)49 })50 }else{51 document.title = `MDA | (0)`52 document.querySelectorAll('.noResults')[0].style.display = 'grid'53 document.querySelectorAll('.results')[0].style.display = 'none'54 document.querySelectorAll('.results .loading')[0].style.display = 'none'55 }56})57var loc = 0,keywords = '',i = 058document.querySelectorAll('.dataListener')[0].addEventListener('wheel',(e)=>{59 loc += (e.deltaY * document.querySelectorAll('.scroller')[0].clientHeight) / document.querySelectorAll('.content')[0].clientHeight60 if (e.deltaY > 0){61 if (loc >= 200) {62 document.querySelectorAll('.homeForm')[0].style.gridTemplateRows = "60px 1fr"63 document.querySelectorAll('.homeForm img')[0].style.display = "none"64 document.querySelectorAll('.homeForm .searcharea')[0].classList.add('fixed')65 }66 } else if (e.deltaY < 0){67 if (loc <= 0 && document.querySelectorAll('.dataListener')[0].scrollTop <= 200) {68 document.querySelectorAll('.homeForm')[0].style.gridTemplateRows = "500px 1fr"69 document.querySelectorAll('.homeForm img')[0].style.display = "block"70 document.querySelectorAll('.homeForm .searcharea')[0].classList.remove('fixed')71 }72 }73})74if ("ontouchstart" in window){75 document.querySelectorAll('.dataListener')[0].addEventListener('touchend',e=>{76 loc = document.querySelectorAll('.dataListener')[0].scrollTop77 if (loc >= 200) {78 document.querySelectorAll('.homeForm')[0].style.gridTemplateRows = "60px 1fr"79 document.querySelectorAll('.homeForm img')[0].style.display = "none"80 document.querySelectorAll('.homeForm .searcharea')[0].classList.add('fixed')81 } else if (loc <= 0 && document.querySelectorAll('.dataListener')[0].scrollTop <= 200) {82 document.querySelectorAll('.homeForm')[0].style.gridTemplateRows = "500px 1fr"83 document.querySelectorAll('.homeForm img')[0].style.display = "block"84 document.querySelectorAll('.homeForm .searcharea')[0].classList.remove('fixed')85 }86 })87 document.querySelectorAll('.dataListener')[0].addEventListener('touchstart',e=>{88 loc = document.querySelectorAll('.dataListener')[0].scrollTop89 if (loc >= 200) {90 document.querySelectorAll('.homeForm')[0].style.gridTemplateRows = "60px 1fr"91 document.querySelectorAll('.homeForm img')[0].style.display = "none"92 document.querySelectorAll('.homeForm .searcharea')[0].classList.add('fixed')93 } else if (loc == 0) {94 document.querySelectorAll('.homeForm')[0].style.gridTemplateRows = "500px 1fr"95 document.querySelectorAll('.homeForm img')[0].style.display = "block"96 document.querySelectorAll('.homeForm .searcharea')[0].classList.remove('fixed')97 }98 })99 document.querySelectorAll('.dataListener')[0].addEventListener('touchmove',e=>{100 loc = document.querySelectorAll('.dataListener')[0].scrollTop101 if (loc >= 200) {102 document.querySelectorAll('.homeForm')[0].style.gridTemplateRows = "60px 1fr"103 document.querySelectorAll('.homeForm img')[0].style.display = "none"104 document.querySelectorAll('.homeForm .searcharea')[0].classList.add('fixed')105 } else if (loc == 0) {106 document.querySelectorAll('.homeForm')[0].style.gridTemplateRows = "500px 1fr"107 document.querySelectorAll('.homeForm img')[0].style.display = "block"108 document.querySelectorAll('.homeForm .searcharea')[0].classList.remove('fixed')109 }110 })111}112function add(){113 var keyword = document.querySelectorAll('.homeForm .searcharea .searchFilter .keywords select')[0].value114 var value = document.querySelectorAll('.homeForm .searcharea .searchFilter .keywords #val')[0].value115 if (keyword !== '' && keyword != null) {116 i ++117 if (value !== '' && value != null) {118 keywords += `${keyword}:${value};`119 document.querySelectorAll('.homeForm .searcharea .searchFilter .keywords select')[0].value = ''120 document.querySelectorAll('.homeForm .searcharea .searchFilter .keywords #val')[0].value = ''121 document.querySelectorAll('.homeForm .searcharea .searchFilter .keywords button')[0].innerText = `add K:${i}`122 document.querySelectorAll('.homeForm .searcharea .searchFilter .keywords #keys')[0].value = keywords123 } else {124 alert('You have to give the value of this keyword first')125 }126 } else {127 alert('You have to select a keyword first')128 }...

Full Screen

Full Screen

speech.js

Source:speech.js Github

copy

Full Screen

...15 }16 else{17 responsiveVoice.cancel()18 document.getElementsByTagName('i')[2].className='fas fa-play'19 document.querySelectorAll('.one')[0].style.animationPlayState='paused'20 document.querySelectorAll('.two')[0].style.animationPlayState='paused'21 document.querySelectorAll('.three')[0].style.animationPlayState='paused'22 document.querySelectorAll('.reactor')[0].style.visibility='hidden'23 }24}25function speakTwo(){26 let butt=document.getElementsByTagName('i')[3].className27 if(butt=="fas fa-play"){28 document.getElementsByTagName('i')[3].className='fas fa-pause'29 let story = document.getElementById('story-two')30 responsiveVoice.speak(story.innerHTML, "US English Female", {rate: 0.9})31 32 document.querySelectorAll('.one')[1].style.animationPlayState='running'33 document.querySelectorAll('.two')[1].style.animationPlayState='running'34 document.querySelectorAll('.three')[1].style.animationPlayState='running'35 document.querySelectorAll('.reactor')[1].style.visibility='visible'36 }37 else{38 responsiveVoice.cancel()39 document.getElementsByTagName('i')[3].className='fas fa-play'40 document.querySelectorAll('.one')[1].style.animationPlayState='paused'41 document.querySelectorAll('.two')[1].style.animationPlayState='paused'42 document.querySelectorAll('.three')[1].style.animationPlayState='paused'43 document.querySelectorAll('.reactor')[1].style.visibility='hidden'44 }45}46function speakThree(){47 let butt=document.getElementsByTagName('i')[4].className48 if(butt=="fas fa-play"){49 document.getElementsByTagName('i')[4].className='fas fa-pause'50 let story = document.getElementById('story-three')51 responsiveVoice.speak(story.innerHTML, "US English Female", {rate: 0.9})52 document.querySelectorAll('.one')[2].style.animationPlayState='running'53 document.querySelectorAll('.two')[2].style.animationPlayState='running'54 document.querySelectorAll('.three')[2].style.animationPlayState='running'55 document.querySelectorAll('.reactor')[2].style.visibility='visible'56 }57 else{58 responsiveVoice.cancel()59 document.getElementsByTagName('i')[4].className='fas fa-play'60 document.querySelectorAll('.one')[2].style.animationPlayState='paused'61 document.querySelectorAll('.two')[2].style.animationPlayState='paused'62 document.querySelectorAll('.three')[2].style.animationPlayState='paused'63 document.querySelectorAll('.reactor')[2].style.visibility='hidden'64 }65}66function speakFour(){67 let butt=document.getElementsByTagName('i')[5].className68 if(butt=="fas fa-play"){69 document.getElementsByTagName('i')[5].className='fas fa-pause'70 let story = document.getElementById('story-four')71 responsiveVoice.speak(story.innerHTML, "US English Female", {rate: 0.9})72 73 document.querySelectorAll('.one')[3].style.animationPlayState='running'74 document.querySelectorAll('.two')[3].style.animationPlayState='running'75 document.querySelectorAll('.three')[3].style.animationPlayState='running'76 document.querySelectorAll('.reactor')[3].style.visibility='visible'77 }78 else{79 responsiveVoice.cancel()80 document.getElementsByTagName('i')[5].className='fas fa-play'81 document.querySelectorAll('.one')[3].style.animationPlayState='paused'82 document.querySelectorAll('.two')[3].style.animationPlayState='paused'83 document.querySelectorAll('.three')[3].style.animationPlayState='paused'84 document.querySelectorAll('.reactor')[3].style.visibility='hidden'85 }86}87function speakFive(){88 89 let butt=document.getElementsByTagName('i')[6].className90 if(butt=="fas fa-play"){91 document.getElementsByTagName('i')[6].className='fas fa-pause'92 let story = document.getElementById('story-five')93 responsiveVoice.speak(story.innerHTML, "US English Female", {rate: 0.9})94 95 document.querySelectorAll('.one')[4].style.animationPlayState='running'96 document.querySelectorAll('.two')[4].style.animationPlayState='running'97 document.querySelectorAll('.three')[4].style.animationPlayState='running'98 document.querySelectorAll('.reactor')[4].style.visibility='visible'99 }100 else{101 responsiveVoice.cancel()102 document.getElementsByTagName('i')[6].className='fas fa-play'103 document.querySelectorAll('.one')[4].style.animationPlayState='paused'104 document.querySelectorAll('.two')[4].style.animationPlayState='paused'105 document.querySelectorAll('.three')[4].style.animationPlayState='paused'106 document.querySelectorAll('.reactor')[4].style.visibility='hidden'107 }108}109function speakSix(){110 let butt=document.getElementsByTagName('i')[7].className111 if(butt=="fas fa-play"){112 document.getElementsByTagName('i')[7].className='fas fa-pause'113 let story = document.getElementById('story-six')114 responsiveVoice.speak(story.innerHTML, "US English Female", {rate: 0.9})115 116 document.querySelectorAll('.one')[5].style.animationPlayState='running'117 document.querySelectorAll('.two')[5].style.animationPlayState='running'118 document.querySelectorAll('.three')[5].style.animationPlayState='running'119 document.querySelectorAll('.reactor')[5].style.visibility='visible'120 }121 else{122 responsiveVoice.cancel()123 document.getElementsByTagName('i')[7].className='fas fa-play'124 document.querySelectorAll('.one')[5].style.animationPlayState='paused'125 document.querySelectorAll('.two')[5].style.animationPlayState='paused'126 document.querySelectorAll('.three')[5].style.animationPlayState='paused'127 document.querySelectorAll('.reactor')[5].style.visibility='hidden'128 }...

Full Screen

Full Screen

scrollbar.js

Source:scrollbar.js Github

copy

Full Screen

1var x = ((window.innerHeight -50) * document.querySelectorAll('.scroller')[0].clientHeight) /document.querySelectorAll('.content')[0].clientHeight2document.getElementsByClassName('position')[0].style.height = `${x}px`3var pressing = false,curr;4document.querySelectorAll('.position')[0].addEventListener('mousedown',(e)=>{5 pressing = true6 curr = e.pageY7 document.querySelectorAll('.scrollblock')[0].style.display = 'grid'8 document.querySelectorAll('.scroller')[0].classList.add('hover')9 document.querySelectorAll('.position')[0].classList.add('hover')10})11document.querySelectorAll('.scrollblock')[0].addEventListener('mousemove',(e)=>{12 if (pressing) {13 if (e.pageY < curr){14 var curMargin = document.querySelectorAll('.position')[0].offsetHeight - document.querySelectorAll('.position')[0].clientHeight15 var p = document.querySelectorAll('.position')[0]16 var style = p.currentStyle || window.getComputedStyle(p)17 curMargin = parseInt(style.marginTop.split('px')[0],10)18 curMargin += e.pageY-curr19 if (curMargin > 0) {20 document.querySelectorAll('.position')[0].style.marginTop = `${curMargin}px`21 document.querySelectorAll('.dataListener')[0].scrollTop = (curMargin * document.querySelectorAll('.content')[0].clientHeight)/document.querySelectorAll('.scroller')[0].clientHeight22 } else {23 document.querySelectorAll('.position')[0].style.marginTop = `0px`24 document.querySelectorAll('.dataListener')[0].scrollTop = 025 }26 }else if (e.pageY > curr){27 var curMargin = document.querySelectorAll('.position')[0].offsetHeight - document.querySelectorAll('.position')[0].clientHeight28 var p = document.querySelectorAll('.position')[0]29 var style = p.currentStyle || window.getComputedStyle(p)30 curMargin = parseInt(style.marginTop.split('px')[0],10)31 curMargin += e.pageY-curr32 if (document.querySelectorAll('.scroller')[0].clientHeight - document.querySelectorAll('.position')[0].clientHeight - curMargin >= 0) {33 document.querySelectorAll('.position')[0].style.marginTop = `${curMargin}px`34 document.querySelectorAll('.dataListener')[0].scrollTop = (curMargin * document.querySelectorAll('.content')[0].clientHeight)/document.querySelectorAll('.scroller')[0].clientHeight35 } else {36 curMargin = document.querySelectorAll('.scroller')[0].clientHeight - document.querySelectorAll('.position')[0].clientHeight37 document.querySelectorAll('.position')[0].style.marginTop = `${curMargin}px` - 138 document.querySelectorAll('.dataListener')[0].scrollTop = document.querySelectorAll('.content')[0].clientHeight39 }40 }else if (e.pageY == curr){41 }42 } else {43 }44})45document.querySelectorAll('.scrollblock')[0].addEventListener('mouseup',()=>{46 pressing = false47 document.querySelectorAll('.scrollblock')[0].style.display = 'none'48 document.querySelectorAll('.scroller')[0].classList.remove('hover')49 document.querySelectorAll('.position')[0].classList.remove('hover')50})51var loc = 0,time = 052document.querySelectorAll('.dataListener')[0].addEventListener('wheel',(e)=>{53 loc += (e.deltaY * document.querySelectorAll('.scroller')[0].clientHeight) / document.querySelectorAll('.content')[0].clientHeight54 if (e.deltaY > 0){55 if (document.querySelectorAll('.scroller')[0].clientHeight - loc - document.querySelectorAll('.position')[0].clientHeight > 0) {56 document.querySelectorAll('.position')[0].style.marginTop = `${loc}px`57 if (time == 0){58 setTimeout(remove,2000)59 time = 160 }61 } else {62 loc = document.querySelectorAll('.scroller')[0].clientHeight - document.querySelectorAll('.position')[0].clientHeight - 163 document.querySelectorAll('.position')[0].style.marginTop = `${loc}px`64 if (time == 0){65 setTimeout(remove,666)66 time = 167 }68 }69 } else if (e.deltaY < 0){70 if (loc > 0) {71 document.querySelectorAll('.position')[0].style.marginTop = `${loc}px`72 if (time == 0){73 setTimeout(remove,2000)74 time = 175 }76 } else {77 loc = 078 document.querySelectorAll('.position')[0].style.marginTop = `0px`79 if (time == 0){80 setTimeout(remove,666)81 time = 182 }83 }84 }85 document.querySelectorAll('.scroller')[0].classList.add('hover')86 document.querySelectorAll('.position')[0].classList.add('hover')87})88function remove(){89 document.querySelectorAll('.scroller')[0].classList.remove('hover')90 document.querySelectorAll('.position')[0].classList.remove('hover')91 time = 0...

Full Screen

Full Screen

add_remover.js

Source:add_remover.js Github

copy

Full Screen

1window.addEventListener("load", () => {2 setInterval(() => {3 let arrElementDeleted = [];4 let searchElementDeleted = [5 document.querySelectorAll("#ad_unit"),6 document.querySelectorAll("#google_esf"),7 document.querySelectorAll("#ad_container"),8 document.querySelectorAll("#content .Contentid"),9 document.querySelectorAll(".ads_ad_box6"),10 11 document.querySelectorAll("lima-video"),12 document.querySelectorAll("#animation_container"),13 document.querySelectorAll(".rectangle-banner"),14 document.querySelectorAll(".trg-b-banner-block"),15 document.querySelectorAll(".mailru-visibility-check"),16 document.querySelectorAll(".promo-banner"),17 document.querySelectorAll(".root__bottom-ad"),18 document.querySelectorAll(".js-zone-container"),19 //document.querySelectorAll('.hookBlock'),20 21 document.querySelectorAll('a[href*="mail.ru/redir"]'),22 document.querySelectorAll("a[href*=google]"),23 document.querySelectorAll("a[href*=Google]"),24 25 document.querySelectorAll("script[src*=Google]"),26 document.querySelectorAll("script[src*=google]"),27 28 document.querySelectorAll("img[src*=Google]"),29 document.querySelectorAll("img[src*=google]"),30 31 document.querySelectorAll("div[class*=Google]"),32 document.querySelectorAll("div[class*=amzn]"),33 document.querySelectorAll("div[class*=google]"),34 document.querySelectorAll("div[class*=ads]"),35 //document.querySelectorAll('div[class*=ad]'),36 document.querySelectorAll("div[class*=Ads]"),37 //document.querySelectorAll('div[class*=Ad]'),38 39 document.querySelectorAll("iframe[src*=Google]"),40 document.querySelectorAll("iframe[id*=google]"),41 document.querySelectorAll("iframe[id*=Google]"),42 document.querySelectorAll("iframe[src*=google]"),43 document.querySelectorAll("iframe[src*=googleads]"),44 ];45 46 searchElementDeleted.forEach((el) => (el.length > 0 ? addInArr(el) : ""));47 48 function addInArr(htmlList) {49 htmlList.forEach((el) => arrElementDeleted.push(el));50 }51 52 if (arrElementDeleted.length > 0)53 arrElementDeleted.forEach((el) => (el.style.display = "none"));54 }, 100);...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1const { chromium } = require('playwright');2(async () => {3 const browser = await chromium.launch();4 const context = await browser.newContext();5 const page = await context.newPage();6 const dimensions = await page.evaluate(() => {7 return {8 };9 });10 console.log('Dimensions:', dimensions);11 await browser.close();12})();13const { chromium } = require('playwright');14(async () => {15 const browser = await chromium.launch();16 const context = await browser.newContext();17 const page = await context.newPage();18 const dimensions = await page.evaluate(() => {19 return {20 };21 });22 console.log('Dimensions:', dimensions);23 await browser.close();24})();25const { chromium } = require('playwright');26(async () => {27 const browser = await chromium.launch();28 const context = await browser.newContext();29 const page = await context.newPage();30 const dimensions = await page.evaluate(() => {31 return {32 };33 });34 console.log('Dimensions:', dimensions);35 await browser.close();36})();37const { chromium } = require('playwright');38(async () => {39 const browser = await chromium.launch();40 const context = await browser.newContext();41 const page = await context.newPage();

Full Screen

Using AI Code Generation

copy

Full Screen

1const { chromium } = require('playwright');2(async () => {3 const browser = await chromium.launch();4 const context = await browser.newContext();5 const page = await context.newPage();6 const elements = await page._client.send('DOM.querySelectorAll', { nodeId: 1, selector: 'a' });7 console.log(elements);8 await browser.close();9})();10{ nodeIds: [ 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 35, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127

Full Screen

Using AI Code Generation

copy

Full Screen

1const { chromium } = require('playwright');2(async () => {3 const browser = await chromium.launch();4 const context = await browser.newContext();5 const page = await context.newPage();6 const links = await page.$$('a');7 console.log(links.length);8 await browser.close();9})();10const { chromium } = require('playwright');11(async () => {12 const browser = await chromium.launch();13 const context = await browser.newContext();14 const page = await context.newPage();15 const link = await page.$('a');16 console.log(link);17 await browser.close();18})();19const { chromium } = require('playwright');20(async () => {21 const browser = await chromium.launch();22 const context = await browser.newContext();23 const page = await context.newPage();24 const link = await page.$('a');25 console.log(link);26 await browser.close();27})();28const { chromium } = require('playwright');29(async () => {30 const browser = await chromium.launch();31 const context = await browser.newContext();32 const page = await context.newPage();33 const link = await page.$('a');34 console.log(link);35 await browser.close();36})();37const { chromium } = require('playwright');38(async () => {39 const browser = await chromium.launch();40 const context = await browser.newContext();41 const page = await context.newPage();42 const link = await page.$('a');43 console.log(link);44 await browser.close();45})();46const { chromium } = require('playwright');47(async () => {48 const browser = await chromium.launch();49 const context = await browser.newContext();50 const page = await context.newPage();

Full Screen

Using AI Code Generation

copy

Full Screen

1const { chromium } = require('playwright');2(async () => {3 const browser = await chromium.launch({ headless: false });4 const page = await browser.newPage();5 const input = await page.$('#lst-ib');6 await input.type('Playwright');7 await page.click('input[value="Google Search"]');8 await page.waitForSelector('.rc');9 const results = await page.$$('.rc');10 console.log(`Number of results: ${results.length}`);11 await browser.close();12})();13const { chromium } = require('playwright');14(async () => {15 const browser = await chromium.launch({ headless: false });16 const page = await browser.newPage();17 const input = await page.$('#lst-ib');18 await input.type('Playwright');19 await page.click('input[value="Google Search"]');20 await page.waitForSelector('.rc');21 const results = await page.$$('.rc');22 console.log(`Number of results: ${results.length}`);23 await browser.close();24})();25const { chromium } = require('playwright');26(async () => {27 const browser = await chromium.launch({ headless: false });28 const page = await browser.newPage();29 const input = await page.$('#lst-ib');30 await input.type('Playwright');31 await page.click('input[value="Google Search"]');32 await page.waitForSelector('.rc');33 const results = await page.$$('.rc');34 console.log(`Number of results: ${results.length}`);35 await browser.close();36})();37const { chromium } = require('playwright');38(async () => {39 const browser = await chromium.launch({ headless: false });40 const page = await browser.newPage();41 const input = await page.$('#lst-ib');42 await input.type('Playwright');43 await page.click('input[value="Google Search"]');44 await page.waitForSelector('.rc');45 const results = await page.$$('.rc

Full Screen

Using AI Code Generation

copy

Full Screen

1const { chromium } = require('playwright');2(async () => {3 const browser = await chromium.launch();4 const page = await browser.newPage();5 const links = await page.$$('a');6 console.log(links.length);7 await browser.close();8})();9const { chromium } = require('playwright');10(async () => {11 const browser = await chromium.launch();12 const page = await browser.newPage();13 const links = await page.$$('a');14 console.log(links.length);15 await browser.close();16})();17const { chromium } = require('playwright');18(async () => {19 const browser = await chromium.launch();20 const page = await browser.newPage();21 const links = await page.$$('a');22 console.log(links.length);23 await browser.close();24})();25const { chromium } = require('playwright');26(async () => {27 const browser = await chromium.launch();28 const page = await browser.newPage();29 const links = await page.$$('a');30 console.log(links.length);31 await browser.close();32})();33const { chromium } = require('playwright');34(async () => {35 const browser = await chromium.launch();36 const page = await browser.newPage();37 const links = await page.$$('a');38 console.log(links.length);39 await browser.close();40})();41const { chromium } = require('playwright');42(async () => {43 const browser = await chromium.launch();44 const page = await browser.newPage();45 const links = await page.$$('a');46 console.log(links.length);47 await browser.close();48})();49const { chromium } = require

Full Screen

Using AI Code Generation

copy

Full Screen

1const { chromium } = require("playwright");2(async () => {3 const browser = await chromium.launch();4 const page = await browser.newPage();5 await page.screenshot({ path: "google.png" });6 await page.click('input[aria-label="Search"]');7 await page.fill('input[aria-label="Search"]', "Playwright");8 await page.screenshot({ path: "google-search.png" });9 await page.keyboard.press("Enter");10 await page.waitForSelector("h3");11 const searchResults = await page.$$("h3");12 await searchResults[0].click();13 await page.waitForSelector("text=Playwright");14 await page.screenshot({ path: "playwright.png" });15 await browser.close();16})();17const { chromium } = require("playwright");18(async () => {19 const browser = await chromium.launch();20 const page = await browser.newPage();21 await page.screenshot({ path: "google.png" });22 await page.click('input[aria-label="Search"]');23 await page.fill('input[aria-label="Search"]', "Playwright");24 await page.screenshot({ path: "google-search.png" });25 await page.keyboard.press("Enter");26 await page.waitForSelector("h3");27 const searchResults = await page.$("h3");28 await searchResults.click();29 await page.waitForSelector("text=Playwright");30 await page.screenshot({ path: "playwright.png" });31 await browser.close();32})();33const { chromium } = require("playwright");34(async () => {35 const browser = await chromium.launch();36 const page = await browser.newPage();37 await page.screenshot({ path: "google.png" });38 await page.click('input[aria-label="Search"]');39 await page.fill('input[aria-label="Search"]', "Playwright");40 await page.screenshot({ path: "google-search.png" });41 await page.keyboard.press("Enter");42 await page.waitForSelector("h3");43 const searchResults = await page.$("h3");

Full Screen

Using AI Code Generation

copy

Full Screen

1const { chromium } = require('playwright');2(async () => {3 const browser = await chromium.launch();4 const page = await browser.newPage();5 const allLinks = await page.$$('a');6 console.log(allLinks.length);7 await browser.close();8})();9const { chromium } = require('playwright');10(async () => {11 const browser = await chromium.launch();12 const page = await browser.newPage();13 const link = await page.$('a');14 console.log(link);15 await browser.close();16})();17const { chromium } = require('playwright');18(async () => {19 const browser = await chromium.launch();20 const page = await browser.newPage();21 const link = await page.$('a');22 console.log(link);23 await browser.close();24})();25const { chromium } = require('playwright');26(async () => {27 const browser = await chromium.launch();28 const page = await browser.newPage();29 const link = await page.$('a');30 console.log(link);31 await browser.close();32})();33const { chromium } = require('playwright');34(async () => {35 const browser = await chromium.launch();36 const page = await browser.newPage();37 const link = await page.$('a');38 console.log(link);39 await browser.close();40})();41const { chromium } = require('playwright');42(async () => {43 const browser = await chromium.launch();44 const page = await browser.newPage();45 const link = await page.$('a');46 console.log(link);47 await browser.close();48})();49const {

Full Screen

Using AI Code Generation

copy

Full Screen

1const { querySelectorAll } = require('@playwright/test/lib/server/dom');2const { chromium } = require('playwright');3(async () => {4 const browser = await chromium.launch();5 const context = await browser.newContext();6 const page = await context.newPage();7 const elements = await querySelectorAll(page, 'text=Get started');8 console.log(elements.length);9 await browser.close();10})();11const { querySelector } = require('@playwright/test/lib/server/dom');12const { chromium } = require('playwright');13(async () => {14 const browser = await chromium.launch();15 const context = await browser.newContext();16 const page = await context.newPage();17 const element = await querySelector(page, 'text=Get started');18 console.log(element);19 await browser.close();20})();21const { waitForSelector } = require('@playwright/test/lib/server/dom');22const { chromium } = require('playwright');23(async () => {24 const browser = await chromium.launch();25 const context = await browser.newContext();26 const page = await context.newPage();27 const element = await waitForSelector(page, 'text=Get started');28 console.log(element);29 await browser.close();30})();31const { waitFor } = require('@playwright/test/lib/utils/utils');32const { chromium } = require('playwright');33(async () => {34 const browser = await chromium.launch();35 const context = await browser.newContext();36 const page = await context.newPage();37 const element = await waitFor(page, () => document.querySelector('text=Get started'));38 console.log(element);39 await browser.close();40})();

Full Screen

Using AI Code Generation

copy

Full Screen

1const {chromium} = require('playwright');2(async()=>{3const browser = await chromium.launch();4const page = await browser.newPage();5const elements = await page.$$('h1');6console.log(elements.length);7await browser.close();8})();9const {chromium} = require('playwright');10(async()=>{11const browser = await chromium.launch();12const page = await browser.newPage();13const elements = await page.$$('h1');14console.log(elements.length);15await browser.close();16})();17const {chromium} = require('playwright');18(async()=>{19const browser = await chromium.launch();20const page = await browser.newPage();21const elements = await page.$$('h1');22console.log(elements.length);23await browser.close();24})();25const {chromium} = require('playwright');26(async()=>{27const browser = await chromium.launch();28const page = await browser.newPage();29const elements = await page.$$('h1');30console.log(elements.length);31await browser.close();32})();33const {chromium} = require('playwright');34(async()=>{35const browser = await chromium.launch();36const page = await browser.newPage();37const elements = await page.$$('h1');38console.log(elements.length);39await browser.close();40})();41const {chromium} = require('playwright');42(async()=>{43const browser = await chromium.launch();44const page = await browser.newPage();45const elements = await page.$$('h1');46console.log(elements.length);47await browser.close();48})();49const {chromium} = require('playwright');50(async()=>{51const browser = await chromium.launch();52const page = await browser.newPage();

Full Screen

Using AI Code Generation

copy

Full Screen

1const {chromium} = require('playwright');2(async () => {3 const browser = await chromium.launch({headless: false});4 const page = await browser.newPage();5 await page.waitForSelector('input[name="q"]');6 await page.type('input[name="q"]', 'playwright');7 await page.click('input[value="Google Search"]');8 await page.waitForSelector('text=Playwright');9 const links = await page.$$('text=Playwright');10 console.log(links.length);11 await browser.close();12})();13const {chromium} = require('playwright');14(async () => {15 const browser = await chromium.launch({headless: false});16 const page = await browser.newPage();17 await page.waitForSelector('input[name="q"]');18 await page.type('input[name="q"]', 'playwright');19 await page.click('input[value="Google Search"]');20 await page.waitForSelector('text=Playwright');21 const links = await page.$$('text=Playwright');22 console.log(links.length);23 await browser.close();24})();25const {chromium} = require('playwright');26(async () => {27 const browser = await chromium.launch({headless: false});28 const page = await browser.newPage();29 await page.waitForSelector('input[name="q"]');30 await page.type('input[name="q"]', 'playwright');31 await page.click('input[value="Google Search"]');32 await page.waitForSelector('text=Playwright');33 const links = await page.$$('text=Playwright');34 console.log(links.length);35 await browser.close();36})();37const {chromium} = require('playwright');38(async () => {39 const browser = await chromium.launch({headless: false});

Full Screen

Playwright tutorial

LambdaTest’s Playwright tutorial will give you a broader idea about the Playwright automation framework, its unique features, and use cases with examples to exceed your understanding of Playwright testing. This tutorial will give A to Z guidance, from installing the Playwright framework to some best practices and advanced concepts.

Chapters:

  1. What is Playwright : Playwright is comparatively new but has gained good popularity. Get to know some history of the Playwright with some interesting facts connected with it.
  2. How To Install Playwright : Learn in detail about what basic configuration and dependencies are required for installing Playwright and run a test. Get a step-by-step direction for installing the Playwright automation framework.
  3. Playwright Futuristic Features: Launched in 2020, Playwright gained huge popularity quickly because of some obliging features such as Playwright Test Generator and Inspector, Playwright Reporter, Playwright auto-waiting mechanism and etc. Read up on those features to master Playwright testing.
  4. What is Component Testing: Component testing in Playwright is a unique feature that allows a tester to test a single component of a web application without integrating them with other elements. Learn how to perform Component testing on the Playwright automation framework.
  5. Inputs And Buttons In Playwright: Every website has Input boxes and buttons; learn about testing inputs and buttons with different scenarios and examples.
  6. Functions and Selectors in Playwright: Learn how to launch the Chromium browser with Playwright. Also, gain a better understanding of some important functions like “BrowserContext,” which allows you to run multiple browser sessions, and “newPage” which interacts with a page.
  7. Handling Alerts and Dropdowns in Playwright : Playwright interact with different types of alerts and pop-ups, such as simple, confirmation, and prompt, and different types of dropdowns, such as single selector and multi-selector get your hands-on with handling alerts and dropdown in Playright testing.
  8. Playwright vs Puppeteer: Get to know about the difference between two testing frameworks and how they are different than one another, which browsers they support, and what features they provide.
  9. Run Playwright Tests on LambdaTest: Playwright testing with LambdaTest leverages test performance to the utmost. You can run multiple Playwright tests in Parallel with the LammbdaTest test cloud. Get a step-by-step guide to run your Playwright test on the LambdaTest platform.
  10. Playwright Python Tutorial: Playwright automation framework support all major languages such as Python, JavaScript, TypeScript, .NET and etc. However, there are various advantages to Python end-to-end testing with Playwright because of its versatile utility. Get the hang of Playwright python testing with this chapter.
  11. Playwright End To End Testing Tutorial: Get your hands on with Playwright end-to-end testing and learn to use some exciting features such as TraceViewer, Debugging, Networking, Component testing, Visual testing, and many more.
  12. Playwright Video Tutorial: Watch the video tutorials on Playwright testing from experts and get a consecutive in-depth explanation of Playwright automation testing.

Run Playwright Internal 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