Giter Club home page Giter Club logo

safari-page-redirect's Introduction

This Safari Web Extension allows you to configure redirection for any website using regular expression.

Features

  • Per-page auto-redirection control. You can have page auto-redirected in the background or manually by clicking the extension icon.
  • Clicking a page that has no pre-existing redirection configuration triggers Options page.
  • Directly test your matching rules on the Options page.
  • Command+Shift+L to trigger manual redirection
  • Advanced features:
    • Use regular expressions and capture groups for powerful matching rules.
    • Use $1, $2, etc. in the destination URL to reference captured groups.

Example redirection rules

Origin Destination
Wikipedia Homepage -> English Wikipedia https://(www\.)?wikipedia\.org$ https://en.wikipedia.org/wiki/Main_Page
Facebook Homepage -> Facebook Groups https://www.facebook.com$ https://www.facebook.com/groups/feed/
Youtube -> Invidious https://www.youtube.com/watch\?v=(\w{11}) https://yewtu.be/watch?v=$1
Twitter -> New York Times https://twitter.com/home https://www.nytimes.com
@reddit to search reddit.com ^https://www.google.com/search\?.*q=(.+?)\+?(?:%40|&)reddit\b https://www.google.com/search?q=$1+site%3Areddit.com
@hn to search hackernews ^https://www.google.com/search\?.*q=(.+?)\+?(?:%40|&)hn\b https://www.google.com/search?q=$1+site%3Anews.ycombinator.com

Installation

  • Use XCode with Safari App Template to generate an extension project.
  • Clone this project and install dependencies with pnpm i
  • Build the project with pnpm build
  • Replace the files in XCode Extension's Resource folder with resource from dist/ folder
  • Run the project in XCode with Command + R

This extension is also available in App Store for a fee to cover App Store Account annual fee.

Download on the Mac App Store

Privacy Policy

This extension does not collect and share your data. The redirection rules configured by you are stored in your browser's local storage.

safari-page-redirect's People

Contributors

tuan avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.