Skip to content

Instantly share code, notes, and snippets.

@cmaggard
Last active August 29, 2015 14:13
Show Gist options
  • Save cmaggard/595b314359d615d8c49c to your computer and use it in GitHub Desktop.
Save cmaggard/595b314359d615d8c49c to your computer and use it in GitHub Desktop.
// ==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