vrporn.com player resized to full width

vrporn.com resized player to full width

  1. // ==UserScript==
  2. // @name vrporn.com player resized to full width
  3. // @description vrporn.com resized player to full width
  4. // @version 3
  5. // @grant none
  6. // @include https://vrporn.com/*
  7. // @include https://www.vrporn.com/*
  8. // @namespace https://greasyfork.org/users/1079192
  9. // ==/UserScript==
  10.  
  11.  
  12. window.addEventListener('load', function() {
  13. setStyles();
  14. }, false);
  15.  
  16.  
  17. window.addEventListener('visibilitychange', function() {
  18. setStyles();
  19. }, false);
  20.  
  21.  
  22. window.addEventListener('resize', function() {
  23. setStyles();
  24. }, false);
  25.  
  26.  
  27. function setStyles(){
  28. var video_player = document.getElementById("dl8videoplayer");
  29. if (video_player !== null && video_player !== undefined){
  30. video_player.style.width = "99vw";
  31. video_player.style.height = "90vh";
  32. video_player.style.maxHeight = "unset";
  33.  
  34. var content = document.getElementsByClassName("content-sidebar-wrap")[0];
  35. content.style.position = "absolute";
  36. content.style.left = content.style.right = "0.5vw";
  37. content.style.width = "100vw";
  38. content.style.paddingLeft = content.style.paddingRight = "0px";
  39.  
  40. var wr_video = document.getElementsByClassName("wr-video")[0];
  41. wr_video.style.height = "100vh";
  42. wr_video.style.width = "100vw";
  43. }
  44. }