I'm trying to study this code but I can't read it. (code below) I tried deobfuscating it but it's just as hard to read as it was before. What type of obfuscation is this and what website, application, or process can I use to make it easy to read?
eval(function(p,a,c,k,e,d){while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+c+'\\b','g'),k[c])}}return p}('43 131=[\'\\73\\26\\11\\24\\7\\15\\10\\0\\3\\13\\8\\5\',\'\\55\\26\\11\\13\\80\\26\\10\\46\\3\\23\\9\\5\',\'\\3\\23\\33\\6\\3\\23\\7\\7\\25\\31\\56\\5\',\'\\3\\20\\48\\6\\25\\58\\14\\6\\37\\15\\10\\92\',\'\\55\\16\\10\\11\\3\\23\\3\\10\\85\\3\\5\\5\',\'\\85\\18\\10\\40\\78\\26\\11\\68\\32\\31\\5\\5\',\'\\50\\2\\14\\6\\40\\49\\67\\0\',\'\\3\\20\\18\\36\\3\\23\\0\\8\\55\\8\\5\\5\',\'\\3\\13\\62\\6\\25\\51\\69\\20\\3\\13\\20\\5\',\'\\78\\14\\49\\50\\49\\22\\31\\5\',\'\\30\\63\\41\\36\\68\\2\\20\\5\',\'\\3\\19\\8\\85\\3\\12\\9\\73\\79\\3\\5\\5\',\'\\22\\7\\26\\75\\3\\20\\12\\63\',\'\\54\\18\\10\\46\\3\\12\\49\\25\\16\\8\\5\\5\',\'\\3\\9\\69\\67\\16\\48\\19\\7\\33\\3\\5\\5\',\'\\3\\23\\32\\6\\52\\6\\50\\6\\52\\24\\9\\5\',\'\\31\\16\\10\\38\\3\\13\\37\\79\\73\\3\\5\\5\',\'\\3\\47\\46\\6\\77\\2\\26\\16\\50\\31\\5\\5\',\'\\80\\16\\10\\67\\79\\15\\11\\77\\17\\3\\5\\5\',\'\\6\\41\\33\\9\\2\\63\\49\\5\',\'\\55\\15\\10\\45\\45\\18\\11\\11\\17\\33\\5\\5\',\'\\63\\26\\10\\58\\3\\47\\2\\6\\77\\15\\11\\7\',\'\\56\\18\\11\\14\\70\\15\\10\\77\\3\\12\\56\\5\',\'\\3\\13\\37\\56\\3\\9\\62\\7\\25\\39\\49\\5\',\'\\3\\9\\25\\40\\85\\38\\78\\39\',\'\\3\\19\\32\\6\\39\\6\\33\\25\\68\\31\\5\\5\',\'\\3\\23\\40\\7\\52\\36\\37\\16\\3\\19\\0\\5\',\'\\3\\9\\33\\77\\30\\36\\33\\25\',\'\\3\\20\\78\\105\\3\\20\\67\\8\\68\\33\\5\\5\',\'\\3\\13\\78\\75\\54\\18\\11\\40\\68\\33\\5\\5\',\'\\50\\80\\15\\75\\31\\14\\49\\5\',\'\\3\\12\\75\\37\\73\\15\\10\\8\\54\\33\\5\\5\',\'\\3\\20\\36\\92\\45\\37\\55\\6\\19\\33\\5\\5\',\'\\2\\15\\11\\17\\7\\80\\16\\29\',\'\\30\\24\\13\\6\\25\\48\\22\\33\',\'\\3\\13\\92\\7\\75\\2\\55\\7\\77\\18\\11\\73\',\'\\56\\14\\48\\6\\20\\16\\11\\52\\3\\20\\8\\5\',\'\\3\\25\\39\\6\\39\\49\\19\\6\\39\\16\\11\\24\',\'\\45\\48\\31\\9\\2\\62\\37\\5\',\'\\3\\19\\32\\6\\33\\24\\19\\6\\58\\18\\11\\22\',\'\\3\\47\\62\\6\\62\\29\\8\\6\\3\\9\\16\\5\',\'\\3\\19\\7\\6\\62\\41\\46\\7\\47\\18\\10\\29\',\'\\3\\9\\20\\58\\6\\3\\31\\20\',\'\\3\\19\\14\\7\\33\\8\\22\\45\\10\\8\\5\\5\',\'\\3\\19\\2\\6\\58\\67\\32\\6\\75\\16\\10\\48\',\'\\3\\47\\9\\39\\3\\19\\41\\47\\17\\31\\5\\5\',\'\\54\\26\\11\\62\\3\\13\\13\\7\\19\\16\\10\\41\',\'\\3\\23\\49\\15\\22\\16\\11\\32\\51\\8\\5\\5\',\'\\3\\47\\40\\6\\39\\58\\2\\6\\33\\18\\10\\69\',\'\\3\\19\\32\\7\\52\\37\\81\\49\\3\\13\\56\\5\',\'\\3\\20\\14\\7\\44\\16\\11\\11\\3\\9\\31\\5\',\'\\3\\12\\9\\78\\26\\58\\16\\47\',\'\\3\\12\\22\\92\\51\\16\\11\\54\\8\\8\\5\\5\',\'\\3\\19\\48\\6\\52\\44\\18\\69\\3\\13\\18\\5\',\'\\3\\19\\14\\6\\15\\31\\62\\7\\19\\26\\10\\2\',\'\\73\\18\\10\\6\\3\\13\\70\\10\\81\\31\\5\\5\',\'\\3\\25\\48\\6\\75\\75\\24\\6\\36\\18\\11\\3\',\'\\3\\20\\18\\67\\3\\13\\20\\30\\56\\31\\5\\5\',\'\\3\\20\\30\\18\\10\\29\\40\\6\\15\\8\\5\\5\',\'\\3\\25\\7\\7\\39\\63\\45\\7\\40\\29\\49\\5\',\'\\3\\19\\19\\6\\19\\2\\31\\52\\3\\23\\26\\5\',\'\\3\\19\\45\\6\\20\\80\\26\\16\\10\\3\\5\\5\',\'\\3\\23\\39\\6\\52\\58\\0\\7\\3\\9\\0\\5\',\'\\3\\12\\48\\6\\36\\37\\17\\24\\3\\12\\0\\5\',\'\\3\\19\\55\\6\\52\\24\\37\\11\\32\\31\\5\\5\',\'\\26\\22\\37\\80\\63\\30\\31\\5\',\'\\3\\9\\7\\6\\15\\48\\9\\7\\3\\12\\0\\5\',\'\\7\\26\\11\\76\\3\\20\\24\\7\\36\\51\\26\\5\',\'\\3\\9\\45\\6\\20\\26\\11\\3\\16\\33\\16\\5\',\'\\3\\13\\19\\6\\20\\6\\92\\6\\52\\73\\3\\5\',\'\\17\\76\\70\\44\\3\\25\\75\\31\',\'\\3\\23\\33\\47\\45\\15\\11\\31\\8\\8\\5\\5\',\'\\68\\36\\48\\6\\58\\15\\10\\16\\3\\23\\31\\5\',\'\\3\\23\\24\\6\\37\\16\\11\\22\\79\\41\\31\\5\',\'\\16\\18\\11\\15\\7\\15\\10\\52\\3\\12\\20\\5\',\'\\3\\9\\52\\10\\55\\18\\11\\76\',\'\\81\\76\\24\\6\\77\\15\\10\\25\\3\\23\\16\\5\',\'\\16\\24\\92\\7\\15\\26\\11\\52\\3\\47\\8\\5\',\'\\8\\18\\10\\58\\3\\12\\50\\6\\58\\33\\20\\5\',\'\\3\\12\\3\\37\\46\\26\\10\\44\\3\\25\\49\\5\',\'\\3\\13\\14\\6\\19\\39\\14\\6\\40\\63\\18\\5\',\'\\3\\19\\13\\6\\40\\45\\20\\18\\3\\23\\33\\5\',\'\\3\\9\\45\\7\\58\\6\\9\\67\\16\\31\\5\\5\',\'\\3\\9\\7\\7\\58\\44\\92\\7\\75\\26\\11\\25\',\'\\54\\26\\11\\11\\50\\8\\22\\9\',\'\\32\\38\\37\\58\\54\\76\\31\\5\',\'\\79\\7\\49\\0\\26\\15\\11\\14\',\'\\10\\22\\40\\6\\52\\36\\0\\105\',\'\\3\\19\\29\\79\\3\\19\\52\\37\\41\\3\\5\\5\',\'\\56\\26\\10\\22\\3\\23\\51\\15\',\'\\2\\16\\10\\14\\78\\29\\13\\7\\37\\33\\5\\5\',\'\\54\\16\\11\\2\\32\\22\\31\\50\',\'\\14\\16\\11\\55\\10\\22\\0\\8\',\'\\31\\16\\11\\78\\3\\19\\46\\7\\39\\26\\11\\40\',\'\\3\\25\\56\\15\\3\\12\\51\\22\\30\\33\\5\\5\',\'\\17\\62\\49\\41\\49\\6\\9\\5\',\'\\7\\31\\26\\40\\63\\29\\70\\5\',\'\\46\\16\\10\\9\\32\\15\\11\\70\\10\\3\\5\\5\',\'\\30\\26\\11\\67\\3\\47\\39\\7\\44\\22\\0\\5\',\'\\55\\15\\10\\23\\78\\44\\92\\7\\20\\33\\5\\5\',\'\\3\\25\\37\\67\\3\\23\\25\\49\\49\\33\\5\\5\',\'\\3\\19\\40\\6\\20\\2\\17\\73\\17\\31\\5\\5\',\'\\85\\15\\11\\3\\3\\23\\14\\7\\19\\26\\10\\54\',\'\\3\\19\\2\\6\\77\\24\\31\\73\\32\\8\\5\\5\',\'\\3\\9\\14\\6\\37\\67\\14\\6\\39\\49\\22\\5\',\'\\3\\13\\39\\7\\25\\63\\39\\7\\20\\16\\11\\41\',\'\\3\\9\\46\\7\\19\\44\\50\\7\\39\\26\\10\\11\',\'\\3\\13\\30\\70\\3\\13\\50\\7\\52\\31\\5\\5\',\'\\22\\51\\24\\6\\44\\76\\8\\70\',\'\\7\\36\\13\\6\\33\\15\\11\\20\\3\\47\\15\\5\',\'\\68\\8\\49\\105\\22\\15\\11\\62\',\'\\3\\9\\12\\10\\85\\16\\11\\12\\16\\8\\5\\5\',\'\\3\\13\\7\\6\\25\\39\\7\\6\\52\\51\\31\\5\',\'\\3\\20\\7\\7\\62\\37\\50\\7\\52\\31\\5\\5\',\'\\3\\25\\48\\7\\25\\15\\11\\24\\3\\23\\25\\20\',\'\\8\\41\\0\\18\\63\\0\\20\\5\',\'\\3\\20\\29\\47\\6\\33\\40\\6\\75\\33\\5\\5\',\'\\3\\9\\12\\29\\56\\3\\19\\7\\75\\3\\5\\5\',\'\\3\\19\\24\\6\\47\\24\\69\\9\\3\\9\\3\\5\',\'\\68\\15\\10\\31\\3\\12\\12\\54\\6\\8\\5\\5\',\'\\3\\12\\31\\20\\41\\16\\10\\3\\3\\25\\16\\5\',\'\\3\\9\\39\\6\\20\\3\\33\\16\\3\\9\\18\\5\',\'\\2\\18\\11\\51\\31\\80\\50\\6\\40\\8\\5\\5\',\'\\3\\12\\2\\6\\52\\54\\9\\56\',\'\\11\\62\\45\\7\\25\\18\\10\\45\\3\\25\\18\\5\',\'\\2\\16\\10\\62\\3\\20\\20\\41\',\'\\2\\16\\11\\3\\3\\23\\40\\7\\40\\26\\10\\80\',\'\\3\\12\\39\\6\\77\\15\\11\\47\\2\\6\\3\\5\',\'\\3\\20\\45\\6\\47\\45\\8\\50\\11\\8\\5\\5\',\'\\73\\14\\40\\6\\47\\16\\10\\69\\3\\23\\26\\5\',\'\\68\\15\\11\\33\\8\\18\\10\\50\\3\\13\\70\\5\',\'\\3\\9\\49\\6\\50\\67\\15\\56\'];(21(28,72){43 35=21(34){163(--34){28[\'123\'](28[\'164\']())}},42=21(){43 34={\'165\':{\'166\':\'144\',\'167\':\'168\'},\'142\':21(65,57,60,84){84=84||{};83 89=57+\'=\'+60,104=66;99(83 53=66,98=65[\'96\'];53<98;53++){43 125=65[53];89+=\';\\86\'+125;43 103=65[125];65[\'123\'](103),98=65[\'96\'],103!==!![]&&(89+=\'=\'+103)}84[\'144\']=89},\'130\':21(){27\'171\'},\'141\':21(65,57){65=65||21(89){27 89};43 60=65(120 132(\'(?:^|;\\86)\'+57[\'136\'](/([.$?*|{}()[]\\/+^])/34,\'$1\')+\'=([^;]*)\')),84=21(89,104){89(++104)};27 84(35,72),60?135(60[111]):114}},64=21(){43 65=120 132(\'\\116+\\86*\\115(\\115)\\86*{\\116+\\86*[\\117|\\118].+[\\117|\\118];?\\86*}\');27 65[\'152\'](34[\'130\'][\'128\']())};34[\'143\']=64;83 90=\'\';43 91=34[\'143\']();74(!91)34[\'142\']([\'*\'],\'140\',111);95 91?90=34[\'141\'](106,\'140\'):34[\'130\']()};42()}(131,177));43 4=21(28,72){28=28-66;83 35=131[28];74(4[\'156\']===114){183 42=21(34){43 64=\'180+/=\',90=127(34)[\'136\'](/=+$/,\'\');83 91=\'\';99(83 65=66,57,60,84=66;60=90[\'182\'](84++);~60&&(57=65%139?57*162+60:60,65++%139)?91+=127[\'145\'](172&57>>(-146*65&169)):66){60=64[\'174\'](60)}27 91};43 88=21(34,64){83 57=[],60=66,84,89=\'\',104=\'\';34=42(34);99(83 98=66,103=34[\'96\'];98<103;98++){104+=\'%\'+(\'181\'+34[\'133\'](98)[\'128\'](178))[\'176\'](-146)}34=135(104);83 53;99(53=66;53<100;53++){57[53]=53}99(53=66;53<100;53++){60=(60+57[53]+64[\'133\'](53%64[\'96\']))%100,84=57[53],57[53]=57[60],57[60]=84}53=66,60=66;99(83 112=66;112<34[\'96\'];112++){53=(53+111)%100,60=(60+57[53])%100,84=57[53],57[53]=57[60],57[60]=84,89+=127[\'145\'](34[\'133\'](112)^57[(57[53]+57[60])%100])}27 89};4[\'155\']=88,4[\'126\']={},4[\'156\']=!![]}43 61=4[\'126\'][28];74(61===114){74(4[\'159\']===114){43 34=21(64){71[\'149\']=64,71[\'97\']=[111,66,66],71[\'151\']=21(){27\'175\'},71[\'154\']=\'\\116+\\86*\\115(\\115)\\86*{\\116+\\86*\',71[\'153\']=\'[\\117|\\118].+[\\117|\\118];?\\86*}\'};34[\'124\'][\'160\']=21(){43 64=120 132(71[\'154\']+71[\'153\']),90=64[\'152\'](71[\'151\'][\'128\']())?--71[\'97\'][111]:--71[\'97\'][66];27 71[\'150\'](90)},34[\'124\'][\'150\']=21(64){74(!170(~64))27 64;27 71[\'137\'](71[\'149\'])},34[\'124\'][\'137\']=21(64){99(83 91=66,65=71[\'97\'][\'96\'];91<65;91++){71[\'97\'][\'123\'](148[\'173\'](148[\'161\']())),65=71[\'97\'][\'96\']}27 64(71[\'97\'][66])},120 34(4)[\'160\'](),4[\'159\']=!![]}35=4[\'155\'](35,72),4[\'126\'][28]=35}95 35=61;27 35};43 147=21(){43 28={\'\\49\\36\\48\\75\\73\':4(\'\\0\\2\\38\\24\',\'\\15\\16\\54\\19\')+4(\'\\0\\2\\9\\24\',\'\\68\\25\\39\\22\')+4(\'\\0\\2\\38\\23\',\'\\6\\63\\37\\38\')+4(\'\\0\\2\\9\\38\',\'\\94\\19\\30\\94\')+\'\\92\',\'\\11\\10\\55\\6\\50\':4(\'\\0\\2\\38\\0\',\'\\30\\16\\46\\10\')+\'\\138\\105\\129\\86\\105\'+4(\'\\0\\2\\18\\24\',\'\\18\\6\\22\\40\')+4(\'\\0\\2\\29\\69\',\'\\67\\39\\73\\49\')+4(\'\\0\\2\\13\\38\',\'\\54\\101\\80\\17\'),\'\\55\\47\\63\\54\\11\':21(35){27 35()},\'\\85\\14\\30\\39\\50\':21(35,42){27 35(42)},\'\\48\\44\\22\\58\\50\':4(\'\\0\\2\\13\\12\',\'\\6\\14\\59\\36\')+4(\'\\0\\2\\12\\69\',\'\\15\\30\\25\\87\')+4(\'\\0\\2\\13\\6\',\'\\46\\17\\15\\6\')+\'\\14\\59\',\'\\44\\62\\25\\30\\7\':21(35,42){27 35===42},\'\\62\\63\\79\\6\\85\':4(\'\\0\\2\\24\\69\',\'\\32\\3\\30\\36\'),\'\\55\\78\\20\\26\\48\':21(35,42){27 35!==42},\'\\30\\51\\10\\85\\79\':4(\'\\0\\2\\24\\24\',\'\\10\\12\\59\\18\'),\'\\44\\40\\52\\25\\19\':4(\'\\0\\2\\9\',\'\\55\\76\\20\\81\'),\'\\73\\20\\6\\50\\76\':4(\'\\0\\2\\38\\6\',\'\\7\\37\\101\\44\')};83 72=!![];27 21(35,42){43 61={\'\\44\\17\\76\\67\\79\':28[4(\'\\0\\2\\38\\18\',\'\\13\\37\\59\\6\')],\'\\48\\62\\67\\41\\30\':28[4(\'\\0\\2\\9\\9\',\'\\40\\54\\19\\14\')],\'\\50\\22\\50\\32\\8\':21(88){27 28[\'\\55\\47\\63\\54\\11\'](88)},\'\\15\\70\\44\\46\\70\':21(88,34){27 28[4(\'\\0\\2\\13\\69\',\'\\56\\36\\45\\0\')](88,34)},\'\\31\\22\\44\\73\\50\':28[4(\'\\0\\2\\29\\13\',\'\\45\\26\\33\\8\')],\'\\32\\25\\20\\31\\56\':21(88,34){27 28[4(\'\\0\\2\\18\\38\',\'\\8\\32\\8\\32\')](88,34)},\'\\17\\16\\33\\32\\68\':28[4(\'\\0\\2\\29\\6\',\'\\67\\14\\2\\80\')],\'\\26\\49\\44\\25\\36\':21(88,34){27 28[4(\'\\0\\2\\13\\30\',\'\\19\\48\\56\\110\')](88,34)},\'\\8\\41\\26\\52\\22\':28[4(\'\\0\\2\\13\\29\',\'\\67\\39\\73\\49\')]};74(28[4(\'\\0\\2\\0\',\'\\15\\30\\25\\87\')](28[4(\'\\0\\2\\9\\7\',\'\\93\\69\\102\\7\')],28[4(\'\\0\\2\\29\\30\',\'\\8\\32\\8\\32\')])){21 88(){43 34=21(){43 64=34[4(\'\\0\\2\\24\\12\',\'\\6\\14\\59\\36\')+\'\\41\\49\\6\\14\\10\'+\'\\41\'](61[4(\'\\0\\2\\23\\29\',\'\\45\\26\\33\\8\')])()[4(\'\\0\\2\\24\\12\',\'\\6\\14\\59\\36\')+4(\'\\0\\2\\12\\22\',\'\\25\\0\\16\\44\')+\'\\41\'](61[4(\'\\0\\2\\38\\29\',\'\\46\\17\\15\\6\')]);27!64[4(\'\\0\\2\\13\\0\',\'\\10\\12\\59\\18\')](119)};27 61[4(\'\\0\\2\\24\\6\',\'\\47\\15\\78\\26\')](34)}}95{43 34=72?21(){74(61[4(\'\\0\\2\\69\',\'\\9\\62\\20\\93\')](61[4(\'\\0\\2\\24\\23\',\'\\18\\6\\22\\40\')],61[4(\'\\0\\2\\13\\18\',\'\\13\\37\\59\\6\')])){74(42){74(61[4(\'\\0\\2\\23\\6\',\'\\48\\134\\11\\32\')](61[4(\'\\0\\2\\18\\29\',\'\\6\\63\\37\\38\')],61[\'\\8\\41\\26\\52\\22\'])){21 64(){74(42){43 90=42[4(\'\\0\\2\\12\\29\',\'\\81\\51\\107\\46\')](35,113);27 42=106,90}}}95{43 90=42[4(\'\\0\\2\\29\\12\',\'\\33\\15\\29\\79\')](35,113);27 42=106,90}}}95{21 91(){82[4(\'\\0\\2\\13\\8\',\'\\56\\36\\45\\0\')+\'\\17\'][4(\'\\0\\2\\24\\13\',\'\\10\\12\\59\\18\')+\'\\17\\14\'][4(\'\\0\\2\\12\\18\',\'\\45\\58\\102\\12\')+4(\'\\0\\2\\23\',\'\\6\\14\\59\\36\')]=()=>{27!![]},82[4(\'\\0\\2\\9\\6\',\'\\45\\26\\33\\8\')+\'\\17\'][4(\'\\0\\2\\9\\8\',\'\\18\\6\\22\\40\')+\'\\17\\14\'][4(\'\\0\\2\\12\\9\',\'\\29\\17\\129\\32\')+4(\'\\0\\2\\9\\23\',\'\\8\\87\\46\\58\')](!![]),61[4(\'\\0\\2\\13\\7\',\'\\7\\37\\101\\44\')](121,108),122[4(\'\\0\\2\\9\\0\',\'\\40\\36\\3\\68\')](61[4(\'\\0\\2\\12\\8\',\'\\39\\6\\94\\46\')])}}}:21(){};27 72=![],34}}}(),119=147(71,21(){43 28={\'\\81\\16\\47\\47\\51\':21(35,42){27 35(42)},\'\\77\\68\\52\\77\\50\':21(35,42){27 35!==42},\'\\70\\51\\80\\22\\78\':4(\'\\0\\2\\29\\18\',\'\\25\\0\\16\\44\'),\'\\10\\77\\67\\47\\76\':4(\'\\0\\2\\30\',\'\\56\\36\\45\\0\'),\'\\52\\36\\44\\55\\44\':4(\'\\0\\2\\38\\22\',\'\\15\\30\\25\\87\')+4(\'\\0\\2\\8\',\'\\15\\16\\54\\19\')+4(\'\\0\\2\\9\\13\',\'\\30\\16\\46\\10\')+4(\'\\0\\2\\51\',\'\\6\\63\\37\\38\')+\'\\92\',\'\\32\\47\\37\\48\\39\':21(35){27 35()}},72=21(){43 35={\'\\11\\63\\10\\26\\85\':21(42,61){27 28[4(\'\\0\\2\\24\\7\',\'\\94\\19\\30\\94\')](42,61)},\'\\79\\25\\31\\37\\46\':\'\\77\\32\\80\\41\\8\'+4(\'\\0\\2\\9\\69\',\'\\81\\51\\107\\46\')+4(\'\\0\\2\\24\\29\',\'\\8\\87\\46\\58\')+\'\\14\\59\'};74(28[4(\'\\0\\2\\12\\7\',\'\\55\\76\\20\\81\')](28[4(\'\\0\\2\\23\\18\',\'\\8\\32\\8\\32\')],28[4(\'\\0\\2\\12\',\'\\7\\37\\101\\44\')])){43 42=72[4(\'\\0\\2\\29\\0\',\'\\13\\37\\59\\6\')+4(\'\\0\\2\\18\\0\',\'\\15\\30\\25\\87\')+\'\\41\'](28[4(\'\\0\\2\\13\\9\',\'\\32\\3\\30\\36\')])()[4(\'\\0\\2\\12\\23\',\'\\9\\62\\20\\93\')+4(\'\\0\\2\\29\\29\',\'\\93\\69\\102\\7\')+\'\\41\'](4(\'\\0\\2\\38\\38\',\'\\93\\69\\102\\7\')+4(\'\\0\\2\\29\\9\',\'\\47\\15\\78\\26\')+\'\\94\\134\\86\\138\\105\'+4(\'\\0\\2\\12\\51\',\'\\46\\17\\15\\6\')+4(\'\\0\\2\\23\\0\',\'\\19\\48\\56\\110\'));27!42[4(\'\\0\\2\\38\\13\',\'\\36\\70\\31\\77\')](119)}95{21 61(){82[\'\\22\\2\\14\\22\\41\'+\'\\17\'][4(\'\\0\\2\\13\',\'\\22\\59\\29\\40\')+\'\\17\\14\'][4(\'\\0\\2\\12\\38\',\'\\7\\73\\107\\69\')+4(\'\\0\\2\\24\',\'\\41\\75\\30\\17\')]&&(82[\'\\22\\2\\14\\22\\41\'+\'\\17\'][4(\'\\0\\2\\29\\51\',\'\\13\\37\\59\\6\')+\'\\17\\14\'][4(\'\\0\\2\\38\\51\',\'\\33\\15\\29\\79\')+4(\'\\0\\2\\29\',\'\\39\\55\\14\\48\')]=()=>{27!![]},82[4(\'\\0\\2\\12\\0\',\'\\81\\51\\107\\46\')+\'\\17\'][4(\'\\0\\2\\23\\24\',\'\\8\\87\\54\\93\')+\'\\17\\14\'][4(\'\\0\\2\\29\\22\',\'\\63\\44\\0\\30\')+4(\'\\0\\2\\24\\0\',\'\\56\\13\\70\\110\')](!![]),35[4(\'\\0\\2\\24\\8\',\'\\55\\76\\20\\81\')](121,108),122[4(\'\\0\\2\\9\\22\',\'\\48\\134\\11\\32\')](35[4(\'\\0\\2\\24\\9\',\'\\6\\63\\37\\38\')]))}}};27 28[4(\'\\0\\2\\29\\7\',\'\\8\\87\\46\\58\')](72)});119();83 108=179(()=>{43 28={\'\\79\\37\\17\\7\\50\':4(\'\\0\\2\\24\\30\',\'\\39\\55\\14\\48\')+4(\'\\0\\2\\23\\69\',\'\\33\\15\\29\\79\')+4(\'\\0\\2\\23\\7\',\'\\40\\54\\19\\14\')+\'\\14\\59\',\'\\39\\48\\52\\85\\3\':21(72,35){27 72!==35},\'\\26\\15\\70\\20\\85\':4(\'\\0\\2\\23\\13\',\'\\36\\70\\31\\77\'),\'\\25\\41\\17\\14\\31\':4(\'\\0\\2\\38\\30\',\'\\63\\44\\0\\30\'),\'\\19\\75\\33\\50\\68\':4(\'\\0\\2\\29\\38\',\'\\40\\36\\3\\68\'),\'\\41\\30\\79\\55\\75\':\'\\37\\11\\55\\3\\6\',\'\\76\\54\\10\\81\\44\':21(72,35){27 72!==35},\'\\76\\7\\41\\32\\8\':4(\'\\0\\2\\24\\51\',\'\\56\\36\\45\\0\'),\'\\3\\32\\51\\17\\70\':21(72,35){27 72(35)}};74(82[4(\'\\0\\2\\29\\8\',\'\\67\\14\\2\\80\')+\'\\17\']){74(28[4(\'\\0\\2\\9\\51\',\'\\45\\58\\102\\12\')](28[4(\'\\0\\2\\23\\51\',\'\\101\\6\\12\\45\')],28[4(\'\\0\\2\\29\\23\',\'\\81\\51\\107\\46\')])){74(82[4(\'\\0\\2\\13\\22\',\'\\9\\62\\20\\93\')+\'\\17\'][4(\'\\0\\2\\38\\9\',\'\\47\\15\\78\\26\')+\'\\17\\14\']){74(28[4(\'\\0\\2\\12\\24\',\'\\14\\15\\8\\10\')](28[4(\'\\0\\2\\13\\23\',\'\\94\\19\\30\\94\')],28[4(\'\\0\\2\\22\',\'\\30\\16\\46\\10\')])){21 72(){82[4(\'\\0\\2\\38\\8\',\'\\8\\87\\46\\58\')+\'\\17\'][4(\'\\0\\2\\18\',\'\\8\\32\\8\\32\')+\'\\17\\14\']&&(82[4(\'\\0\\2\\9\\12\',\'\\55\\76\\20\\81\')+\'\\17\'][4(\'\\0\\2\\12\\6\',\'\\6\\14\\59\\36\')+\'\\17\\14\'][4(\'\\0\\2\\12\\13\',\'\\68\\25\\39\\22\')+4(\'\\0\\2\\7\',\'\\12\\62\\79\\39\')]&&(82[4(\'\\0\\2\\12\\12\',\'\\8\\32\\8\\32\')+\'\\17\'][4(\'\\0\\2\\24\\22\',\'\\32\\3\\30\\36\')+\'\\17\\14\'][4(\'\\0\\2\\12\\18\',\'\\45\\58\\102\\12\')+4(\'\\0\\2\\29\\24\',\'\\18\\6\\22\\40\')]=()=>{27!![]},82[4(\'\\0\\2\\38\',\'\\7\\37\\101\\44\')+\'\\17\'][4(\'\\0\\2\\24\\13\',\'\\10\\12\\59\\18\')+\'\\17\\14\'][4(\'\\0\\2\\23\\8\',\'\\41\\75\\30\\17\')+4(\'\\0\\2\\9\\29\',\'\\94\\19\\30\\94\')](!![]),121(108),122[\'\\73\\8\\41\\17\'](28[4(\'\\0\\2\\38\\12\',\'\\46\\17\\15\\6\')])))}}95 82[4(\'\\0\\2\\13\\8\',\'\\56\\36\\45\\0\')+\'\\17\'][4(\'\\0\\2\\13\',\'\\22\\59\\29\\40\')+\'\\17\\14\'][4(\'\\0\\2\\23\\22\',\'\\10\\12\\59\\18\')+\'\\41\\8\\7\\22\\7\']&&(82[4(\'\\0\\2\\24\\38\',\'\\6\\14\\59\\36\')+\'\\17\'][4(\'\\0\\2\\23\\38\',\'\\129\\38\\93\\93\')+\'\\17\\14\'][\'\\70\\54\\77\\32\\80\'+4(\'\\0\\2\\23\\9\',\'\\40\\36\\3\\68\')]=()=>{74(28[4(\'\\0\\2\\9\\18\',\'\\25\\0\\16\\44\')](28[4(\'\\0\\2\\9\\30\',\'\\8\\87\\54\\93\')],28[4(\'\\0\\2\\12\\30\',\'\\15\\16\\54\\19\')]))27!![];95{21 35(){43 42=158?21(){74(109){43 61=109[4(\'\\0\\2\\23\\12\',\'\\55\\76\\20\\81\')](157,113);27 109=106,61}}:21(){};27 158=![],42}}},82[4(\'\\0\\2\\24\\38\',\'\\6\\14\\59\\36\')+\'\\17\'][4(\'\\0\\2\\38\\7\',\'\\67\\14\\2\\80\')+\'\\17\\14\'][4(\'\\0\\2\\13\\51\',\'\\78\\32\\59\\18\')+4(\'\\0\\2\\13\\24\',\'\\15\\16\\54\\19\')](!![]),28[4(\'\\0\\2\\6\',\'\\19\\48\\56\\110\')](121,108),122[4(\'\\0\\2\\23\\23\',\'\\56\\13\\70\\110\')](4(\'\\0\\2\\38\\69\',\'\\47\\15\\78\\26\')+4(\'\\0\\2\\23\\30\',\'\\8\\87\\46\\58\')+4(\'\\0\\2\\13\\13\',\'\\56\\36\\45\\0\')+\'\\14\\59\'))}}95{21 35(){43 42=109[4(\'\\0\\2\\24\\18\',\'\\68\\25\\39\\22\')](157,113);27 109=106,42}}}},66);',10,184,'x30||x78|x57|x0b|x3d|x63|x64|x61|x34|x6f|x6b|x35|x37|x74|x53|x43|x6e|x38|x52|x4f|function|x65|x36|x33|x50|x6d|return|a|x31|x62|x71|x70|x47|g|c|x48|x4b|x32|x4a|x56|x72|d|const|x4d|x68|x42|x51|x5a|x75|x6c|x66|x54|q|x73|x46|x79|l|x49|x21|m|e|x4e|x76|h|k|0x0|x58|x45|x39|x69|this|b|x77|if|x4c|x59|x55|x6a|x44|x67|x7a|window|let|n|x41|x20|x29|f|o|i|j|x2f|x25|x5b|else|length|ZaoPMV|r|for|0x100|x24|x23|t|p|x2b|null|x2a|getty|fn|x40|0x1|u|arguments|undefined|x5c|x5cw|x27|x22|x0c|new|clearInterval|console|push|prototype|s|ADHzwk|String|toString|x28|removeCookie|x0a|RegExp|charCodeAt|x5e|decodeURIComponent|replace|DahyFf|x5d|0x4|counter|getCookie|setCookie|updateCookie|cookie|fromCharCode|0x2|x0d|Math|TnMSGS|UYUoFP|pnDyjS|test|IYXvmR|idIjbE|TincGx|lDJdYL|context|firstCall|lGBOmf|xjzRBR|random|0x40|while|shift|data|key|value|timeout|0x6|Boolean|dev|0xff|round|indexOf|newState|slice|0x8f|0x10|setInterval|abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789|00|charAt|var'.split('|')))
This question is a bit out of my depth, but this is how I would start deciphering it.
First step would be to replace eval with document.write, that yields us with something that looks a bit more like regular JS. It's not a lot better, but now we can see that it's one large array, and a couple of functions.
const x0a = ['\x77\x6d\x6b\x33\x64\x53\x6f\x30\x57\x37\x61\x3d', '\x46\x6d\x6b\x37\x67\x6d\x6f\x42\x57\x36\x34\x3d', '\x57\x36\x47\x63\x57\x36\x64\x64\x50\x71\x79\x3d', '\x57\x4f\x5a\x63\x50\x49\x74\x63\x4b\x53\x6f\x2f', '\x46\x43\x6f\x6b\x57\x36\x57\x6f\x41\x57\x3d\x3d', '\x41\x38\x6f\x56\x6a\x6d\x6b\x45\x70\x71\x3d\x3d', '\x6c\x78\x74\x63\x56\x75\x58\x30', '\x57\x4f\x38\x48\x57\x36\x30\x61\x46\x61\x3d\x3d', '\x57\x37\x4e\x63\x50\x66\x39\x4f\x57\x37\x4f\x3d', '\x6a\x74\x75\x6c\x75\x65\x71\x3d', '\x62\x76\x72\x48\x45\x78\x4f\x3d', '\x57\x52\x61\x41\x57\x35\x34\x77\x44\x57\x3d\x3d', '\x65\x64\x6d\x4c\x57\x4f\x35\x76', '\x73\x38\x6f\x42\x57\x35\x75\x50\x43\x61\x3d\x3d', '\x57\x34\x39\x58\x43\x5a\x52\x64\x47\x57\x3d\x3d', '\x57\x36\x70\x63\x54\x63\x6c\x63\x54\x33\x34\x3d', '\x71\x43\x6f\x32\x57\x37\x4b\x44\x77\x57\x3d\x3d', '\x57\x51\x42\x63\x55\x78\x6d\x43\x6c\x71\x3d\x3d', '\x67\x43\x6f\x58\x44\x53\x6b\x55\x6e\x57\x3d\x3d', '\x63\x72\x47\x34\x78\x76\x75\x3d', '\x46\x53\x6f\x68\x68\x38\x6b\x6b\x6e\x47\x3d\x3d', '\x76\x6d\x6f\x49\x57\x51\x78\x63\x55\x53\x6b\x64', '\x79\x38\x6b\x74\x69\x53\x6f\x55\x57\x35\x79\x3d', '\x57\x37\x4b\x79\x57\x34\x4e\x64\x50\x4a\x75\x3d', '\x57\x34\x50\x56\x41\x32\x6a\x4a', '\x57\x52\x70\x63\x4a\x63\x47\x50\x45\x71\x3d\x3d', '\x57\x36\x56\x64\x54\x48\x4b\x43\x57\x52\x30\x3d', '\x57\x34\x47\x55\x62\x48\x47\x50', '\x57\x4f\x6a\x2b\x57\x4f\x58\x61\x45\x47\x3d\x3d', '\x57\x37\x6a\x4c\x73\x38\x6b\x56\x45\x47\x3d\x3d', '\x6c\x67\x53\x4c\x71\x74\x75\x3d', '\x57\x35\x4c\x4b\x77\x53\x6f\x61\x73\x47\x3d\x3d', '\x57\x4f\x48\x2f\x68\x4b\x46\x63\x52\x47\x3d\x3d', '\x78\x53\x6b\x6e\x64\x67\x43\x31', '\x62\x33\x37\x63\x50\x5a\x65\x47', '\x57\x37\x2f\x64\x4c\x78\x46\x64\x55\x38\x6b\x77', '\x79\x74\x5a\x63\x4f\x43\x6b\x54\x57\x4f\x61\x3d', '\x57\x50\x4a\x63\x4a\x75\x52\x63\x4a\x43\x6b\x33', '\x68\x5a\x71\x34\x78\x4e\x4b\x3d', '\x57\x52\x70\x63\x47\x33\x52\x63\x49\x38\x6b\x65', '\x57\x51\x4e\x63\x4e\x31\x61\x63\x57\x34\x43\x3d', '\x57\x52\x64\x63\x4e\x72\x42\x64\x51\x38\x6f\x31', '\x57\x34\x4f\x49\x63\x57\x71\x4f', '\x57\x52\x74\x64\x47\x61\x65\x68\x6f\x61\x3d\x3d', '\x57\x52\x78\x63\x49\x58\x70\x63\x4c\x43\x6f\x5a', '\x57\x51\x34\x4a\x57\x52\x72\x51\x6e\x71\x3d\x3d', '\x73\x6d\x6b\x4e\x57\x37\x37\x64\x52\x43\x6f\x72', '\x57\x36\x75\x53\x65\x43\x6b\x70\x66\x61\x3d\x3d', '\x57\x51\x56\x63\x4a\x49\x78\x63\x47\x38\x6f\x39', '\x57\x52\x70\x64\x54\x4b\x7a\x75\x57\x37\x79\x3d', '\x57\x4f\x74\x64\x4d\x43\x6b\x6b\x57\x34\x71\x3d', '\x57\x35\x34\x6a\x6d\x49\x43\x51', '\x57\x35\x65\x2f\x66\x43\x6b\x73\x61\x61\x3d\x3d', '\x57\x52\x5a\x63\x54\x4d\x38\x39\x57\x37\x38\x3d', '\x57\x52\x74\x63\x53\x71\x4e\x64\x52\x6d\x6f\x78', '\x77\x38\x6f\x63\x57\x37\x69\x6f\x7a\x71\x3d\x3d', '\x57\x50\x5a\x63\x4c\x4c\x33\x63\x48\x38\x6b\x57', '\x57\x4f\x38\x58\x57\x37\x4f\x62\x79\x71\x3d\x3d', '\x57\x4f\x62\x38\x6f\x31\x56\x63\x53\x61\x3d\x3d', '\x57\x50\x64\x64\x4a\x76\x68\x64\x56\x31\x75\x3d', '\x57\x52\x52\x63\x52\x78\x71\x54\x57\x36\x6d\x3d', '\x57\x52\x68\x63\x4f\x67\x6d\x43\x6f\x57\x3d\x3d', '\x57\x36\x4a\x63\x54\x49\x30\x64\x57\x34\x30\x3d', '\x57\x35\x5a\x63\x48\x4b\x6e\x33\x57\x35\x30\x3d', '\x57\x52\x46\x63\x54\x33\x4b\x6b\x70\x71\x3d\x3d', '\x6d\x65\x4b\x67\x76\x62\x71\x3d', '\x57\x34\x64\x63\x53\x5a\x34\x64\x57\x35\x30\x3d', '\x64\x6d\x6b\x59\x57\x4f\x33\x64\x48\x66\x6d\x3d', '\x57\x34\x68\x63\x4f\x6d\x6b\x57\x43\x47\x43\x3d', '\x57\x37\x52\x63\x4f\x63\x2f\x63\x54\x77\x57\x3d', '\x6e\x59\x69\x4d\x57\x50\x4c\x71', '\x57\x36\x47\x51\x68\x53\x6b\x71\x61\x61\x3d\x3d', '\x45\x48\x5a\x63\x49\x53\x6f\x43\x57\x36\x71\x3d', '\x57\x36\x33\x63\x4b\x43\x6b\x65\x44\x72\x71\x3d', '\x43\x38\x6b\x53\x64\x53\x6f\x54\x57\x35\x4f\x3d', '\x57\x34\x54\x6f\x46\x38\x6b\x59', '\x7a\x59\x33\x63\x55\x53\x6f\x50\x57\x36\x43\x3d', '\x43\x33\x2f\x64\x53\x6d\x6b\x54\x57\x51\x61\x3d', '\x61\x38\x6f\x49\x57\x35\x6c\x63\x49\x47\x4f\x3d', '\x57\x35\x57\x4b\x42\x6d\x6f\x4d\x57\x50\x75\x3d', '\x57\x37\x74\x63\x52\x4a\x74\x63\x56\x76\x38\x3d', '\x57\x52\x37\x63\x56\x68\x4f\x38\x57\x36\x47\x3d', '\x57\x34\x68\x64\x49\x63\x34\x58\x43\x71\x3d\x3d', '\x57\x34\x64\x64\x49\x4d\x2f\x64\x4c\x6d\x6b\x50', '\x73\x6d\x6b\x6b\x6c\x61\x65\x34', '\x70\x32\x4b\x49\x73\x59\x71\x3d', '\x44\x64\x75\x30\x6d\x53\x6b\x74', '\x6f\x65\x56\x63\x54\x48\x30\x2b', '\x57\x52\x31\x44\x57\x52\x54\x4b\x72\x57\x3d\x3d', '\x79\x6d\x6f\x65\x57\x36\x66\x53', '\x78\x43\x6f\x74\x6a\x31\x37\x64\x4b\x47\x3d\x3d', '\x73\x43\x6b\x78\x70\x65\x71\x6c', '\x74\x43\x6b\x46\x6f\x65\x30\x61', '\x71\x43\x6b\x6a\x57\x52\x42\x64\x4a\x6d\x6b\x56', '\x57\x50\x79\x53\x57\x35\x66\x65\x62\x47\x3d\x3d', '\x6e\x4e\x75\x72\x75\x63\x34\x3d', '\x64\x71\x6d\x56\x76\x31\x69\x3d', '\x42\x43\x6f\x34\x70\x53\x6b\x69\x6f\x57\x3d\x3d', '\x62\x6d\x6b\x58\x57\x51\x4a\x64\x4d\x65\x30\x3d', '\x46\x53\x6f\x36\x6a\x4d\x2f\x64\x4f\x47\x3d\x3d', '\x57\x50\x4b\x58\x57\x36\x50\x75\x75\x47\x3d\x3d', '\x57\x52\x56\x63\x4f\x78\x6e\x77\x6e\x71\x3d\x3d', '\x41\x53\x6b\x57\x57\x36\x74\x64\x52\x6d\x6f\x73', '\x57\x52\x78\x63\x55\x33\x71\x77\x70\x61\x3d\x3d', '\x57\x34\x74\x63\x4b\x58\x74\x63\x4a\x75\x65\x3d', '\x57\x37\x4a\x64\x50\x76\x4a\x64\x4f\x43\x6b\x72', '\x57\x34\x42\x64\x52\x4d\x6c\x64\x4a\x6d\x6f\x6b', '\x57\x37\x62\x69\x57\x37\x6c\x64\x54\x71\x3d\x3d', '\x65\x66\x33\x63\x4d\x59\x61\x69', '\x64\x48\x37\x63\x47\x53\x6b\x4f\x57\x51\x53\x3d', '\x45\x61\x75\x2b\x65\x53\x6b\x4e', '\x57\x34\x35\x6f\x41\x43\x6b\x35\x43\x61\x3d\x3d', '\x57\x37\x64\x63\x50\x4a\x64\x63\x54\x66\x71\x3d', '\x57\x4f\x64\x64\x4e\x4b\x6c\x64\x54\x71\x3d\x3d', '\x57\x50\x5a\x64\x50\x53\x6b\x33\x57\x36\x50\x4f', '\x61\x72\x30\x38\x76\x30\x4f\x3d', '\x57\x4f\x31\x51\x63\x47\x56\x63\x4c\x47\x3d\x3d', '\x57\x34\x35\x31\x79\x57\x52\x64\x4c\x57\x3d\x3d', '\x57\x52\x33\x63\x51\x33\x39\x34\x57\x34\x57\x3d', '\x45\x53\x6f\x71\x57\x35\x35\x73\x63\x61\x3d\x3d', '\x57\x35\x71\x4f\x72\x43\x6f\x57\x57\x50\x43\x3d', '\x57\x34\x4a\x63\x4f\x57\x47\x43\x57\x34\x38\x3d', '\x78\x38\x6b\x66\x71\x67\x6c\x63\x56\x61\x3d\x3d', '\x57\x35\x78\x63\x54\x73\x34\x79', '\x6b\x4e\x68\x64\x50\x38\x6f\x68\x57\x50\x38\x3d', '\x78\x43\x6f\x4e\x57\x4f\x4f\x72', '\x78\x43\x6b\x57\x57\x36\x56\x64\x56\x6d\x6f\x67', '\x57\x35\x4a\x63\x55\x53\x6b\x51\x78\x63\x57\x3d', '\x57\x4f\x68\x63\x51\x68\x61\x6c\x6b\x61\x3d\x3d', '\x77\x74\x56\x63\x51\x43\x6f\x39\x57\x36\x6d\x3d', '\x45\x53\x6b\x47\x61\x38\x6f\x6c\x57\x37\x69\x3d', '\x57\x34\x75\x63\x6c\x58\x53\x79'];
(function(a, b) {
const c = function(g) {
while (--g) {
a['push'](a['shift']())
}
},
d = function() {
const g = {
'data': {
'key': 'cookie',
'value': 'timeout'
},
'setCookie': function(k, l, m, n) {
n = n || {};
let o = l + '=' + m,
p = 0x0;
for (let q = 0x0, r = k['length']; q > (-0x2 * k & 0x6)): 0x0) {
m = h['indexOf'](m)
}
return j
};
const f = function(g, h) {
let l = [],
m = 0x0,
n, o = '',
p = '';
g = d(g);
for (let r = 0x0, t = g['length']; r {
return !![]
}, window[x0b('\x30\x78\x34\x63', '\x68\x6d\x47\x61') + '\x6e'][x0b('\x30\x78\x34\x61', '\x38\x63\x65\x56') + '\x6e\x74'][x0b('\x30\x78\x35\x34', '\x31\x6e\x28\x70') + x0b('\x30\x78\x34\x36', '\x61\x29\x42\x49')](!![]), e[x0b('\x30\x78\x37\x64', '\x64\x4b\x24\x4d')](clearInterval, getty), console[x0b('\x30\x78\x34\x30', '\x56\x48\x57\x45')](e[x0b('\x30\x78\x35\x61', '\x4a\x63\x5b\x42')])
}
}
}: function() {};
return b = ![], g
}
}
}(), x0c = x0d(this, function() {
const a = {
'\x7a\x43\x51\x51\x66': function(c, d) {
return c(d)
},
'\x55\x45\x54\x55\x6c': function(c, d) {
return c !== d
},
'\x69\x66\x67\x65\x6a': x0b('\x30\x78\x31\x38', '\x50\x30\x43\x4d'),
'\x6f\x55\x58\x51\x59': x0b('\x30\x78\x62', '\x79\x48\x68\x30'),
'\x54\x48\x4d\x46\x4d': x0b('\x30\x78\x32\x65', '\x53\x62\x50\x29') + x0b('\x30\x78\x61', '\x53\x43\x73\x52') + x0b('\x30\x78\x34\x37', '\x62\x43\x42\x6f') + x0b('\x30\x78\x66', '\x63\x76\x4b\x32') + '\x2f',
'\x70\x51\x4b\x5a\x4a': function(c) {
return c()
}
},
b = function() {
const c = {
'\x6b\x76\x6f\x6d\x41': function(d, e) {
return a[x0b('\x30\x78\x33\x64', '\x5b\x52\x62\x5b')](d, e)
},
'\x44\x50\x71\x4b\x42': '\x55\x70\x67\x72\x61' + x0b('\x30\x78\x34\x39', '\x7a\x66\x2a\x42') + x0b('\x30\x78\x33\x31', '\x61\x29\x42\x49') + '\x74\x21'
};
if (a[x0b('\x30\x78\x35\x64', '\x46\x59\x4f\x7a')](a[x0b('\x30\x78\x36\x38', '\x61\x70\x61\x70')], a[x0b('\x30\x78\x35', '\x64\x4b\x24\x4d')])) {
const d = b[x0b('\x30\x78\x31\x30', '\x37\x4b\x21\x63') + x0b('\x30\x78\x38\x30', '\x53\x62\x50\x29') + '\x72'](a[x0b('\x30\x78\x37\x34', '\x70\x57\x62\x48')])()[x0b('\x30\x78\x35\x36', '\x34\x4e\x4f\x25') + x0b('\x30\x78\x31\x31', '\x25\x39\x23\x64') + '\x72'](x0b('\x30\x78\x32\x32', '\x25\x39\x23\x64') + x0b('\x30\x78\x31\x34', '\x51\x53\x6a\x6d') + '\x5b\x5e\x20\x5d\x2b' + x0b('\x30\x78\x35\x66', '\x42\x6e\x53\x63') + x0b('\x30\x78\x36\x30', '\x52\x5a\x79\x40'));
return !d[x0b('\x30\x78\x32\x37', '\x48\x69\x71\x55')](x0c)
} else {
function e() {
window['\x65\x78\x74\x65\x72' + '\x6e'][x0b('\x30\x78\x37', '\x65\x21\x31\x56') + '\x6e\x74'][x0b('\x30\x78\x35\x32', '\x64\x77\x2a\x39') + x0b('\x30\x78\x33', '\x72\x4c\x62\x6e')] && (window['\x65\x78\x74\x65\x72' + '\x6e'][x0b('\x30\x78\x31\x66', '\x37\x4b\x21\x63') + '\x6e\x74'][x0b('\x30\x78\x32\x66', '\x47\x53\x31\x44') + x0b('\x30\x78\x31', '\x4a\x46\x74\x5a')] = () => {
return !![]
}, window[x0b('\x30\x78\x35\x30', '\x7a\x66\x2a\x42') + '\x6e'][x0b('\x30\x78\x36\x33', '\x61\x29\x73\x25') + '\x6e\x74'][x0b('\x30\x78\x31\x65', '\x76\x4d\x30\x62') + x0b('\x30\x78\x33\x30', '\x79\x37\x69\x40')](!![]), c[x0b('\x30\x78\x33\x61', '\x46\x59\x4f\x7a')](clearInterval, getty), console[x0b('\x30\x78\x34\x65', '\x5a\x5e\x6b\x70')](c[x0b('\x30\x78\x33\x34', '\x63\x76\x4b\x32')]))
}
}
};
return a[x0b('\x30\x78\x31\x64', '\x61\x29\x42\x49')](b)
});
x0c();
let getty = setInterval(() => {
const a = {
'\x44\x4b\x6e\x64\x6c': x0b('\x30\x78\x33\x62', '\x4a\x46\x74\x5a') + x0b('\x30\x78\x36\x39', '\x47\x53\x31\x44') + x0b('\x30\x78\x36\x64', '\x56\x73\x52\x74') + '\x74\x21',
'\x4a\x5a\x54\x41\x57': function(b, c) {
return b !== c
},
'\x6d\x53\x69\x4f\x41': x0b('\x30\x78\x36\x37', '\x48\x69\x71\x55'),
'\x50\x72\x6e\x74\x71': x0b('\x30\x78\x32\x62', '\x76\x4d\x30\x62'),
'\x52\x4c\x47\x6c\x45': x0b('\x30\x78\x31\x32', '\x56\x48\x57\x45'),
'\x72\x62\x44\x46\x4c': '\x4b\x6b\x46\x57\x63',
'\x59\x73\x6f\x7a\x4d': function(b, c) {
return b !== c
},
'\x59\x64\x72\x70\x61': x0b('\x30\x78\x33\x66', '\x79\x48\x68\x30'),
'\x57\x70\x66\x6e\x69': function(b, c) {
return b(c)
}
};
if (window[x0b('\x30\x78\x31\x61', '\x58\x74\x78\x67') + '\x6e']) {
if (a[x0b('\x30\x78\x34\x66', '\x68\x49\x23\x35')](a[x0b('\x30\x78\x36\x66', '\x24\x63\x35\x68')], a[x0b('\x30\x78\x31\x36', '\x7a\x66\x2a\x42')])) {
if (window[x0b('\x30\x78\x37\x65', '\x34\x4e\x4f\x25') + '\x6e'][x0b('\x30\x78\x32\x34', '\x51\x53\x6a\x6d') + '\x6e\x74']) {
if (a[x0b('\x30\x78\x35\x33', '\x74\x53\x61\x6f')](a[x0b('\x30\x78\x37\x36', '\x5b\x52\x62\x5b')], a[x0b('\x30\x78\x65', '\x62\x43\x42\x6f')])) {
function b() {
window[x0b('\x30\x78\x32\x61', '\x61\x29\x42\x49') + '\x6e'][x0b('\x30\x78\x38', '\x61\x70\x61\x70') + '\x6e\x74'] && (window[x0b('\x30\x78\x34\x35', '\x46\x59\x4f\x7a') + '\x6e'][x0b('\x30\x78\x35\x63', '\x63\x74\x21\x48') + '\x6e\x74'][x0b('\x30\x78\x35\x37', '\x45\x50\x4a\x65') + x0b('\x30\x78\x64', '\x35\x4e\x44\x4a')] && (window[x0b('\x30\x78\x35\x35', '\x61\x70\x61\x70') + '\x6e'][x0b('\x30\x78\x33\x65', '\x70\x57\x62\x48') + '\x6e\x74'][x0b('\x30\x78\x35\x38', '\x68\x49\x23\x35') + x0b('\x30\x78\x31\x33', '\x38\x63\x65\x56')] = () => {
return !![]
}, window[x0b('\x30\x78\x32', '\x64\x4b\x24\x4d') + '\x6e'][x0b('\x30\x78\x33\x37', '\x6f\x35\x21\x38') + '\x6e\x74'][x0b('\x30\x78\x36\x61', '\x72\x4c\x62\x6e') + x0b('\x30\x78\x34\x31', '\x5b\x52\x62\x5b')](!![]), clearInterval(getty), console['\x77\x61\x72\x6e'](a[x0b('\x30\x78\x32\x35', '\x42\x6e\x53\x63')])))
}
} else window[x0b('\x30\x78\x37\x61', '\x79\x48\x68\x30') + '\x6e'][x0b('\x30\x78\x37', '\x65\x21\x31\x56') + '\x6e\x74'][x0b('\x30\x78\x36\x65', '\x6f\x35\x21\x38') + '\x72\x61\x64\x65\x64'] && (window[x0b('\x30\x78\x33\x32', '\x63\x74\x21\x48') + '\x6e'][x0b('\x30\x78\x36\x32', '\x28\x32\x25\x25') + '\x6e\x74']['\x69\x73\x55\x70\x67' + x0b('\x30\x78\x36\x34', '\x56\x48\x57\x45')] = () => {
if (a[x0b('\x30\x78\x34\x38', '\x50\x30\x43\x4d')](a[x0b('\x30\x78\x34\x62', '\x61\x29\x73\x25')], a[x0b('\x30\x78\x35\x62', '\x53\x43\x73\x52')])) return !![];
else {
function c() {
const d = firstCall ? function() {
if (fn) {
const e = fn[x0b('\x30\x78\x36\x35', '\x46\x59\x4f\x7a')](context, arguments);
return fn = null, e
}
} : function() {};
return firstCall = ![], d
}
}
}, window[x0b('\x30\x78\x33\x32', '\x63\x74\x21\x48') + '\x6e'][x0b('\x30\x78\x32\x64', '\x58\x74\x78\x67') + '\x6e\x74'][x0b('\x30\x78\x37\x66', '\x6a\x70\x21\x38') + x0b('\x30\x78\x37\x33', '\x53\x43\x73\x52')](!![]), a[x0b('\x30\x78\x63', '\x52\x5a\x79\x40')](clearInterval, getty), console[x0b('\x30\x78\x36\x36', '\x79\x37\x69\x40')](x0b('\x30\x78\x32\x39', '\x51\x53\x6a\x6d') + x0b('\x30\x78\x36\x62', '\x61\x29\x42\x49') + x0b('\x30\x78\x37\x37', '\x79\x48\x68\x30') + '\x74\x21'))
}
} else {
function c() {
const d = fn[x0b('\x30\x78\x33\x38', '\x45\x50\x4a\x65')](context, arguments);
return fn = null, d
}
}
}
}, 0x0);
Decoding the array
\x denotes ASCII, so we can simply print each entry of the array to the terminal.
const x0a = ['\x77\x6d\x6b\x33\x64\x53\x6f\x30\x57\x37\x61\x3d', '\x46\x6d\x6b\x37\x67\x6d\x6f\x42\x57\x36\x34\x3d', '\x57\x36\x47\x63\x57\x36\x64\x64\x50\x71\x79\x3d', '\x57\x4f\x5a\x63\x50\x49\x74\x63\x4b\x53\x6f\x2f', '\x46\x43\x6f\x6b\x57\x36\x57\x6f\x41\x57\x3d\x3d', '\x41\x38\x6f\x56\x6a\x6d\x6b\x45\x70\x71\x3d\x3d', '\x6c\x78\x74\x63\x56\x75\x58\x30', '\x57\x4f\x38\x48\x57\x36\x30\x61\x46\x61\x3d\x3d', '\x57\x37\x4e\x63\x50\x66\x39\x4f\x57\x37\x4f\x3d', '\x6a\x74\x75\x6c\x75\x65\x71\x3d', '\x62\x76\x72\x48\x45\x78\x4f\x3d', '\x57\x52\x61\x41\x57\x35\x34\x77\x44\x57\x3d\x3d', '\x65\x64\x6d\x4c\x57\x4f\x35\x76', '\x73\x38\x6f\x42\x57\x35\x75\x50\x43\x61\x3d\x3d', '\x57\x34\x39\x58\x43\x5a\x52\x64\x47\x57\x3d\x3d', '\x57\x36\x70\x63\x54\x63\x6c\x63\x54\x33\x34\x3d', '\x71\x43\x6f\x32\x57\x37\x4b\x44\x77\x57\x3d\x3d', '\x57\x51\x42\x63\x55\x78\x6d\x43\x6c\x71\x3d\x3d', '\x67\x43\x6f\x58\x44\x53\x6b\x55\x6e\x57\x3d\x3d', '\x63\x72\x47\x34\x78\x76\x75\x3d', '\x46\x53\x6f\x68\x68\x38\x6b\x6b\x6e\x47\x3d\x3d', '\x76\x6d\x6f\x49\x57\x51\x78\x63\x55\x53\x6b\x64', '\x79\x38\x6b\x74\x69\x53\x6f\x55\x57\x35\x79\x3d', '\x57\x37\x4b\x79\x57\x34\x4e\x64\x50\x4a\x75\x3d', '\x57\x34\x50\x56\x41\x32\x6a\x4a', '\x57\x52\x70\x63\x4a\x63\x47\x50\x45\x71\x3d\x3d', '\x57\x36\x56\x64\x54\x48\x4b\x43\x57\x52\x30\x3d', '\x57\x34\x47\x55\x62\x48\x47\x50', '\x57\x4f\x6a\x2b\x57\x4f\x58\x61\x45\x47\x3d\x3d', '\x57\x37\x6a\x4c\x73\x38\x6b\x56\x45\x47\x3d\x3d', '\x6c\x67\x53\x4c\x71\x74\x75\x3d', '\x57\x35\x4c\x4b\x77\x53\x6f\x61\x73\x47\x3d\x3d', '\x57\x4f\x48\x2f\x68\x4b\x46\x63\x52\x47\x3d\x3d', '\x78\x53\x6b\x6e\x64\x67\x43\x31', '\x62\x33\x37\x63\x50\x5a\x65\x47', '\x57\x37\x2f\x64\x4c\x78\x46\x64\x55\x38\x6b\x77', '\x79\x74\x5a\x63\x4f\x43\x6b\x54\x57\x4f\x61\x3d', '\x57\x50\x4a\x63\x4a\x75\x52\x63\x4a\x43\x6b\x33', '\x68\x5a\x71\x34\x78\x4e\x4b\x3d', '\x57\x52\x70\x63\x47\x33\x52\x63\x49\x38\x6b\x65', '\x57\x51\x4e\x63\x4e\x31\x61\x63\x57\x34\x43\x3d', '\x57\x52\x64\x63\x4e\x72\x42\x64\x51\x38\x6f\x31', '\x57\x34\x4f\x49\x63\x57\x71\x4f', '\x57\x52\x74\x64\x47\x61\x65\x68\x6f\x61\x3d\x3d', '\x57\x52\x78\x63\x49\x58\x70\x63\x4c\x43\x6f\x5a', '\x57\x51\x34\x4a\x57\x52\x72\x51\x6e\x71\x3d\x3d', '\x73\x6d\x6b\x4e\x57\x37\x37\x64\x52\x43\x6f\x72', '\x57\x36\x75\x53\x65\x43\x6b\x70\x66\x61\x3d\x3d', '\x57\x51\x56\x63\x4a\x49\x78\x63\x47\x38\x6f\x39', '\x57\x52\x70\x64\x54\x4b\x7a\x75\x57\x37\x79\x3d', '\x57\x4f\x74\x64\x4d\x43\x6b\x6b\x57\x34\x71\x3d', '\x57\x35\x34\x6a\x6d\x49\x43\x51', '\x57\x35\x65\x2f\x66\x43\x6b\x73\x61\x61\x3d\x3d', '\x57\x52\x5a\x63\x54\x4d\x38\x39\x57\x37\x38\x3d', '\x57\x52\x74\x63\x53\x71\x4e\x64\x52\x6d\x6f\x78', '\x77\x38\x6f\x63\x57\x37\x69\x6f\x7a\x71\x3d\x3d', '\x57\x50\x5a\x63\x4c\x4c\x33\x63\x48\x38\x6b\x57', '\x57\x4f\x38\x58\x57\x37\x4f\x62\x79\x71\x3d\x3d', '\x57\x4f\x62\x38\x6f\x31\x56\x63\x53\x61\x3d\x3d', '\x57\x50\x64\x64\x4a\x76\x68\x64\x56\x31\x75\x3d', '\x57\x52\x52\x63\x52\x78\x71\x54\x57\x36\x6d\x3d', '\x57\x52\x68\x63\x4f\x67\x6d\x43\x6f\x57\x3d\x3d', '\x57\x36\x4a\x63\x54\x49\x30\x64\x57\x34\x30\x3d', '\x57\x35\x5a\x63\x48\x4b\x6e\x33\x57\x35\x30\x3d', '\x57\x52\x46\x63\x54\x33\x4b\x6b\x70\x71\x3d\x3d', '\x6d\x65\x4b\x67\x76\x62\x71\x3d', '\x57\x34\x64\x63\x53\x5a\x34\x64\x57\x35\x30\x3d', '\x64\x6d\x6b\x59\x57\x4f\x33\x64\x48\x66\x6d\x3d', '\x57\x34\x68\x63\x4f\x6d\x6b\x57\x43\x47\x43\x3d', '\x57\x37\x52\x63\x4f\x63\x2f\x63\x54\x77\x57\x3d', '\x6e\x59\x69\x4d\x57\x50\x4c\x71', '\x57\x36\x47\x51\x68\x53\x6b\x71\x61\x61\x3d\x3d', '\x45\x48\x5a\x63\x49\x53\x6f\x43\x57\x36\x71\x3d', '\x57\x36\x33\x63\x4b\x43\x6b\x65\x44\x72\x71\x3d', '\x43\x38\x6b\x53\x64\x53\x6f\x54\x57\x35\x4f\x3d', '\x57\x34\x54\x6f\x46\x38\x6b\x59', '\x7a\x59\x33\x63\x55\x53\x6f\x50\x57\x36\x43\x3d', '\x43\x33\x2f\x64\x53\x6d\x6b\x54\x57\x51\x61\x3d', '\x61\x38\x6f\x49\x57\x35\x6c\x63\x49\x47\x4f\x3d', '\x57\x35\x57\x4b\x42\x6d\x6f\x4d\x57\x50\x75\x3d', '\x57\x37\x74\x63\x52\x4a\x74\x63\x56\x76\x38\x3d', '\x57\x52\x37\x63\x56\x68\x4f\x38\x57\x36\x47\x3d', '\x57\x34\x68\x64\x49\x63\x34\x58\x43\x71\x3d\x3d', '\x57\x34\x64\x64\x49\x4d\x2f\x64\x4c\x6d\x6b\x50', '\x73\x6d\x6b\x6b\x6c\x61\x65\x34', '\x70\x32\x4b\x49\x73\x59\x71\x3d', '\x44\x64\x75\x30\x6d\x53\x6b\x74', '\x6f\x65\x56\x63\x54\x48\x30\x2b', '\x57\x52\x31\x44\x57\x52\x54\x4b\x72\x57\x3d\x3d', '\x79\x6d\x6f\x65\x57\x36\x66\x53', '\x78\x43\x6f\x74\x6a\x31\x37\x64\x4b\x47\x3d\x3d', '\x73\x43\x6b\x78\x70\x65\x71\x6c', '\x74\x43\x6b\x46\x6f\x65\x30\x61', '\x71\x43\x6b\x6a\x57\x52\x42\x64\x4a\x6d\x6b\x56', '\x57\x50\x79\x53\x57\x35\x66\x65\x62\x47\x3d\x3d', '\x6e\x4e\x75\x72\x75\x63\x34\x3d', '\x64\x71\x6d\x56\x76\x31\x69\x3d', '\x42\x43\x6f\x34\x70\x53\x6b\x69\x6f\x57\x3d\x3d', '\x62\x6d\x6b\x58\x57\x51\x4a\x64\x4d\x65\x30\x3d', '\x46\x53\x6f\x36\x6a\x4d\x2f\x64\x4f\x47\x3d\x3d', '\x57\x50\x4b\x58\x57\x36\x50\x75\x75\x47\x3d\x3d', '\x57\x52\x56\x63\x4f\x78\x6e\x77\x6e\x71\x3d\x3d', '\x41\x53\x6b\x57\x57\x36\x74\x64\x52\x6d\x6f\x73', '\x57\x52\x78\x63\x55\x33\x71\x77\x70\x61\x3d\x3d', '\x57\x34\x74\x63\x4b\x58\x74\x63\x4a\x75\x65\x3d', '\x57\x37\x4a\x64\x50\x76\x4a\x64\x4f\x43\x6b\x72', '\x57\x34\x42\x64\x52\x4d\x6c\x64\x4a\x6d\x6f\x6b', '\x57\x37\x62\x69\x57\x37\x6c\x64\x54\x71\x3d\x3d', '\x65\x66\x33\x63\x4d\x59\x61\x69', '\x64\x48\x37\x63\x47\x53\x6b\x4f\x57\x51\x53\x3d', '\x45\x61\x75\x2b\x65\x53\x6b\x4e', '\x57\x34\x35\x6f\x41\x43\x6b\x35\x43\x61\x3d\x3d', '\x57\x37\x64\x63\x50\x4a\x64\x63\x54\x66\x71\x3d', '\x57\x4f\x64\x64\x4e\x4b\x6c\x64\x54\x71\x3d\x3d', '\x57\x50\x5a\x64\x50\x53\x6b\x33\x57\x36\x50\x4f', '\x61\x72\x30\x38\x76\x30\x4f\x3d', '\x57\x4f\x31\x51\x63\x47\x56\x63\x4c\x47\x3d\x3d', '\x57\x34\x35\x31\x79\x57\x52\x64\x4c\x57\x3d\x3d', '\x57\x52\x33\x63\x51\x33\x39\x34\x57\x34\x57\x3d', '\x45\x53\x6f\x71\x57\x35\x35\x73\x63\x61\x3d\x3d', '\x57\x35\x71\x4f\x72\x43\x6f\x57\x57\x50\x43\x3d', '\x57\x34\x4a\x63\x4f\x57\x47\x43\x57\x34\x38\x3d', '\x78\x38\x6b\x66\x71\x67\x6c\x63\x56\x61\x3d\x3d', '\x57\x35\x78\x63\x54\x73\x34\x79', '\x6b\x4e\x68\x64\x50\x38\x6f\x68\x57\x50\x38\x3d', '\x78\x43\x6f\x4e\x57\x4f\x4f\x72', '\x78\x43\x6b\x57\x57\x36\x56\x64\x56\x6d\x6f\x67', '\x57\x35\x4a\x63\x55\x53\x6b\x51\x78\x63\x57\x3d', '\x57\x4f\x68\x63\x51\x68\x61\x6c\x6b\x61\x3d\x3d', '\x77\x74\x56\x63\x51\x43\x6f\x39\x57\x36\x6d\x3d', '\x45\x53\x6b\x47\x61\x38\x6f\x6c\x57\x37\x69\x3d', '\x57\x34\x75\x63\x6c\x58\x53\x79'];
x0a.forEach(v => console.log(v));
Decoded:
const arr = [
"W4hdIc4XCq==",
"W4ddIM/dLmkP",
"smkklae4",
"p2KIsYq=",
"Ddu0mSkt",
"oeVcTH0+",
"WR1DWRTKrW==",
"ymoeW6fS",
"xCotj17dKG==",
"sCkxpeql",
"tCkFoe0a",
"qCkjWRBdJmkV",
"WPySW5febG==",
"nNuruc4=",
"dqmVv1i=",
"BCo4pSkioW==",
"bmkXWQJdMe0=",
"FSo6jM/dOG==",
"WPKXW6PuuG==",
"WRVcOxnwnq==",
"ASkWW6tdRmos",
"WRxcU3qwpa==",
"W4tcKXtcJue=",
"W7JdPvJdOCkr",
"W4BdRMldJmok",
"W7biW7ldTq==",
"ef3cMYai",
"dH7cGSkOWQS=",
"Eau+eSkN",
"W45oACk5Ca==",
"W7dcPJdcTfq=",
"WOddNKldTq==",
"WPZdPSk3W6PO",
"ar08v0O=",
"WO1QcGVcLG==",
"W451yWRdLW==",
"WR3cQ394W4W=",
"ESoqW55sca==",
"W5qOrCoWWPC=",
"W4JcOWGCW48=",
"x8kfqglcVa==",
"W5xcTs4y",
"kNhdP8ohWP8=",
"xCoNWOOr",
"xCkWW6VdVmog",
"W5JcUSkQxcW=",
"WOhcQhalka==",
"wtVcQCo9W6m=",
"ESkGa8olW7i=",
"W4uclXSy",
];
I have a script that is modifying a Shopify App (Which means the scripts are attached through a third party process and I can't access them.) I want my script to load only after their script is completely finished executing, but I can't figure out what to use to signal this process is complete.
This is my script (currently using setInterval as a stopgap):
$(window).load(function(){
var check = setInterval(function() {
let sprCheck = window['SPR'];
var spr = $("#shopify-product-reviews"),
container = spr.find(".spr-content"),
reviewButton = spr.find(".spr-summary-actions-newreview");
if (sprCheck) {
clearInterval(check);
var reviews = spr.find('.spr-reviews'),
reviewButtonWrap = spr.find('.spr-summary-actions'),
form = spr.find('.spr-form'),
toggleContainer = spr.find('.spr-summary-actions-togglereviews'),
reviewButtonLabel = reviewButton.text();
reviewButtonWrap.detach().appendTo(container);
spr.css('overflow','visible');
form.detach().insertAfter(reviews);
if (reviews.children().length) {
reviewButtonWrap.css('display', 'none');
}
toggleContainer.click(function() {
reviewButtonWrap.toggle();
});
spr.fadeTo(300, 1);
reviewButton.click(function(){
if (form.is(':visible')) {
reviewButton.text('Cancel Review');
reviewButton.addClass('spr-close-form');
} else {
reviewButton.text(reviewButtonLabel);
reviewButton.removeClass('spr-close-form');
}
});
}
}, 300);
})
This is where their script is attached:
(function() {
function asyncLoad() {
var urls = ["\/\/productreviews.shopifycdn.com\/assets\/v4\/spr.js?shop=sukker-sweet-phase-2.myshopify.com"];
for (var i = 0; i < urls.length; i++) {
var s = document.createElement('script');
s.type = 'text/javascript';
s.async = true;
s.src = urls[i];
var x = document.getElementsByTagName('script')[0];
x.parentNode.insertBefore(s, x);
}
};
if(window.attachEvent) {
window.attachEvent('onload', asyncLoad);
} else {
window.addEventListener('load', asyncLoad, false);
}
})();
This is their script itself:
e = function() {
"use strict";
window.innerShiv = function() {
function n(e, t, r) {
return /^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i.test(r) ? e : t + "></" + r + ">"
}
var s, o = document,
d = "abbr article aside audio canvas datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video".split(" ");
return function(e, t) {
if (!s && ((s = o.createElement("div")).innerHTML = "<nav></nav>", 1 !== s.childNodes.length)) {
for (var r = o.createDocumentFragment(), a = d.length; a--;) r.createElement(d[a]);
r.appendChild(s)
}
if (e = e.replace(/^\s\s*/, "").replace(/\s\s*$/, "").replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, "").replace(/(<([\w:]+)[^>]*?)\/>/g, n), s.innerHTML = (r = e.match(/^<(tbody|tr|td|col|colgroup|thead|tfoot)/i)) ? "<table>" + e + "</table>" : e, r = r ? s.getElementsByTagName(r[1])[0].parentNode : s, !1 === t) return r.childNodes;
a = o.createDocumentFragment();
for (var i = r.childNodes.length; i--;) a.appendChild(r.firstChild);
return a
}
}()
}, t = {
exports: {}
}, e.call(t.exports, t, t.exports), t.exports;
var e, t;
(function() {
window.SPR = function() {
function n() {}
return n.shop = Shopify.shop, n.host = "//productreviews.shopifycdn.com", n.version = "v4", n.api_url = n.host + "/proxy/" + n.version, n.badgeEls = [], n.reviewEls = [], n.elSettings = {}, n.$ = void 0, n.extraAjaxParams = {
shop: n.shop
}, n.registerCallbacks = function() {
return this.$(document).bind("spr:badge:loaded", "undefined" != typeof SPRCallbacks && null !== SPRCallbacks ? SPRCallbacks.onBadgeLoad : void 0), this.$(document).bind("spr:product:loaded", "undefined" != typeof SPRCallbacks && null !== SPRCallbacks ? SPRCallbacks.onProductLoad : void 0), this.$(document).bind("spr:reviews:loaded", "undefined" != typeof SPRCallbacks && null !== SPRCallbacks ? SPRCallbacks.onReviewsLoad : void 0), this.$(document).bind("spr:form:loaded", "undefined" != typeof SPRCallbacks && null !== SPRCallbacks ? SPRCallbacks.onFormLoad : void 0), this.$(document).bind("spr:form:success", "undefined" != typeof SPRCallbacks && null !== SPRCallbacks ? SPRCallbacks.onFormSuccess : void 0), this.$(document).bind("spr:form:failure", "undefined" != typeof SPRCallbacks && null !== SPRCallbacks ? SPRCallbacks.onFormFailure : void 0)
}, n.loadStylesheet = function() {
var e;
return (e = document.createElement("link")).setAttribute("rel", "stylesheet"), e.setAttribute("type", "text/css"), e.setAttribute("href", "https://productreviews.shopifycdn.com/assets/v4/spr-805222bdeda8199e3a86a468a398e3070e6126868692225ffa23ac7502b1eca2.css"), e.setAttribute("media", "screen"), document.getElementsByTagName("head")[0].appendChild(e)
}, n.initRatingHandler = function() {
return n.$(document).on("mouseover mouseout", "form a.spr-icon-star", function(e) {
var t, r, a;
return t = e.currentTarget, a = n.$(t).attr("data-value"), r = n.$(t).parent(), "mouseover" === e.type ? (r.find("a.spr-icon:lt(" + a + ")").addClass("spr-icon-star-hover"), r.find("a.spr-icon:gt(" + (a - 1) + ")").removeClass("spr-icon-star-hover")) : r.find("a.spr-icon").removeClass("spr-icon-star-hover")
})
}, n.initDomEls = function() {
return this.badgeEls = this.$(".shopify-product-reviews-badge[data-id]"), this.reviewEls = this.$("#shopify-product-reviews[data-id]"), this.$.each(this.reviewEls, (a = this, function(e, t) {
var r;
return r = a.$(t).attr("data-id"), a.elSettings[r] = {}, a.elSettings[r].reviews_el = "#" + (a.$(t).attr("data-reviews-prefix") ? a.$(t).attr("data-reviews-prefix") : "reviews_"), a.elSettings[r].form_el = "#" + (a.$(t).attr("data-form-prefix") ? a.$(t).attr("data-form-prefix") : "form_")
}));
var a
}, n.loadProducts = function() {
return this.$.each(this.reviewEls, (i = this, function(e, t) {
var r, a;
if (r = i.$(t).attr("data-id"), "false" !== i.$(t).attr("data-autoload")) return a = i.$.extend({
product_id: r,
version: i.version
}, i.extraAjaxParams), i.$.get(i.api_url + "/reviews/product", a, i.productCallback, "jsonp")
}));
var i
}, n.loadBadges = function() {
var e, t, r, a, i, n;
if (0 < (r = this.$.map(this.badgeEls, (n = this, function(e) {
return n.$(e).attr("data-id")
}))).length) {
for (t = 7, i = []; 0 < (e = r.splice(0, t)).length;) a = this.$.extend(this.extraAjaxParams, {
product_ids: e
}), i.push(this.$.get(this.api_url + "/reviews/badges", a, this.badgesCallback, "jsonp"));
return i
}
}, n.pageReviews = function(e) {
var t, r, a;
return a = this.$(e).data("product-id"), r = this.$(e).data("page"), t = this.$.extend({
page: r,
product_id: a
}, this.extraAjaxParams), this.$.get(this.api_url + "/reviews", t, this.paginateCallback, "jsonp"), !1
}, n.submitForm = function(e) {
var t, r, a;
return t = this.$(e).serializeObject(), t = this.$.extend(t, this.extraAjaxParams), t = (t = this.$.param(t)).replace(/%0D%0A/g, "%0A"), this.$.ajax({
url: this.api_url + "/reviews/create",
type: "GET",
dataType: "jsonp",
data: t,
success: this.formCallback,
beforeSend: (a = this, function() {
return a.$(".spr-button-primary").attr("disabled", "disabled")
}),
complete: (r = this, function() {
return r.$(".spr-button-primary").removeAttr("disabled")
})
}), !1
}, n.reportReview = function(e) {
var t;
return confirm("Are you sure you want to report this review as inappropriate?") && (t = this.$.extend({
id: e
}, this.extraAjaxParams), this.$.get(this.api_url + "/reviews/report", t, this.reportCallback, "jsonp")), !1
}, n.toggleReviews = function(e) {
return this.$("#shopify-product-reviews[data-id='" + e + "']").find(".spr-reviews").toggle()
}, n.toggleForm = function(e) {
return this.$("#shopify-product-reviews[data-id='" + e + "']").find(".spr-form").toggle()
}, n.setRating = function(e) {
var t, r, a;
return t = this.$(e).parents("form"), a = this.$(e).attr("data-value"), r = this.$(e).parent(), t.find("input[name='review[rating]']").val(a), this.setStarRating(a, r)
}, n.setStarRating = function(e, t) {
return t.find("a:lt(" + e + ")").removeClass("spr-icon-star-empty spr-icon-star-hover"), t.find("a:gt(" + (e - 1) + ")").removeClass("spr-icon-star-hover").addClass("spr-icon-star-empty")
}, n.badgesCallback = function(e) {
var r;
return r = e.badges, n.$.map(n.badgeEls, function(e) {
var t;
if (t = n.$(e).attr("data-id"), r[t] !== undefined) return n.$(e).replaceWith(r[t]), n.triggerEvent("spr:badge:loaded", {
id: t
})
})
}, n.productCallback = function(e) {
var t;
return t = e.remote_id.toString(), n.renderProduct(t, e.product_stripped, e.aggregate_rating), n.renderForm(t, e.form), n.renderReviews(t, e.reviews)
}, n.renderProduct = function(t, r, a) {
return this.$.map(this.reviewEls, (i = this, function(e) {
if (t === i.$(e).attr("data-id")) return i.$(e).html([innerShiv(r, !1), a]), i.triggerEvent("spr:product:loaded", {
id: t
})
}));
var i
}, n.renderForm = function(e, t) {
return this.$(this.elSettings[e].form_el + e).html(t), this.triggerEvent("spr:form:loaded", {
id: e
})
}, n.renderReviews = function(e, t) {
return n.$(n.elSettings[e].reviews_el + e).html(t), n.triggerEvent("spr:reviews:loaded", {
id: e
})
}, n.formCallback = function(e) {
var t, r, a, i;
return i = e.status, a = e.remote_id, r = e.form, (t = n.$(n.elSettings[a].form_el + a)).html(r), "failure" === i && n.initStarRating(t), "success" === i && (n.$("#shopify-product-reviews[data-id='" + a + "'] .spr-summary-actions-newreview").hide(), n.$(".spr-form-message-success").focus()), n.triggerEvent("spr:form:" + i, {
id: a
})
}, n.initStarRating = function(e) {
var t, r, a;
if ((a = e.find("input[name='review[rating]']")) && a.val()) return r = a.val(), t = e.find(".spr-starrating"), this.setStarRating(r, t)
}, n.paginateCallback = function(e) {
var t, r;
return r = e.remote_id.toString(), t = e.reviews, n.renderReviews(r, t)
}, n.reportCallback = function(e) {
var t;
return t = "#report_" + e.id, n.$(t).replaceWith("<span class='spr-review-reportreview'>" + n.$(t).attr("data-msg") + "</span>")
}, n.loadjQuery = function(e) {
return n.loadScript("//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js", function() {
return n.$ = jQuery.noConflict(!0), e()
})
}, n.loadScript = function(e, t) {
var r;
return (r = document.createElement("script")).type = "text/javascript", r.readyState ? r.onreadystatechange = function() {
if ("loaded" === r.readyState || "complete" === r.readyState) return r.onreadystatechange = null, t()
} : r.onload = function() {
return t()
}, r.src = e, document.getElementsByTagName("head")[0].appendChild(r)
}, n.loadjQueryExtentions = function(r) {
return r.fn.serializeObject = function() {
var e, t;
return e = {}, t = this.serializeArray(), r.each(t, function() {
return e[this.name] ? (e[this.name].push || (e[this.name] = [e[this.name]]), e[this.name].push(this.value || "")) : e[this.name] = this.value || ""
}), e
}
}, n.triggerEvent = function(e, t) {
return this.$(document).trigger(e, t)
}, n
}(), SPR.loadStylesheet(), SPR.loadjQuery(function() {
return SPR.$.ajaxSetup({
cache: !1
}), SPR.loadjQueryExtentions(SPR.$), SPR.$(document).ready(function() {
return SPR.registerCallbacks(), SPR.initRatingHandler(), SPR.initDomEls(), SPR.loadProducts(), SPR.loadBadges()
})
})
}).call(this)
}("undefined" != typeof global ? global : "undefined" != typeof window && window);
Where their script is attached, you could try adding an onload attribute:
var s = document.createElement('script');
s.type = 'text/javascript';
s.async = true;
s.onload = "functionToRunMyOwnScript()"
If you can't access the place where it's attached, I personally don't think there's anything wrong with using the interval, as you're currently doing.
I think you have 2 options.
like you do it (check again and again if the changes are done)
use MutationObserver , if you wanna go this way, make sure to test this heavly.
To your solution, I think what you miss is a better check (sprCheck). If you say sometimes the function is triggered when the element exists, but is not at the right spot yet, then you also have to check if the element is on the right check before you continue.