Last active
September 2, 2016 06:34
-
-
Save usrme/fe5f95f8dad094b75b0596fb07270154 to your computer and use it in GitHub Desktop.
[GreaseMonkey] Remove AMP from URI for native desktop design
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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