Last active
August 29, 2015 14:13
-
-
Save cmaggard/595b314359d615d8c49c to your computer and use it in GitHub Desktop.
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 Reddit imgur Gif->Gifv-ifier | |
// @namespace https://gist.github.com/cmaggard/595b314359d615d8c49c | |
// @version 0.1 | |
// @description Turns direct links to gifs on imgur into gifvs | |
// @author Cody Maggard | |
// @match http://*.reddit.com/* | |
// @grant none | |
// ==/UserScript== | |
regex = /imgur.com(.+)(\.gif([^v]|$))/ | |
$(".entry a.title").each(function(i, e) { | |
if (this.href.match(regex)) { | |
this.href = this.href.replace('.gif', '.gifv'); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment