This userscript adds a bunch of new and useful quality-of-life features to MSPFA.
This script is not compatible with Greasemonkey. Tampermonkey is the recommended extension for use.
Adventure page drafts
In the page editor, you'll notice that there's now a button called [Draft]. This button allows you to save a draft version to upload later. To save a draft, click [Draft], then [Save New]. To load in a previously saved draft, click [Draft], then [Load], and [Yes].
You can also export your saved drafts for an adventure by clicking the [Saved Drafts] button near the top, which allows you to copy and paste the data elsewhere, or download it for safekeeping. You can also load in data from here.
Default spoiler values, and buttonless spoilers
By setting your default spoiler values in the page editor, they'll automatically fill to that when you click the button to make a spoiler! In addition, buttonless spoilers, similar to HS^2 dialogue boxes, are able to be found right next to the spoiler button! If you select text, then add a buttonless spoiler, it'll encase it in the code!
Edit pages button
If you're reading your adventure and you want to edit a page, you can go down to the Adventure Info spoiler, and click the edit pages button to hop into the page editor right to where you need to go.
MY MSPFA dropdown menu
The MY MSPFA link on the nav bar now has a dropdown menu that allows you to navigate faster.
If you have this enabled in the settings (it is by default), the images for one page before and after the one you're on will load in advance.
User/Adventure creation dates
User profiles and adventures will show their initial date of creation.
More user stats
In addition to the user creation dates, you can also see a total of how many adventures they've made, as well as (if they have favourites public) the amount of adventures they have favourited.
Hash URL search
Normally when you append a #infobox or something to the end of a URL on MSPFA, it doesn't work or take you anywhere. Now, you can use hash URLs to hop right to a page you want! #commentbox, #latestpages, #infobox for an adventure, and you can even do it in the page editor! There, you can use #pNUM to jump to where you need to go!
Message management buttons
Three new buttons:
[Select Read] selects all notifications which are marked as read.
[Select Same] selects all notifications from the same adventure which already appear.
[Prune] deletes all messages that fall under the parameters you give it (read/unread/all, age)
They're back! By going into the user settings, you can choose from six default themes and you can even apply your own via URL!
Nearest Neighbour scaling
Under settings, enable nearest neighbour image scaling to make resized images keep their pixels instead of becoming fuzzy. This is more useful for larger monitors, or those who have their screen scaled up.
Click the MSPFA head at the bottom of the page to enable/disable night mode. It uses the same theme as dark mode, but it's easier to access for nighttime viewing.
By enabling this option in the user settings, all spoiler boxes in an adventure will be open by default. (You can still close them)
Automatic 502 error reloading
If enabled in the settings (it is by default), whenever the page redirects to a Cloudflare 502 error, it reloads the page automatically, saving you one singular key press. Having this enabled will also reload when you get a message saying you're sending data too quickly.
Note: this does not affect 502 dialog errors.
Word/Character count statistics
While on an adventure's Search page, you'll be able to see rough statistics of how many words and characters are used. Commands, page content, and custom spoiler button text all count, but not BBCode or the like.
Most buttons like the "Edit info" button and such type are now able to be opened in a new tab by conventional means. You no longer have to regularly click on the button to open it.
Beside the comment gear, you'll see a reply button. Clicking it will add a user mention at the start of your comment.
Script update notifications
Whenever this script is updated, you'll receive a dialog popup on the site. These notifications will only appear once per update, and you can turn them off by clicking the "Opt-out" button, or by going into your user settings. If you want to see the most recent update again, click "View Update" at the bottom of the page.
Export adventure data
In your adventure's info page, you'll see a new button labeled "Export Data". Clicking it will allow you to download a .JSON file with your adventure's data.
Under Edit Adventures, you can now find some user-created guides to help with creating your adventure.
Search results amount
You can now see how many total results exist for your search in the explore page.
Quick search bar
When you hover over "Explore", a search bar will appear, and if your search only has one result, it'll take you to that result.
Scroll to nav on page change
When going back or forth pages in an adventure, the page will scroll to the nav bar instead of back to the top. This option can be found in settings.
Text error fixes (experimental)
Automatically tries to fix text errors on old adventures. For most adventures, it will not work and there isn't much I can do.