Scripts

How to execute a script?

Learn five quick ways to execute a script for various devices and browsers.

Let's get started!

Executing a script is a simple process once you know how to do it. It's easier to do on PCs and laptops, but there are also methods for mobile devices. In some cases it might be also not possible, but we will cover that as well.

Below are the most common ways to run a script on different platforms.

This is the most reliable way to run scripts on most devices. The process is similar across all platforms, but the way to open DevTools varies. Here are the steps for each device type:

PC / Laptop (Windows, Mac, Chromebook)

You can open the DevTools using any of these shortcuts:

  • Press the F12 key on your keyboard or
  • Press Ctrl + Shift + J (Windows) or Cmd + Option + J (Mac) or
  • Right-click anywhere on the page and select Inspect.

After opening DevTools, click on the Console tab at the top. This is where you will paste your script.

Once console is open:

  1. Click next to the blue > symbol at the bottom.
  2. Paste your script (Ctrl + V).
  3. Press Enter on your keyboard to run it.

DevTools Console

iOS (iPhone / iPad)

Safari doesn't include a DevTools console by default, so you need an browser extension:

  1. Download the Web Inspector extension from the App Store.
  2. Open Safari, tap the puzzle piece icon in the address bar, and enable Web Inspector.
  3. Once enabled, tap it again to open the DevTools window.
  4. Paste your script and press Enter on your on-screen keyboard.

Troubleshooting iOS:

  • If tapping the icon does nothing, try refreshing the page.
  • In your iPhone Settings > Safari, make sure Block Pop-ups is turned off if the script needs to open a window.

Devtools on IOS

Android (Phones & Tablets)

Standard mobile Chrome doesn't support scripts, so you'll need a different browser:

  1. Download Kiwi Browser from the Play Store.
  2. Open the website you want to use.
  3. Tap the three dots (⋮) in the top right corner.
  4. Scroll down and select Developer tools.
  5. Tap the Console tab.
  6. Paste your script and press Enter.

Method 2: The "URL Bar" Trick

If you can't open Developer Tools, try this.

  1. Copy your bookmark version script.
  2. Click on the address bar (where the website link is) at the top of your browser.
  3. Delete everything inside it.
  4. Type exactly javascript: (with the colon!) and then paste your bookmark version script right after it.
  5. Press Enter.

Important: Many browsers automatically remove the javascript: part when you paste it for security. If it doesn't work, make sure you manually typed javascript: before the script.

Method 3: The Bookmark

If all else fails, you can create a bookmark that runs the script. Remember that you should remove bookmarks and add them again for each new script you want to run.

  1. Copy your bookmark version script.
  2. Right-click your Bookmarks Bar (the bar below the link) and click Add Page. (If you don't see the Bookmarks Bar, press Ctrl + Shift + B to show it).
  3. Name it something like "Run Script".
  4. In the URL or Address box, delete the link and paste your bookmark version script.
  5. Go to the website you want to use it on and simply click the bookmark you just created.

Still not working?

If none of these methods work, your device or browser might have Administrator Restrictions. This is very common on School Chromebooks or work laptops where the school/company has blocked "Developer Tools" and "External javascript execution" for safety. Unfortunately, there is no way to bypass this without using a personal device.