Video controls on hover for i.imgur.com

Show video controls on mouse hover for for imgur.com

目前为 2019-12-11 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name Video controls on hover for i.imgur.com
  3. // @description Show video controls on mouse hover for for imgur.com
  4. // @include https://i.imgur.com/*
  5. // @grant none
  6. // @icon https://imgur.com/favicon.ico
  7. // @require https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js
  8. // @author flowscript
  9. // @version 1.0
  10. // @namespace https://gf.qytechs.cn/users/158563
  11. // ==/UserScript==
  12.  
  13. jQuery(document).ready(function($){
  14. var attachVideoControls = function(){
  15. var containers = $('.video-container');
  16. if (containers.length) {
  17. containers.on('mouseenter', 'video', function(evt){
  18. $(this).prop('controls', true);
  19. }).on('mouseleave', 'video', function(evt){
  20. $(this).prop('controls', false);
  21. });
  22. } else {
  23. window.setTimeout(attachVideoControls, 250);
  24. }
  25. };
  26. window.setTimeout(attachVideoControls, 250);
  27. });

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址