Greasy Fork is available in English.
Show video controls on mouse hover
当前为
// ==UserScript==
// @name 9gag.com video controls on hover
// @namespace pl.srsbiz
// @description Show video controls on mouse hover
// @include https://9gag.com/*
// @require https://code.jquery.com/jquery-3.7.1.slim.min.js
// @grant none
// @version 0.0.1.20250713082501
// ==/UserScript==
jQuery(document).ready(function($){
var attachVideoControls = function(){
var containers = $('#list-view-2,#individual-post,.listview,.post-page');
if (containers.length) {
containers.on('mouseenter', 'video', function(evt){
$(this).prop('controls', true);
}).on('mouseleave', 'video', function(evt){
$(this).prop('controls', false);
});
} else {
window.setTimeout(attachVideoControls, 250);
}
};
window.setTimeout(attachVideoControls, 250);
});