Reposition replay stats script

moves replay stats to the left

Verze ze dne 10. 07. 2019. Zobrazit nejnovější verzi.

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         Reposition replay stats script
// @namespace    http://tampermonkey.net/
// @version      0.22
// @description  moves replay stats to the left
// @author       Oki
// @match        https://*.jstris.jezevec10.com/*
// @grant        none
// ==/UserScript==

/******************************
Reposition replay stats script
******************************/

(function() {
    'use strict';

    window.addEventListener('load', function(){

var website = "jstris.jezevec10.com"
var url = window.location.href
var parts = url.split("/")

if(parts[3]=="replay" && parts[2].endsWith(website) && parts.length>4){

    if(parts[4]!="1v1"){


var stats = [document.querySelector("#stats table"),document.querySelector(".moreStats")]
var mainCanvas = myCanvas.getBoundingClientRect()

//var vertPos = myCanvas.getBoundingClientRect().left   - 900
//var horPos =  myCanvas.getBoundingClientRect().bottom - 100

var vertPos = -200
var horPos =  400

var values = ["absolute","absolute",vertPos+"px",vertPos+"px",horPos+"px",horPos+(stats[0].offsetHeight)+"px"]
var attributes = ["position","left","top"]

for (var i = 0; i < 6; i++) {
	eval('setTimeout(x=>{stats['+i%2+'].style.'+attributes[(i/2)|0]+' = "'+values[i]+'"},'+i*10+')')
}


    }
}


    });
})();