SIDs

Covert SID to HEX in Kingofsat.fr

Du musst eine Erweiterung wie Tampermonkey, Greasemonkey oder Violentmonkey installieren, um dieses Skript zu installieren.

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

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

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

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

Sie müssten eine Skript Manager Erweiterung installieren damit sie dieses Skript installieren können

(Ich habe schon ein Skript Manager, Lass mich es installieren!)

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.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         SIDs
// @version      0.1
// @description  Covert SID to HEX in Kingofsat.fr
// @author       ShadyOrr
// @icon         http://upload.dinhosting.fr/j/a/r/d41d8cd98f00b204e9800998ecf8427e.png
// @include      http://*.kingofsat.fr/*.php*
// @namespace http://your.homepage/
// ==/UserScript==

var tds = document.getElementsByTagName("TD");
var priceEls = document.getElementsByClassName("s");
var j = 0 ; 

function decimalToHexString(number)
{
    if (number < 0)
    {
    	number = 0xFFFFFFFF + number + 1;
    }

    return number.toString(16).toUpperCase();
}


for (var i = 0; i<tds.length; i++) {
	
	var price = priceEls[i].innerText;
	
	var n = decimalToHexString(parseFloat(price)).toString();
	
	if (n.length != 4) {
    for (var g = 1; 4 - n.length; g++) {
    n = '0' + n ;
     }
     }
    document.getElementsByClassName("s")[i].innerHTML = n;
}