Last active
December 15, 2025 06:41
-
-
Save donal56/01a09b0dd113be1972256682d0e1f02f to your computer and use it in GitHub Desktop.
custom-mfc.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name Custom MFC | |
| // @namespace http://tampermonkey.net/ | |
| // @version 2025-12-15 | |
| // @description MyFigureCollection Custom Behaviours - Keep search term after getting results | |
| // @match https://myfigurecollection.net/* | |
| // @icon https://static.myfigurecollection.net/ressources/assets/webicon.png | |
| // @grant none | |
| // ==/UserScript== | |
| (function() { | |
| 'use strict'; | |
| const searchBox = document.querySelector("form.tbx-get-form input[name=keywords]"); | |
| if(searchBox && window.location.search) { | |
| let queryParameter = window.location.search.substring(1) | |
| .split("&").find(x => x.startsWith("keywords=")); | |
| if(queryParameter) { | |
| let searchTerm = queryParameter.replace("keywords=", "").replaceAll("+", " "); | |
| searchBox.value = decodeURIComponent(searchTerm); | |
| } | |
| } | |
| })(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment