clarify something that's not technically true
This commit is contained in:
parent
32c27201d8
commit
8dae3f22a2
|
|
@ -46,7 +46,7 @@
|
|||
|
||||
<div id="whyform"><h3>It's just a userscript? Why the complex installation process?</h3>
|
||||
|
||||
<p>When writing a userscript, you have to hardcode in the URL of websites it will work on. That's fine for, say, Twitter, where it's always found at "twitter.com" (for the time being, anyway). Mastodon instances are a lot harder to write for. If I wrote it to, for example, check if the current page is a Mastodon instance and conditionally add the context menu item, it would have to run on <em>every page you visit</em> to make that check.</p>
|
||||
<p>When writing a userscript, you have to hardcode in the URL of websites it will work on*. That's fine for, say, Twitter, where it's always found at "twitter.com" (for the time being, anyway). Mastodon instances are a lot harder to write for. If I wrote it to, for example, check if the current page is a Mastodon instance and conditionally add the context menu item, it would have to run on <em>every page you visit</em> to make that check.</p>
|
||||
|
||||
<p>The usual way to solve this problem is to just tell the user to modify the userscript to add the pages you'd like it to run on. That sucks for a number of reasons. The most obvious are that users don't want to have to go in and mess with the code, and that it breaks with Tampermonkey's update functionality. This page here is my overengineered solution.</p>
|
||||
|
||||
|
|
@ -54,6 +54,8 @@
|
|||
|
||||
<p>The slightly less technical answer is that using this install page generates the userscript with the proper domains set on the fly, and does so in a way such that Tampermonkey will fetch updates that are generated with the same domains.</p></div>
|
||||
|
||||
<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>
|
||||
|
||||
<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 <a href="https://git.hollymcfarland.com/monorail/remote_instance_actions">my gitea instance</a>.
|
||||
|
|
|
|||
Loading…
Reference in New Issue