• Stars
    star
    1,508
  • Rank 31,101 (Top 0.7 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 13 years ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Browser extension (Firefox, Chrome, Opera, Edge) to redirect urls based on regex patterns, like a client side mod_rewrite.

Description

Web browser extension (Firefox, Vivaldi, Chrome, Opera, Edge) to redirect URLs based on regex or wildcard patterns.

Tribute

In loving memory of Einar Egilsson, who gave us Redirector and selflessly nurtured it for many years. We miss you Einar, and will always remember your kindness and generosity.

Download Links

Examples

De-mobilizer

  • Example URL: https://en.m.wikipedia.org/
  • Include pattern: ^(https?://)([a-z0-9-]*\.)m(?:obile)?\.(.*)
  • Redirect to: $1$2$3
  • Pattern type: Regular Expression
  • Description: Always show the desktop site of a webpage

AMP redirect

  • Example URL: https://www.google.com/amp/www.example.com/amp/document
  • Include pattern: ^(?:https?://)www.(?:google|bing).com/amp/(?:s/)?(.*)
  • Redirect to: https://$1
  • Pattern type: Regular Expression
  • Description: AMP is bad: https://80x24.net/post/the-problem-with-amp/

Doubleclick escaper

  • Example URL: https://ad.doubleclick.net/ddm/trackclk/N135005.2681608PRIVATENETWORK/B20244?https://www.example.com
  • Include pattern: ^(?:https?://)ad.doubleclick.net/.*\?(http?s://.*)
  • Redirect to: $1
  • Pattern type: Regular Expression
  • Description: Remove doubleclick link tracking / fix problems with doubleclick host based blocking

YouTube Shorts to YouTube

  • Example URL: https://www.youtube.com/shorts/video-id
  • Include pattern: ^(?:https?://)(?:www.)?youtube.com/shorts/([a-zA-Z0-9_-]+)(.*)
  • Redirect to: https://www.youtube.com/watch?v=$1$2
  • Pattern type: Regular Expression
  • Description: Redirect YouTube Shorts to regular YouTube

Fun with !bangs

What are bangs?: https://duckduckgo.com/bangs

Use DuckDuckGo.com !bangs on Google

  • Example URL: https://www.google.com/search?&ei=-FvkXcOVMo6RRwW5p5DgBg&q=asdfasdf%21+sadfas&oq=%21asdfasdf+sadfas&gs_l=asdfsadfafsgaf
  • Include pattern: ^(?:https?://)(?:www.)google\.(?:com|au|de|co\.uk)/search\?(?:.*)?(?:oq|q)=([^\&]*\+)?((?:%21|!)[^\&]*)
  • Redirect to: https://duckduckgo.com/?q=$1$2
  • Pattern type: Regular Expression
  • Description: Redirect any Google query with a !bang to DDG

Custom DuckDuckGo.com !bangs

DDG !example Base

  • Example URL: https://duckduckgo.com/?q=!example&get=other
  • Include pattern: ^(?:https?://)(?:.*\.)?duckduckgo.com/\?q=(?:%21|!)example(?=[^\+]|$)(?=\W|$)
  • Redirect to: https://example.com/
  • Pattern type: Regular Expression
  • Description: Redirect to the base site when !bang is the only search parameter

DDG !example Search

  • Example URL: https://duckduckgo.com/?q=searchterm+!example+searchterm2&get=other
  • Include pattern: ^(?:https?://)(?:.*\.)?duckduckgo.com/\?q=(.*\+)?(?:(?:%21|!)example)(?:\+([^\&\?\#]*))?(?:\W|$)
  • Redirect to: https://example.com/?query=$1$2
  • Pattern type: Regular Expression
  • Description: Redirect to custom site search

DDG !ghh git-history

  • Example URL: https://duckduckgo.com/?q=!ghh+https%3A%2F%2Fgithub.com%2Fbabel%2Fbabel%2Fblob%2Fmaster%2Fpackages%2Fbabel-core%2FREADME.md&adfasfasd
  • Include pattern: ^(?:https?://)duckduckgo.com/\?q=(?:(?:%21|!)ghh\+)(?:.*)(github|gitlab|bitbucket)(?:\.org|\.com)(.*?(?=\&))
  • Redirect to: https://$1.githistory.xyz$2
  • Pattern type: Regular Expression
  • Description: Create new !ghh bang that redirects to https://githistory.xyz
  • Advanced:
    • Process matches: URL decode

Dark Theme

If you are a Firefox user and use a dark theme, you can add these lines to your userChrome.css file to make Redirector's extension button more visible:

/* Redirector button for dark Firefox themes */
toolbarbutton#toggle-button--redirectoreinaregilssoncom-redirector[image*="active"] { filter: invert(1) brightness(6); }
toolbarbutton#toggle-button--redirectoreinaregilssoncom-redirector[image*="disabled"] { filter: invert(1) brightness(2.5); }

If you don't know what the userChrome.css file is, or how to edit it, please look it up on a Firefox forum instead of asking about it in this repository. Thanks!

More Repositories

1

beanstalk-deploy

GitHub action (and command line script) to deploy apps to Elastic Beanstalk
JavaScript
615
star
2

cards.js

Javascript library for card games.
JavaScript
268
star
3

build-number

GitHub action for generating sequential build numbers.
JavaScript
138
star
4

ChordImageGenerator

A .NET library to generate images of guitar chords.
C#
70
star
5

InsertIcons

Simple tool to add multiple win32 icons to .NET assemblies
C#
66
star
6

chord.js

Javascript library to render images of guitar and ukulele chords
JavaScript
56
star
7

StopOnFirstBuildError

Visual Studio extension to stop solution build immediately after a projects fails to build.
C#
51
star
8

sudoku.js

Sudoku Javascript library, based on Peter Norvig's solver
JavaScript
27
star
9

MyLife

MyLife: A single-user OhLife alternative
Python
26
star
10

photo16x9

Simple website to pad out images so they fit an aspect ratio of 16x9
HTML
18
star
11

While-Language

A .NET compiler for the While Language, a programming language used in Program Analysis courses
C#
13
star
12

ClipboardDiff

VS extension to diff the selected text against the clipboard
C#
11
star
13

s3-list-all-objects

NPM package to list all objects in a S3 bucket.
JavaScript
6
star
14

printmysongs

Create beautiful looking song sheets with chord diagrams and tablature.
JavaScript
6
star
15

save-svg-as-png

Adds button and right click menu to Chrome to scale and save SVG images as PNG
JavaScript
6
star
16

Scroll-Search-Engines

Firefox extension to scroll through the available search engines
JavaScript
5
star
17

EventHandlerNaming

Visual Studio 2010 extension to control naming conventions for event handlers in C#.
C#
4
star
18

update-lambda-edge-function

Updates the version nr of a Lambda@Edge function to use in a Cloudfront distribution.
JavaScript
3
star
19

print-environment

Simple GitHub Action to print environment variables.
Shell
2
star
20

Process-Language-Runtime

A Process Language Runtime for the .NET Platform
C#
2
star
21

hradbankar

Source for hradbankar.is
HTML
2
star
22

roundedcorners

Tool to add rounded corners to images.
HTML
2
star
23

einaregilsson.com

Source for einaregilsson.com
HTML
2
star
24

gulp-global-exclude

Global exclude patterns for gulp.src and gulp.watch.
JavaScript
2
star