Last active
April 24, 2023 04:08
-
-
Save FERR1TE/e9c598b50829b067380b8df33795ebb5 to your computer and use it in GitHub Desktop.
Custom buttons for FA's nav bar for frequent searches
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Custom FA Search Buttons
What this script does
It adds custom, user-defined search buttons to the right of the search box. They can be used as shortcuts for frequent and/or complex searches.
![image](https://user-images.githubusercontent.com/69188984/163544077-9e1eeecf-04cc-4dab-b92d-cbc4c12dc80d.png)
You can test the default ones here:
Installation
Config
To edit the buttons that appear, see
customButtons
. Add searches in the form"Display text": "Search"
where Display text is what text the button shows and Search is what the script searches for. You can add as few or as many as you like, so long as they're separated by commas.You can also edit the
globalSuffix
variable to edit settings applied to all searches. The one included by default sorts by newest, and removes every submission type that isn't art.If you want to add more complex behaviour, you can change
globalPrefix
to be blank. You'll have to manually add/search/?q=
to any searches, but you can then also specify other URLs such as profile pages, submissions, or even external links if you really want.This script can be used to blacklist search terms or users, but I'd recommend using it in conjunction with Filter Affinity instead (Chrome, Firefox).
Known Bugs
Currently, if you try to navigate backwards (with the browser's back button) during a search, some browsers may show a "Document Expired" error each time.This appears to have been fixed at around Tampermonkey v4.16.6160.