Advertisement
Guest User

Untitled

a guest
May 9th, 2020
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. un petit script à moitié pourri que j'adore : permet de sortir du mode plein écran des vidéos avec un clic milieu
  2.  
  3. [fixed]// ==UserScript==
  4. // @name fullscreen
  5. // @namespace roger21.free.fr
  6. // @icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgAQAAAABbAUdZAAAALElEQVR42mP4DwQMaMQHg8P8EOLz%2F%2F%2FnIcR%2FOPEZpARGUEH2w2EefgiBxS0ARNpzyS9f0t0AAAAASUVORK5CYII%3D
  7. // @include *
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. function exit_fs(e) {
  12. if(e.button === 1 && document.fullscreenElement !== null) {
  13. e.preventDefault();
  14. e.stopPropagation();
  15. document.exitFullscreen();
  16. }
  17. }
  18. document.addEventListener("mouseup", exit_fs, true);[/fixed]
  19. marche pas avec gm, marche par sur le player de twitter, peut poser des problèmes suivant les players et il me semble que ça fait des catastrophes si on le combine avec f11 ... mais sinon ça marche nickel :o
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement