gfycat redirect to mp4

takes you straight to the file

  1. // ==UserScript==
  2. //
  3. // @name gfycat redirect to mp4
  4. // @namespace gfycatmp4redirect
  5. // @description takes you straight to the file
  6. // @version 0
  7. // @author h
  8. // @match http://gfycat.com/*
  9. // @match https://gfycat.com/*
  10. // @grant none
  11. // @run-at document-start
  12. //
  13. // ==/UserScript==
  14.  
  15. if (window.location.href.indexOf("gifs/detail") > 0){
  16. window.location = window.location.href.replace(/gifs\/detail\//,"");
  17. }
  18. else{
  19. var mp4 = document.getElementById('mp4Source').src;
  20. location.assign(mp4);
  21. }