Skip to content

Instantly share code, notes, and snippets.

@RicoP
Last active July 5, 2016 20:31
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 RicoP/3a771da1f058535e01283f538994c44f to your computer and use it in GitHub Desktop.
Save RicoP/3a771da1f058535e01283f538994c44f to your computer and use it in GitHub Desktop.
(function () {
var links = document.getElementsByTagName("a")
var regex = /imgur.com.*gif$/ig
for(var i = 0; i != links.length; ++i) {
var href = links[i].href;
if(regex.test(href))
{
links[i].setAttribute('href', href + "v");
console.log(href)
}
}
})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment