Progress Knight Dynamic Layout

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

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==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'