Greasy Fork is available in English.

SIDs

Covert SID to HEX in Kingofsat.fr

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey, Greasemonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

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.

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

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

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;
}