Advertisement
Guest User

fishtank.live fullscreen

a guest
Apr 25th, 2023
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.68 KB | None | 0 0
  1. // ==UserScript==
  2. // @name Fishtank Fullscreen
  3. // @namespace Violentmonkey Scripts
  4. // @match *://*.fishtank.live/*
  5. // @grant none
  6. // @version 1.0
  7. // @author /tv/ anon
  8. // @description 4/25/2023, 3:26:12 PM
  9. // @require https://raw.githubusercontent.com/uzairfarooq/arrive/master/minified/arrive.min.js
  10. // ==/UserScript==
  11.  
  12. document.arrive(".LiveStreamsControls_prev-next__pbktS", function(controls) {
  13. const fullScreenBtn = document.createElement("button");
  14. fullScreenBtn.className = "fullscreen-btn";
  15.  
  16. const fullScreenIcon = document.createElement("div");
  17. fullScreenIcon.className = "Icon_icon__rliEl";
  18.  
  19. const fullScreenSvg = `
  20. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24px" height="24px">
  21. <path style="fill:currentcolor;" d="M 1.199219 1.199219 L 1.199219 8.398438 L 3.601562 8.398438 L 3.601562 3.601562 L 8.398438 3.601562 L 8.398438 1.199219 Z M 3.601562 15.601562 L 1.199219 15.601562 L 1.199219 22.800781 L 8.398438 22.800781 L 8.398438 20.398438 L 3.601562 20.398438 Z M 20.398438 20.398438 L 15.601562 20.398438 L 15.601562 22.800781 L 22.800781 22.800781 L 22.800781 15.601562 L 20.398438 15.601562 Z M 20.398438 1.199219 L 15.601562 1.199219 L 15.601562 3.601562 L 20.398438 3.601562 L 20.398438 8.398438 L 22.800781 8.398438 L 22.800781 1.199219 Z M 20.398438 1.199219 "/>
  22. </svg>
  23. `;
  24.  
  25. fullScreenIcon.insertAdjacentHTML("afterbegin", fullScreenSvg);
  26.  
  27. fullScreenBtn.appendChild(fullScreenIcon);
  28. controls.appendChild(fullScreenBtn);
  29.  
  30. fullScreenBtn.onclick = () => document.querySelector(".LiveStreamsCloudflarePlayer_live-streams-player__OCZ2v iframe").requestFullscreen();
  31. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement