← All posts

Tutorials

Bypass link shorteners and redirect pages

You click a link and instead of the destination you land on a "wait 5 seconds" page — a countdown, an ad, a "skip" button. Shorteners and redirect pages live off those seconds of your life. This rule jumps past them for you.

How redirect pages work

The intermediary page has the destination URL somewhere on it — in the "skip" link, in an attribute, in a JS variable or in a parameter of its own address. It reveals it only after a countdown, so it has time to show an ad. Since the URL is already there, there is no reason to wait.

The rule

The rule's JavaScript, URL pattern set to the specific shortener (or * — see pitfalls):

// 1. Destination in an address parameter (?url=... ?dest=...)
const here = new URL(location.href);
let jumped = false;
for (const key of ['url', 'dest', 'target', 'r', 'u']) {
  const v = here.searchParams.get(key);
  if (!jumped && v && /^https?:/.test(v)) {
    location.replace(v);
    jumped = true;
  }
}
// 2. Destination in a visible "skip / continue" button
if (!jumped) {
  const re = /continue|skip|get link|proceed/i;
  const btn = [...document.querySelectorAll('a[href^="http"]')]
    .find(a => re.test(a.textContent || ''));
  if (btn) location.replace(btn.href);
}

How it works

Destination in a parameter

Many redirects look like redirect.com/go?url=https://target.... The rule reads parameters with common names and, if one looks like an http address, jumps there right away.

Destination in a button

When the URL is not in the address, we look for a visible link with "skip" / "continue" text pointing outward. location.replace (instead of href) does not leave the intermediary page in history — the back button works normally.

Pitfalls

See also

Install JustZix — and reclaim those five seconds on every link.

Rate this post

No ratings yet — be the first.

Try it yourself

Install JustZix and paste any snippet from this article. Two minutes from zero to a working rule across all your devices.

Get JustZix

Features · How it works · Examples · Use cases