Skip to content

Instantly share code, notes, and snippets.

@samidunimsara
Created December 29, 2023 12:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samidunimsara/97a16c36d1ca260da3df634ece8d9a9b to your computer and use it in GitHub Desktop.
Save samidunimsara/97a16c36d1ca260da3df634ece8d9a9b to your computer and use it in GitHub Desktop.
Step 0
Bookmark your current page by clicking the star ⭐ symbol from the chrome menu.
After doing this, you should see a toast message Bookmarked with an edit button:
Click the edit option and change the bookmark details to the following:
Name: js69
URL (copy and paste code below):
javascript:(function () {var script=document.createElement('script');script.src="//cdn.jsdelivr.net/npm/eruda";document.body.appendChild(script); script.onload = function () { eruda.init() } })();
Step 1
Visit the web page you want to inspect
Enter the keyword js69 into the search bar(you should see the page we bookmarked before with the url starting with javascript:...) click on the URL
Find end point //
javascript:(function(){var scripts=document.getElementsByTagName("script"),regex=/(?<=(\"|\'|\`))\/[a-zA-Z0-9_?&=\/\-\#\.]*(?=(\"|\'|\`))/g;const results=new Set;for(var i=0;i<scripts.length;i++){var t=scripts[i].src;""!=t&&fetch(t).then(function(t){return t.text()}).then(function(t){var e=t.matchAll(regex);for(let r of e)results.add(r[0])}).catch(function(t){console.log("An error occurred: ",t)})}var pageContent=document.documentElement.outerHTML,matches=pageContent.matchAll(regex);for(const match of matches)results.add(match[0]);function writeResults(){results.forEach(function(t){document.write(t+"<br>")})}setTimeout(writeResults,3e3);})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment