-
Notifications
You must be signed in to change notification settings - Fork 418
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request //@ Mobile #2174
Comments
These scripts work when you enable "Desktop view" in your mobile browsers. So unconditionally not let them run might also be wrong. |
I barely ever enable "Desktop view" in my mobile browser. I actually really would like to disable desktop scripts while on "Desktop view", because I don't use any external mouse/keyboards with my android phone, so even though these desktop scripts may work, I don't have a CTRL/SHIFT etc keys anyway. I would like to keep my desktop only apps, disabled on mobile, even if desktop view is enabled. "unconditionally not let them run might also be wrong." I agree, but if a dev that made a script clearly wants it disabled at all times (like me), then not even giving this option to devs is wrong as well. I think that most devs would understand how this feature works, so they wouldn't mistakenly disable scripts on mobile, then want to use them with the "desktop view", but we could add a 3rd option as well: |
The definition of mobile compatibility is really fuzzy: it is not only about using keyboard/mouse/touch events (by the way, you can connect the mouse and keyboard to a smartphone) but also about compatibility with a site's mobile layout (if it has one) and not crashing due to a lack of some Web API (mobile browsers tend to lack various features, though mostly uncommon ones). You can do something like this to avoid running userscripts: if (window.navigator.platform.startsWith("Android")) return; though the userscript will still be loaded onto the site. Another solution is to
Or you can mark them as |
I'm not opposed to it. I'm just thinking about how it could work to give as much benefit as possible to the users.
What I found so far: https://stackoverflow.com/a/76012165/1896125
Tampermonkey now has |
Expected Behavior
// @ Mobile true (or enabled)
This should define if a script can run on mobile/desktop or not. When // @ Mobile is false/disabled then only allow the script to run on desktop
(similar to #2102 )
Actual Behavior
This doesn't exist
Specifications
Now with Kiwi browser and many other mobile browsers adding support to tampermonkey, it's time to consider having a way to let script devs set if the script is mobile or not.
Issue = I've Edge/Win11 and Kiwi Browser/Android, I often have to export my Edge scripts to my phone, so I can have the same data and scripts on both.
The issue is that many scripts others/I made to TM were made only for desktop websites, like they only work if the user holds CTRL/SHIFT or hovers/selects/middle-clicks on something, so on mobile, these scripts are impossible to use, and I have to take a long time disabling them and enabling mobile only scripts (like scripts to disable YT autopause, that I keep disabled on desktop), or even though they don't work on mobile websites, they do crash many mobile websites, causing big issues.
It's hard to manually do that for over 200 scripts...
The text was updated successfully, but these errors were encountered: