import {html} from 'htm/preact';
import {Component} from 'preact';
export default class Usage extends Component {
render() {
return html`
How do I use Re-Nav?
Creating redirects:
Click the green "Add new redirect" button.
Select a matcher type and enter what it should match on.
Select a redirect type and enter where you want to be redirected.
See the "Matchers" and "Redirects" sections below for lists of
everything available with examples.
Using redirects:
Any time you are navigated to a link by your browser, the URL will
first be checked and you will be redirected automatically.
Editing redirects:
If a redirect has been edited, a yellow border will be shown around
it.
Changes to redirects are only saved when you click the save button.
To enable or disable a redirect, click the button with the circle.
If it's filled in the redirect is enabled.
To remove a redirect click the red button with the ✗ twice.
Some miscellaneous notes:
Only URLs starting with "http" will be checked.
Navigation events won't be checked if it has been less than 100
milliseconds since the last successful redirect.
A redirect will be cancelled if the exact same redirect happened
less than 30 seconds ago. This acts as a quick bypass so you don't
have to disable redirects in the options page whenever you don't
want to be redirected.
As a quick-start you can also insert the examples from below:
Note that this will reload the page so make sure your redirects have
been saved.
Matchers
Type
Match Directive
Match Examples
Hostname
tildes.net
http://www.tildes.net/1
https://tildes.net/~creative.timasomo
Regex
HOL{3}O
https://git.bauke.xyz/holllo2
^https?://www\\.holllo\\.org/?$
https://www.holllo.org/
Hostname matchers always remove "www." automatically, for
convenience.
Regular expressions are always tested with global and
case-insensitive flags enabled.
Redirects
Type
Change To
Example URL
Redirected URL1
Hostname
nitter.net
https://twitter.com/therealTDH
https://nitter.net/therealTDH
r.nf
https://www.reddit.com/r/TheDearHunter
https://r.nf/r/TheDearHunter
Simple
https://holllo.org
https://holllo.org/home
https://holllo.org
The bold highlighted text shows what will be changed.