vrporn.com player resized to full width

vrporn.com resized player to full width

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

You will need to install an extension such as Tampermonkey to install this script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

// ==UserScript==
// @name     vrporn.com player resized to full width
// @description vrporn.com resized player to full width
// @version  3
// @grant    none
// @include  https://vrporn.com/*
// @include  https://www.vrporn.com/*
// @namespace https://greasyfork.org/users/1079192
// ==/UserScript==


window.addEventListener('load', function() {
  setStyles();
}, false);


window.addEventListener('visibilitychange', function() {
  setStyles();
}, false);


window.addEventListener('resize', function() {
  setStyles();
}, false);


function setStyles(){
	var video_player = document.getElementById("dl8videoplayer");
  if (video_player !== null && video_player !== undefined){
    video_player.style.width = "99vw";
    video_player.style.height = "90vh";
    video_player.style.maxHeight = "unset";

    var content = document.getElementsByClassName("content-sidebar-wrap")[0];
    content.style.position = "absolute";
    content.style.left = content.style.right = "0.5vw";
    content.style.width = "100vw";
    content.style.paddingLeft = content.style.paddingRight = "0px";

    var wr_video = document.getElementsByClassName("wr-video")[0];
    wr_video.style.height = "100vh";
    wr_video.style.width = "100vw";
  }
}