After learning how useful Tampermonkey scripts could be, I wondered if there is a way to run Tampermonkey scripts on Android or iOS. Luckily, I have found one. In this post, I will show you how to use userscripts on mobile.
Run Userscripts with Safari on iPhone or iPad
Tampermoneky extension is only available for Safari on a Mac. Luckily, I have found an alternative extension for Safari on iOS. It is called Userscripts. You can free download it from Appstore.
If you have never used any Safari extension on iPhone or iPad, you can refer to the steps below to see how it works.
Step 1. Download and open the Userscripts extension from Appstore.
Step 2. Within the Userscripts extension, specify the folder where you store the userscripts. Be sure to save some usersscripts in “.js” format in that folder.
Step 3. Open Safari and tap on the “AA” icon from the address bar.
Step 4. Select Manage Extension and toggle on Userscripts.
Step 5. Tap on the “AA” icon again and select Userscripts.
Step 6. Allow access to certain websites and tap Done to confirm.
That’s it. Now you can reload the page to see the changes that the script has done. In the video, I use Return YouTube Dislike script to display YouTube dislike counts. Besides the Userscripts extension, you can also use another Safari extension called Stay to run custom scripts on iOS or macOS.
Use Tampermonkey Scripts on Android
The built-in web browser of my Android phone, Smartisan R2, supports the Tampermonkey extension. If yours does not support extensions, you can use Firefox Nightly browser. The steps are listed below.
Update in 2024: The normal Firefox for Android also supports Tampermonkey scripts.
Step 1. Install Firefox Nightly⁕ on your Android phone from Google Play store.
Step 2. Open Firefox and choose Menu (dots) About Firefox.
Step 3. Tap the Firefox Browser logo 5 times to enable developer mode.
Step 4. Go to Menu (dots) -> Settings -> Advanced -> Custom Add-on collection.
Step 5. Tampermoneky add-on is not in the Adds-on section, so you can use my custom collections. Enter the User ID: 14400024. Collection: Chrunos.
Step 6. When you save the changes, the browser will shut down. Now, you can re-open Firefox Nightly to go to Add-ons section to install Tampermonkey, Greasemonkey, or USI.
After installing the Tampermonkey add-on, you can add scripts as you do on your PC.
Android Browsers That Support Custom Scripts
For Android users, you can choose a few Android Browsers that support extensions like Firefox, Kiwi Browser, Alook, and Yandex. Based on the browser you choose, you may then install scripts manager extensions like Greasemonkey, Tampermonkey, or Violentmonkey.
In addition, you can also install Browsers like XBrowser and Via Browser, which offer custom scripts feature.
iOS Web Browser with Custom Scripts Feature
Via Browser is a powerful browser that is highly customizable and ad-free. It is fast and small in size. You can customize it with custom scripts and it has a built-in ad-blocker. What’s more, it allows you to view page sources on iPhone and inspect elements with Vconsole.
In addition to Via browser, Gear Pro and Alook browsers also support Tampermonkey scripts. However, Gear Pro requires a paid subscription to add scripts while Alook is 0.99 USD.
Run Tampermonkey Script Shortcut for iPhone
The Userscripts extension for Safari is only available for iOS 15 or later versions. If your device is not on iOS 15 yet, you can use a custom shortcut for running the Tampermonkey script. It is not that convenient but works.
Shortcuts is a stock app that comes with iOS 13 or newer versions. If you don’t want to build a shortcut from scratch, you can simply add this shortcut. Please note, you must enable untrusted shortcuts in Settings before you add shortcuts outside of the Shortcuts Gallery.
As the Userscripts method, you still need to save the scripts in the Files app. Since the Shortcuts only have access to the Shortcuts folder, you should save the scripts to the iCloud/Shortcuts/Scripts/ folder. In case you have many scripts to run, add a line to specify the websites to run this script at the top of the script. For example, my script is for youtube, so I add a line as below:
// shortcuts: youtube.com
With all that setup, you can now open Safari to load the website, which you want to run the script. Tap on the Safari Share button and select the Run Tampermonkey Script shortcut you added. You will see the changes on the Safari web page when it is done.
Conclusion
Tampermonkey scripts are convenient and powerful. Now, you know how to run Tampermonkey scripts on Android or iOS. You really should try it on your mobile phone if you haven’t.
very useful tutorial , this opens up a lot of opportunities and feature for my mobile browsing &automation needs (i like to tinker with javascript & userscripts)! much appreciated.
helped alot. thanks.
Thanks. I was just using a version of Firefox from 5 years ago. This is way better!