So I've been sitting on this a while, finally getting around to posting, looks like user_418213 had a similar idea in the meantime; mine's based on querystring rather than localstorage though, allowing it to manipulate per search as well...
.
.
Requested feature overview description.
Blacklist control via search terms:
1) Auto-toggling a blacklisted tag to show for the current page if the tag is in the current search/querystring tags.
2) Persisting shown blacklist tags page-to-page (search results prev/pagination/next, post view search terms header prev/next, post view pool header prev/next)
3) Ability to toggle blacklist off via search term (without persisting across all site pages)
.
.
Why would it be useful?
- Temporarily allowing blacklisted posts (all or via keyword) to be visible via search (and bookmarks via querystring)
- Persisting single/multiple disabled blacklisted tags when browsing page-to-page, post-to-post or when reading through a pool without toggling blacklist off
- Showing blacklisted posts if in conjunction with search keywords (eg. rabbit blacklisted, user searches for wolf +rabbit, site returns posts with wolf but posts with rabbit are not blacklisted in results, functionality explained more below)
.
.
What part(s) of the site page(s) are affected?
Pages that make use of tag searching and blacklist toggling (Backend Post Search Handler, Posts Listing Page, Pools Gallery Page, Pool View Page, Post View Page, any other pages making use of blacklist toggles if desired, potentially the Advanced Options Page if an option to enable/disable functionality is desired)
.
.
Details / Proposed method
For below, assume a user has tags A, B & C blacklisted
- If searching for: D B
Server side: find all posts with D & B (how it currently works)
Client side: same as normal, but toggle blacklisted tags list to not hide posts with tag B
- New search functionality, tags prefixed with "+"
If searching for: D +B
Server side: find all posts with D (ignore all search terms starting with +)
Client side: same as normal, but toggle blacklisted tags list to not hide posts with tag B
- Toggling blacklisted tags via Pools Gallery Page or Pool View Page:
For each Pool/Post view link & Pagination link on those pages, append "?tags=" with list of each toggled blacklisted tag as +tag, so those pages know to disable those blacklisted tags when viewed (so user doesn't have to toggle the blacklisted items each time)
- New search manipulator: blacklist:false
(or potentially -blacklist:username instead and only work for that logged in user, like "favoritedby:username" to prevent users from clicking other's links and potentially seeing posts that they would have had blacklisted)
Server side: same as current, and ignore "blacklist:false"
Client side: toggle blacklisted tags list "Disable all" (but not global/persistent, only applies to this search and any posts viewed where this manipulator is in query string, i.e. posts clicked on from this search) (add option above Blacklist "Disable all"/"Re-enable all" called "Pagination Mode" to add it to link querystrings?)
- When blacklist items are toggled (by search, querystring or by user clicking on them) ...
Add these tags to Post Page top Search/Pools "Last"/"Next" links as "?tags=" with +tag so it persists from page to page; when user clicks on tag in blacklist to stop showing them, remove from "Last"/"Next" links
Also add these +tag terms in same fashion to Post/Pool Search Result Page "Previous", "Next" & Pagination links
- Potentially modify the browser's current url querystring value (via URLSearchParams) so as blacklist tags are toggled, users can bookmark a page and have it display the same when viewed again
- Should probably make an option in Advanced Options to enable these blacklist override features since it overrides blacklisted content visibility
.