// ==UserScript== // @name Gogoanime Expand Video // @namespace http://javalatte.xyz/ // @version 0.1.3 // @description gogoanime.se Expand main div to make video bigger without the need to be fullscreen // @author JavaLatte // @match https://*.gogoanime.se/* // @grant GM_addStyle // @downloadURL none // ==/UserScript== (function() { 'use strict'; var wStatus = '0'; // style button GM_addStyle (` #wButton { background: #ffc119; color: #FFFFFF; display: inline-block; line-height: 16px; height: 25px; padding-left: 10px; padding-right: 10px; border: unset; font-size: 12px; } #wButton:hover { cursor: pointer; } .wFull{ width:100% !important; } `); //init button var btn = document.createElement( 'button' ); btn.setAttribute( 'id', 'wButton' ); btn.innerHTML = '   Expand Video Div'; var wDiv = document.createElement( 'div' ); wDiv.setAttribute( 'id', 'wdiv' ); wDiv.setAttribute( 'class', 'favorites_book' ); wDiv.appendChild( btn ); // make Button var eleDA = document.getElementsByClassName( 'download-anime' )[ 0 ]; if(eleDA){ eleDA.appendChild( wDiv ); // activate the newly added button. document.getElementById ("wButton").addEventListener ( "click", wButtonClickAction, false ); } //function makewide function wButtonClickAction(){ if(wStatus==0){ document.getElementsByClassName('content_left')[0].classList.add ("wFull"); wStatus = 1; } else { document.getElementsByClassName('content_left')[0].classList.remove ("wFull"); wStatus = 0; } } })();