Gfycat-Redirect gif to HTML5

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

当前为 2015-02-11 提交的版本,查看 最新版本

  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.11
  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, "$1");
  14. window.location.href = new_path;
  15. }