Skip to content

Instantly share code, notes, and snippets.

@usrme
Last active September 2, 2016 06:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save usrme/fe5f95f8dad094b75b0596fb07270154 to your computer and use it in GitHub Desktop.
Save usrme/fe5f95f8dad094b75b0596fb07270154 to your computer and use it in GitHub Desktop.
[GreaseMonkey] Remove AMP from URI for native desktop design
// ==UserScript==
// @name Remove AMP
// @namespace https://github.com/usrme
// @description Remove AMP from URI for native desktop design
// @include http*://*techcrunch.com/*
// @include http*://*theregister.co.uk/*
// @include http*://*theverge.com/*
// @include http*://*vox.com/*
// @include http*://*css-tricks.com/*
// @include http*://*howtogeek.com/*
// @version 1
// @grant none
// ==/UserScript==
let uri = window.location.href,
regexp = /(\/platform)?\/amp/gi;
if (uri.match(regexp)) {
let out = uri.replace(regexp, "");
window.location.href = out;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment