-
Notifications
You must be signed in to change notification settings - Fork 424
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 |
It's not fuzzy, mobile browsers show IOS/Android, so that is an easy catch. I know that someone can connect these devices to a smartphone, but barely anyone actually knows/does it. Yes, I know that I can use that code to do it myself, but TM should be more trustworthy, since it's an extension, while JS by itself lacks the power and access permissions that an extension has. I've 200+ scripts, and most sites show that 20+ different scripts loaded, so when a site has an issue, it's hard to disable 20+ scripts just to figure out which one caused the problem, excluding the fact that I've another let's say 10 disabled, so I've to keep track of which 20 were enabled and which 10 were disabled originally. Your other solution is still hard to do because mobile browsers suck to be used and have me/users click on extremely small buttons to set up things... Alright, I'm glad that you are not opposed to it. I know about the new tag support, but that is totally not what I want and what I'm talking about... |
Regarding your tag suggestion, I was about to implement it, but then I saw that "add tags to your script which will be visible in the script list if this tag is part of your system's tag list" which defeats the whole purpose of tags. Most user script users are already very scared of installing an extension, and even more about installing a user script, above that would be reading a "documentation" in the script installation page begging users to add a tag to their TM extension settings. I would like to understand the reason behind this requirement... I can't see @tag being helpful or useful at all for users with that requirement, it would make it helpful only for devs. Another issue is that @tag isn't @tags. Most of my scripts are a bit old but they're still working perfectly... Updating the script just to add 1 single tag seems pointless to me. |
I think you misunderstood the feature. The intended
or
You don't have to. Just mass-assign tags according to you needs.
As mentioned above: you can filter by tags by simply clicking at it.
So no need to implement something, just configure your Tampermonkey dashboard according to your needs. |
Thank you, this is much cooler than I thought then! I'm glad that this built-in feature doesn't just add the tag code in the script code, so it doesn't affect the "Check for updates" setting. |
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: