Skip to content

An iOS app/Safari extension to automagically redirect AMP links to their normal counterpart. Comes with a trusty dog. An iOS app/Safari extension to automagically redirect AMP links to their normal counterpart. Comes with a trusty dog. [[FORKED: Original author @christianselig. This is simply a mirror of the last open source version]]

Notifications You must be signed in to change notification settings

3nprob/Amplosion

 
 

Repository files navigation

Amplosion ⚡️

Amplosion is an iOS 15 and greater app that automagically redirects AMP links to their normal counterpart. AMP links can be super annoying, so this helps make your web browsing experience a bunch more delightful.

Download Here

Why Open Source 🔒

Safari extensions require your permission to run, so in the interest of transparency I wanted to make the app completely open source. Amplosion's Privacy Policy already states that it's completely private (everything is handled locally, on-device) but why trust my words when you can go through the code itself? My intention is for this to serve as an extra layer of validation that Amplosion is a privacy-first app, and seeks simply to make your web browsing experience more pleasant.

How it Works 🛠

Amplosion is a Safari extension. Once enabled, when the page loads, Amplosion checks if the current page is an AMP page, and if so, reads the page headers to find the "canonical" (AKA normal) link, and redirects the browser to that page instead. Amplosion prefers the "All Websites" permission so that it can, well, fix AMP pages on any website!

The AMP redirection is all done in JavaScript. To see this AMP redirection code, it's located in Amplosion Extension > Resources. The content.js file does the majority of the heavy-lifting in terms of redirecting away from AMP. The background.js file and the SafariWebExtensionHandler.swift file act as communication layers with the main app (enabling you to add items to your Allowlist, if you so choose, for instance). Lastly the popover* files are the "UI" for the extension when you select them in Safari, showing you the current page's stats and the ability to add it to the Allowlist.

Other 🐶

While the JavaScript is the "brains" of the app, there's also an actual app component, that mostly just exists for fun. It has a pet digital dog style mini-game, plus all your stats for Amplosion, and the ability to change the app's home screen icon. There's also code for the home screen widgets in there if you're interested!

Questions? 🙋

If you have any questions or suggestions, feel free to open an issue on GitHub, or hit me up on Twitter @ChristianSelig.

License 📖

This is open source in the interest of transparency, and I hope this doesn't need to be said but please don't take this as an opportunity to reupload the code and call it your own. This is the equivalent to the GitHub "No License", so you're more than welcome to inspect the code and audit it, but you do not have permission to repurpose it as your own.

About

An iOS app/Safari extension to automagically redirect AMP links to their normal counterpart. Comes with a trusty dog. An iOS app/Safari extension to automagically redirect AMP links to their normal counterpart. Comes with a trusty dog. [[FORKED: Original author @christianselig. This is simply a mirror of the last open source version]]

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Swift 85.6%
  • HTML 7.9%
  • JavaScript 6.0%
  • CSS 0.5%