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.
You can also toggle redirecting entirely by right-clicking the
extension icon and clicking "Toggle all redirects". This will show a
✗ next to the extension icon indicating Re-Nav is turned off.
To remove a redirect click the red button with the ✗ twice.
Sharing & importing redirects:
To share a redirect, click on the button with the clipboard 📋 icon.
This will copy a link that you can share around.
When you or someone else heads to a share link, it will show the
redirect's details and if they have Re-Nav installed it will create
an import button on the page.
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.
If your currently active tab is a website that has a redirect
associated with it, then redirects for that website won't happen
when you click on links or open new tabs from there.
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/
${'^(?https://holllo\\.org)/(?1)-(?2)$'}
https://holllo.org/1-2
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
Regex2
${'$/$-$'}
https://holllo.org/1-2
https://holllo.org/2-1
The bold highlighted text shows what will be changed.
The regex redirect only works in combination with the regex matcher,
as the regex matcher will be used for the capturing groups.