Progress Knight Dynamic Layout

Fixes UI to be dynamic - its not perfect, but it is better than nothing

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

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo 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         Progress Knight Dynamic Layout
// @namespace    https://ihtasham42.github.io/progress-knight/
// @version      1.0.1
// @description  Fixes UI to be dynamic - its not perfect, but it is better than nothing
// @author       CitizenStile <[email protected]>
// @match        *://ihtasham42.github.io/progress-knight/*
// @grant        none
// @run-at       document-idle
// ==/UserScript==

function getElementByXpath(path) {
  return document.evaluate(path, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
}

var elemParent = getElementByXpath("/html/body/div/div")
//   parentHeight.style.height = 'auto'
//   parentHeight.style.width = 'auto'
var elemMenu = getElementByXpath("/html/body/div/div/div[2]")
elemMenu.style.width = 'auto'
var elemBody = getElementByXpath("/html/body/div/div/div[3]")
elemBody.style.width = 'auto'
elemBody.style.height = 'auto'