Greasy Fork is available in English.

Radioitalia fullscreen

Add a fullscreen button for a radioitalia website

  1. // ==UserScript==
  2. // @name Radioitalia fullscreen
  3. // @namespace https://www.radioitalia.it/
  4. // @version 0.1
  5. // @description Add a fullscreen button for a radioitalia website
  6. // @author You
  7. // @match https://www.radioitalia.it/
  8. // @icon https://www.google.com/s2/favicons?sz=64&domain=tampermonkey.net
  9. // @grant none
  10. // @license MIT
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15.  
  16. const videoId = 'RadioItaliaPlayer_html5_api';
  17.  
  18. const button = document.createElement('button');
  19. button.innerText = 'Fullscreen';
  20. button.style.position = 'absolute';
  21. button.style.right = '100px';
  22. button.style.bottom = '100px';
  23. button.onclick = () => {
  24. const video = document.getElementById(videoId);
  25. video.requestFullscreen();
  26. };
  27.  
  28. button.style.zIndex = 1000;
  29. document.body.appendChild(button);
  30. // Your code here...
  31. })();