PageSourceSearch

https://presetninja.com/assets/js/pn.js

js presetninja.com collected 2026-09-24 14:50:30 UTC 953 bytes, 40 lines download raw bytes

1//
2// function waitForElementToDisplay(selector, callback, checkFrequencyInMs, timeoutInMs) {
3//   alert("hey");
4//   var startTimeInMs = Date.now();
5//   (function loopSearch() {
6//     if (document.querySelector(selector) != null) {
7//       callback();
8//       return;
9//     }
10//     else {
11//       setTimeout(function () {
12//         if (timeoutInMs && Date.now() - startTimeInMs > timeoutInMs)
13//           return;
14//         loopSearch();
15//       }, checkFrequencyInMs);
16//     }
17//   })();
18// }
19//
20// function test() {
21//
22//   waitForElementToDisplay(".ls-checkout",function(){alert("Hi");},1000,9000);
23//
24//
25// };
26
27
28const checkElement = async selector => {
29  while ( document.querySelector(selector) === null) {
30    await new Promise( resolve =>  requestAnimationFrame(resolve) )
31  }
32  return document.querySelector(selector);
33};
34
35function test() {
36
37  checkElement('.ls-checkout').then((selector) => {
38        console.log(selector);
39  });
40}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.