Oh I got it.
Open your browser and go to "Add bookmarks". Paste this code as URL:
javascript:(function () { var script = document.createElement('script'); script.src="//cdn.jsdelivr.net/npm/eruda"; document.body.appendChild(script); script.onload = function () { eruda.init() } })();
Now open a site and go in search bar. You will end up with this.
Press the bookmark that you recently created, and you will see a floating button press on that and boom!
Answer from user13658312 on Stack OverflowVideos
Oh I got it.
Open your browser and go to "Add bookmarks". Paste this code as URL:
javascript:(function () { var script = document.createElement('script'); script.src="//cdn.jsdelivr.net/npm/eruda"; document.body.appendChild(script); script.onload = function () { eruda.init() } })();
Now open a site and go in search bar. You will end up with this.
Press the bookmark that you recently created, and you will see a floating button press on that and boom!
javascript:(function () { var script = document.createElement('script'); script.src="//cdn.jsdelivr.net/npm/eruda"; document.body.appendChild(script); script.onload = function () { eruda.init() } })();
if you don't want to explicitly create a js file but still want to test your javascript code, you can use snippets to run your JS code.
Follow the steps here:
- Open Dev Tools
- Go to Sources Tab
- Under Sources tab go to snippets, + New snippet
- Paste your JS code in the editor then run Command + Enter on a Mac, or Ctrl + Enter on Windows or Linux. You should see the output in console if you are using console.log or similar to test. You can edit the current web page that you have open or run scripts, load more javascript files. (Just note: this snippets are not stored on as a js file, unless you explicitly did, on your computer so if you remove chrome you will lose all your snippets);
- You also have a option to save as your snippet if you right click on your snippet.
Try this:
1. Install Node.js from https://nodejs.org/
2. Place your JavaScript code into a .js file (e.g. someCode.js)
3. Open a cmd shell (or Terminal on Mac) and use Node's Read-Eval-Print-Loop (REPL) to execute someCode.js like this:
> node someCode.js
Hope this helps!
I just downloaded a script that's meant to function as a Google Chrome extension, but I have zero experience, and I have no idea how to run it.