@ -23,6 +23,7 @@ For the same reason as the last question. That's how the `@match` directives are
## TODO
- ~~Figure out why it doesn't work on Firefox~~
- It's because the `@run-at context-menu` header only works in Chrome based browsers. The context menu item *appears* in Firefox but doesn't do anything. Find a workaraound
- ~~It's because the `@run-at context-menu` header only works in Chrome based browsers. The context menu item *appears* in Firefox but doesn't do anything. Find a workaraound~~
- It's actually because of something extremely different and much, much weirder. `@run-at context-menu` actually does exist in Firefox now, but there's a bizarre CSP enforcement bug that causes Firefox issues. Details on the installation page
- Don't rely on parsing human-readable text, won't work in other languages
- There's no good API or anything for this, going to need to parse the document structure
<figure><imgsrc="ria.png"alt="The userscript in action, suspending badfaith.instance."/><figcaption>Quickly suspend or silence remote instances from the Mastodon frontend</figure>
<divid="prereqs"><h2>Prerequisites</h2>
<p>Ensure Tampermonkey is installed: <ahref="https://www.tampermonkey.net/">Tampermonkey Home Page</a><ahref="https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo">Chrome Extension</a><s><ahref="https://addons.mozilla.org/en-US/firefox/addon/tampermonkey/">Firefox Add-On</a></s></p>
<p>Ensure Tampermonkey is installed: <ahref="https://www.tampermonkey.net/">Tampermonkey Home Page</a><ahref="https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo">Chrome Extension</a><ahref="https://addons.mozilla.org/en-US/firefox/addon/tampermonkey/">Firefox Add-On</a></p>
<p>At time of writing, the script doesn't work in Firefox and I'm not sure how to fix it. Looking for a workaround.</p></div>
<p><aid="firefoxnote-link"href="#firefoxnote"><strong>Extremely important note for Firefox users! Read this or the script WILL NOT WORK!</strong></a></p></div>
<p>Enter each instance you wish to use the script on. This should be just "domain.tld", no extra formatting. One domain per line.</p>
@ -30,7 +32,7 @@
<divid="faq"><h2>FAQ</h2>
<h3>What's this?</h2>
<divid="whatsthis"><h3>What's this?</h2>
<p>Remote Instance Actions is a userscript I've written to aid in Mastodon moderation.</p>
@ -44,7 +46,7 @@
<p>A userscript is sort of like a browser extension, but smaller! Just a little bit of Javascript code that gets run on certain pages to enhance the experience.</p>
<p>Of course, most browsers do actually need a browser extension to run userscripts. The most popular and feature-complete one by far (as well as the one this userscript was tested with!) is Tampermonkey.</p>
<p>Of course, most browsers do actually need a browser extension to run userscripts. The most popular and feature-complete one by far (as well as the one this userscript was tested with!) is Tampermonkey.</p></div>
<divid="whyform"><h3>It's just a userscript? Why the complex installation process?</h3>
@ -58,15 +60,33 @@
<p>*This is not technically true, you can also match URLs with regular expressions. But anything that would match any Mastodon instance is going to have a lot of false positives, and I believe Tampermonkey throws up a big scary warning if you do this anyway.</p></div>
<h3>Can I see the source code?</h3>
<divid="source"><h3>Can I see the source code?</h3>
<p>Well, your browser will show you the code before installing, but if you want to inspect it it's available on <ahref="https://git.hollymcfarland.com/monorail/remote_instance_actions">my gitea instance</a>.
<p>Well, your browser will show you the code before installing, but if you want to inspect it it's available on <ahref="https://git.hollymcfarland.com/monorail/remote_instance_actions">my gitea instance</a>.</div>
<h3>How can I contact you?</h3>
<divid="contact"><h3>How can I contact you?</h3>
<p>If you're on the fediverse, I can be found at <ahref="https://glaceon.social/@monorail">@monorail@glaceon.social</a>.</p>
<p>If you aren't... How exactly did you get here?</p></div>
<hr>
<divid="firefoxnote"><h2>Note For Firefox Users</h2>
<p>There's currently an extremely weird bug somewhere in the intersection of Tampermonkey and Firefox. I've managed to find a few reports of it occuring for other people, but only in the context of other issues that have since been closed. I have no idea what causes it, but there is a workaround.</p>
<p>Simply, your web browser has some security features built in to prevent any code that's not "supposed to be there" from executing. Tampermonkey is supposed to still be able to execute despite this, but something super weird and beyond my understanding is getting in its way. But for whatever reason, reloading the page <em>without your cache</em> fixes it. I can't explain why, but I can explain how to do it.</p>
<h4>At any point before using the script, press Ctrl+F5 to "hard refresh", reloading the page without using the cache. When you do, the script will work until the next time the page is loaded.</h4>
<p>Hopefully this issue is solved in the future, and this workaround stops being needed.</p>
<p>There is a way to work around the bug in a more permanent way, but it comes with some security risks. In fact, it's dangerous enough that I don't feel comfortable explaining how to do it here. But if you know what you're doing: Disabling CSP enforcement should allow the script to work.</p></div></div>
<hr>
<h4><aid="top-link"href="#top">Back to top</a></h4>