Skip to content

Instantly share code, notes, and snippets.

@Venipa
Created September 16, 2021 17:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Venipa/1c2c7f014bccec1ce66a237f64059a9f to your computer and use it in GitHub Desktop.
Save Venipa/1c2c7f014bccec1ce66a237f64059a9f to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name 9gag HTML5 Video
// @namespace https://venipa.net
// @version 0.1
// @description try to take over the world!
// @author Venipa
// @match https://9gag.com/*
// @icon https://www.google.com/s2/favicons?domain=9gag.com
// @grant unsafeWindow
// ==/UserScript==
/* jshint esversion: 6 */
(function() {
'use strict';
function checkVideo(video) {
if (!video.controls) video.controls = true;
if (video.style.zIndex == '') video.style.zIndex = '2';
if (video.volume == 1) video.volume = 0.1;
}
(function(video, check){
var fn = video.play;
video.play = function() {
if (this.hasAttribute("preload")) {
check(this);
}
return fn.apply(this, arguments);
};
})(unsafeWindow.HTMLVideoElement.prototype, checkVideo);
})();
@Venipa
Copy link
Author

Venipa commented Sep 16, 2021

Press on the video while saving you from ear rape
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment