Script "profiles" for quickly toggling sets of scripts

Post Reply
mapomatic
Posts: 1
Joined: 07.10.16 18:57:34

Script "profiles" for quickly toggling sets of scripts

Post by mapomatic » 07.10.16 19:02:34

Was wondering if it would be possible to create something like "profiles" that would allow people to toggle user-defined sets of scripts on/off. Ideally, it would allow you to toggle multiple profiles on at one time. A script that is in any of those profiles would be turned on. A script that is not in any of those profiles would be turned off.

Thanks for the great work on Tampermonkey!

User avatar
derjanb
Site Admin
Posts: 2152
Joined: 20.01.06 02:16:15
Contact:

Re: Script "profiles" for quickly toggling sets of scripts

Post by derjanb » 12.10.16 19:15:29

Great idea. I'll check the effort.
ImageIf you like what I'm doing, please consider a donation here. Image

User avatar
derjanb
Site Admin
Posts: 2152
Joined: 20.01.06 02:16:15
Contact:

Re: Script "profiles" for quickly toggling sets of scripts

Post by derjanb » 19.10.16 20:25:47

The latest beta [1] got a search/filtering feature. You can make it visible by pressing "Ctrl+f" or checking one of the checkboxes. By default many properties are searched for the given string, but you can also choose a single one.

One of the properties is the "Comment" setting, which can be modified at each script's settings tab. If you now add tags (i.e. #github, #facebook or whatever) to the comment, then you can find and select these scripts by pressing "Ctrl+f" and typing "#github".
"Ctrl+a" now selects all visible scripts. Even though it's not exactly what you've suggested it allows to toggle scripts quickly. I hope this eases the pain a little bit ;).

http://tampermonkey.net/changelog.php?v ... 6&ext=gcal
ImageIf you like what I'm doing, please consider a donation here. Image

herrchin
Posts: 2
Joined: 10.11.16 00:29:08

Re: Script "profiles" for quickly toggling sets of scripts

Post by herrchin » 10.11.16 01:19:07

I love the search workaround! But... after I added Comments to 53 scripts, they all suddenly lost them. Comments boxes all went blank. I noticed because a search didn't turn up anything anymore. Would you like an entry in the Bug Reports forum, or do you reserve that for production releases?

User avatar
derjanb
Site Admin
Posts: 2152
Joined: 20.01.06 02:16:15
Contact:

Re: Script "profiles" for quickly toggling sets of scripts

Post by derjanb » 10.11.16 20:06:48

herrchin wrote:I love the search workaround! But... after I added Comments to 53 scripts, they all suddenly lost them.
Are you using Chrome Sync? If so, then I found the root cause. The comments don't get synced to, but from the remote storage. This means your addition is not saved remotely and later overwriten by the blank value from remote.
You can work-around the issue this way:

1) Close all other sync clients (Chrome instances at all your devices)
2) Set the "Config Mode" to "Advanced"
3) Disable TESLA
4) Press the button "Chrome Sync Reset"
5) Make your changes
6) Re-enable TESLA.

Unfortunately you have to repeat these steps every time you want to change a comment.
ImageIf you like what I'm doing, please consider a donation here. Image

herrchin
Posts: 2
Joined: 10.11.16 00:29:08

Re: Script "profiles" for quickly toggling sets of scripts

Post by herrchin » 11.11.16 16:30:36

Yes! I do use Chrome sync. Thank you for the workaround!

User avatar
derjanb
Site Admin
Posts: 2152
Joined: 20.01.06 02:16:15
Contact:

Re: Script "profiles" for quickly toggling sets of scripts

Post by derjanb » 19.11.16 22:19:12

The sync issue is fixed at the latest beta version: http://tampermonkey.net/changelog.php?v ... 3&ext=gcal
ImageIf you like what I'm doing, please consider a donation here. Image

User avatar
spiralx
Posts: 21
Joined: 11.06.15 16:26:46
Location: London, UK

Re: Script "profiles" for quickly toggling sets of scripts

Post by spiralx » 20.01.17 16:46:52

I was actually going to ask if it was possible to have a way to view scripts grouped or filtered by site as a feature request - this covers one of the use cases I had, but it would still be nice to have a way to enter a partial URL such as

Code: Select all

github.com
or

Code: Select all

forum.tampermonkey.net/posting.php
and get a list of which scripts would run on that page.

User avatar
derjanb
Site Admin
Posts: 2152
Joined: 20.01.06 02:16:15
Contact:

Re: Script "profiles" for quickly toggling sets of scripts

Post by derjanb » 03.02.17 22:37:16

spiralx wrote:it would still be nice to have a way to enter a partial URL such as

Code: Select all

github.com
...and get a list of which scripts would run on that page.
This should already work. A script with

Code: Select all

// @include *.github.com/*
should be found when searching for "github.com". If you use the filter "@match/@include" then even only such scripts will be displayed.
ImageIf you like what I'm doing, please consider a donation here. Image

User avatar
spiralx
Posts: 21
Joined: 11.06.15 16:26:46
Location: London, UK

Re: Script "profiles" for quickly toggling sets of scripts

Post by spiralx » 04.02.17 01:10:30

derjanb wrote:If you use the filter "@match/@include" then even only such scripts will be displayed.
Oh, nice. Thanks :)

Post Reply

Return to “Development”

Who is online

Users browsing this forum: No registered users and 1 guest