Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> [Userscript] Tag Tracker Helper, enhances the Tag Tracker functionality by adding quick access to search filters and highlighting specific tags.

 
post Apr 2 2024, 15:02
Post #1
-terry-



Active Poster
*******
Group: Gold Star Club
Posts: 1,277
Joined: 9-August 19
Level 500 (Ponyslayer)


This userscript enhances the Tag Tracker functionality by adding quick access to search filters and highlighting specific tags.

Features:

- Adds custom search filter buttons to quickly apply predefined filters.
- Highlights tags specified in the tag_filters array.
- Filter by gallery category
- Links open in a new tab

Installation:


- Make sure you have a userscript manager extension (e.g., Tampermonkey, Greasemonkey or Violentmonkey) installed in your browser.
- Create a new userscript in your userscript manager.
- Copy and paste the provided code into the userscript.
- Customize the search_filters and tag_filters arrays according to your preferences (see below).
- Save the userscript.

Customizing Search Filters:

- The search_filters array defines the custom search filters and their corresponding button labels.
- Each filter is an object with three properties:
  • label: The text that will appear on the button.
  • params: The query parameters for the filter. Modify these to match your desired filter criteria.
  • category: Optional. The categories that will be shown by default.
- You can add, remove, or modify the filters in the search_filters array to suit your needs.
- See the 2nd post in this thread for a more detailed tutorial.

Customizing Tag Highlighting:


- The tag_filters array specifies the tags you want to highlight.
- Add or remove tags from this array based on the tags you want to highlight.
- The script will highlight the specified tags in gold color.

Usage:

- Navigate to the Tag Tracker page (https://repo.e-hentai.org/tools/tagtrack)
- The specified tags will be highlighted in gold color throughout the page.
- The custom search filter buttons will appear below the other filtering options.
- Click on a button to apply the corresponding filter.
- Click on 'Select Categories' to reveal the category filter

Note: The script will only highlight tags that are not already colored (i.e., tags that you haven't voted on).
When a Gallery filter is enabled, because the filtering is done client-side, only a small amount of galleries and tags might be visible. To fix this, the script will automatically append a couple of pages until the page is a bit fuller.
A line on the left part of the page will indicate where a new page was appended.

Download:
Attached File  tag_tracker_helper.js.txt ( 8.07k ) Number of downloads: 23


This post has been edited by -terry-: Apr 3 2024, 18:29
User is online!Profile CardPM
Go to the top of the page
+Quote Post

 
post Apr 2 2024, 15:03
Post #2
-terry-



Active Poster
*******
Group: Gold Star Club
Posts: 1,277
Joined: 9-August 19
Level 500 (Ponyslayer)


More detailed explanation on how to add filters

In the `search_filters` array, each filter object has a `params` property. This property contains the query parameters that define the specific filter criteria. When you click on a filter button, the script constructs a URL by appending the `params` value to the base URL of the Tag Tracker page.

To create a new custom filter button, follow these steps:

1. Go to the Tag Tracker page (https://repo.e-hentai.org/tools/tagtrack)
2. Use the available form fields to set up your desired filter criteria (e.g., select specific options, enter tags, etc.).
3. Click the "Go" button to apply the filter.
4. After the page reloads with the filtered results, look at the URL in your browser's address bar.
5. Find the part of the URL that comes after the question mark (`?`). This part contains the query parameters representing your filter criteria.
6. Copy everything after the `?` in the URL.
7. In the userscript, add a new object to the `search_filters` array.
8. Set the `label` property to the desired button text.
9. Set the `params` property to the copied query parameters (excluding the `?`).
10. Save the userscript.

For example, let's say you applied a filter on the Tag Tracker page, and the resulting URL looks like this:
CODE

https://repo.e-hentai.org/tools/tagtrack?w=on&a=on&filter_uid=123&filter_tag=example&go=Go


To create a button for this filter, you would add the following object to the `search_filters` array:
CODE

{
   label: 'My Custom Filter',
   params: 'w=on&a=on&filter_uid=123&filter_tag=example&go=Go'
},


Now, when you click on the "My Custom Filter" button, the script will construct the URL by appending the `params` value to the base URL, resulting in:
CODE

https://repo.e-hentai.org/tools/tagtrack?w=on&a=on&filter_uid=123&filter_tag=example&go=Go


If you want to only filter a specific category, for example 'Cosplay', 'Manga' and 'Artist CG' you can add the `category` property.
CODE

{
   label: 'My Custom Filter',
   params: 'w=on&a=on&filter_uid=123&filter_tag=example&go=Go',
   category: 'Cosplay, Manga, Artist CG'
},


Now, when you click on the "My Custom Filter" button, the script will also only show Cosplay, Manga and Artist CG galleries on that specific filter. By default the `category` property does not need to be included and all categories will be visible.

This post has been edited by -terry-: Apr 3 2024, 18:21
User is online!Profile CardPM
Go to the top of the page
+Quote Post

 
post Apr 2 2024, 15:09
Post #3
Shank



Roll for Initiative
**********
Group: Global Mods
Posts: 7,833
Joined: 19-May 12
Level 500 (Ponyslayer)


Added to the index
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Apr 3 2024, 18:36
Post #4
-terry-



Active Poster
*******
Group: Gold Star Club
Posts: 1,277
Joined: 9-August 19
Level 500 (Ponyslayer)


Updated the script.

New features:
- Links open in a new tab by default
- Category filter

The category filter allows you to only show specific gallery categories.
Because this is done client-side, sometimes there are very little galleries or tags on a page.
To fix this, the script will automatically append a couple of pages until the page is a bit fuller.

Some ways this can be used:

nudity only tags, but only in Cosplay
QUOTE
{ label: 'nudity only', params: 'w=on&a=on&s=on&filter_uid=&filter_tag=nudity+only&go=Go', category: 'Cosplay' },


any non-nude and hardcore tags outside of Cosplay and Asian Porn
QUOTE
{ label: 'non-nude | hardcore', params: 'w=on&a=on&s=on&filter_uid=&filter_tag=non-nude, hardcore&go=Go', category: 'Manga, Doujinshi, Artist CG, Western, Game CG, Image Set, Misc' },


variant set in Manga, Doujinshi, Game CG and Imageset categories
QUOTE
{ label: 'variant set', params: 'w=on&a=on&s=on&filter_uid=&filter_tag=variant+set&go=Go', category: 'Manga, Doujinshi, Game CG, Image Set, Misc' },


full color in Image Set, Game CG and Artist CG
QUOTE
{ label: 'full color', params: 'w=on&a=on&s=on&filter_uid=&filter_tag=full+color&go=Go', category: 'Image Set, Game CG, Artist CG'},


User is online!Profile CardPM
Go to the top of the page
+Quote Post


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 


Lo-Fi Version Time is now: 29th April 2024 - 23:44