GfyCat Redirect to WebM Video File

Automatically promotes GfyCat gif pages to raw WebM video

As of 2017-08-21. See the latest version.

// ==UserScript==
// @name         GfyCat Redirect to WebM Video File
// @namespace    gfycatVideoRedirect_kk
// @description  Automatically promotes GfyCat gif pages to raw WebM video
// @version      0.1
// @author       Kai Krause <kaikrause95@gmail.com>
// @match        http://gfycat.com/*
// @match        https://gfycat.com/*
// @grant        none
// @run-at       document-end
// ==/UserScript==

var webm = document.getElementById('webmSource').src;
var mp4 = document.getElementById('mp4Source').src;
if (webm) {
	location.assign(webm);
} else if (mp4) {
	location.assign(mp4);
}