GfyCat Redirect to WebM Video File

Automatically promotes GfyCat gif pages to raw WebM video

当前为 2017-08-21 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name GfyCat Redirect to WebM Video File
  3. // @namespace gfycatVideoRedirect_kk
  4. // @description Automatically promotes GfyCat gif pages to raw WebM video
  5. // @version 0.1
  6. // @author Kai Krause <kaikrause95@gmail.com>
  7. // @match http://gfycat.com/*
  8. // @match https://gfycat.com/*
  9. // @grant none
  10. // @run-at document-end
  11. // ==/UserScript==
  12.  
  13. var webm = document.getElementById('webmSource').src;
  14. var mp4 = document.getElementById('mp4Source').src;
  15. if (webm) {
  16. location.assign(webm);
  17. } else if (mp4) {
  18. location.assign(mp4);
  19. }