Gfycat-Redirect gif to HTML5

Redirects giant or fat.gfycat.com hyperlinks to their HTML 5 video counterpart

  1. // ==UserScript==
  2. // @name Gfycat-Redirect gif to HTML5
  3. // @namespace https://greasyfork.org/en/users/9009
  4. // @description Redirects giant or fat.gfycat.com hyperlinks to their HTML 5 video counterpart
  5. // @version 1.13
  6. // @include http://*.gfycat.com/*
  7. // @include https://*.gfycat.com/*
  8. // @grant none
  9. //
  10. // ==/UserScript==
  11.  
  12. if (window.location.href.match(/^https?:\/\/(giant|fat)\.gfycat\.com\/[A-Za-z0-9]+.gif$/)) {
  13. var new_path = window.location.href.replace(/(giant|fat)\.(.*)\.gif/i, "$2");
  14. window.location.href = new_path;
  15. }