mirrorVideo

点一下,把视频左右反过来

  1. // ==UserScript==
  2. // @name mirrorVideo
  3. // @name:zh-CN 视频镜像器
  4. // @namespace leizingyiu.net
  5. // @match *://*.*/*
  6. // @grant GM_registerMenuCommand
  7. // @version 2022/10/23 03:12:18
  8. // @author leizingyiu
  9. // @description 点一下,把视频左右反过来
  10. // @license GNU AGPLv3
  11. // ==/UserScript==
  12.  
  13. function mirrorVideo(){
  14. let styleId='yiu_video_mirror';
  15. if(document.getElementById(styleId)){
  16. document.body.removeChild(document.getElementById(styleId));
  17. }else{
  18. let style=document.createElement('style');
  19. style.id=styleId;
  20. style.innerHTML=`video{transform: scale(-1,1);}`;
  21. document.body.appendChild(style);}
  22. }
  23.  
  24. GM_registerMenuCommand ('mirror videos', mirrorVideo, 'V');