ForwardUntoDawn / GTC_Tri_Classement_PRIVATE

// ==UserScript==
// @name        GTC_Tri_Classement_PRIVATE
// @namespace   GTC_Tri_Classement_PRIVATE
// @include     http://www.gestion-tc.com/classement.php?id=*
// @include     http://gestion-tc.com/classement.php?id=*
// @version     1.0.3.P
// @grant       none
// @author      ForwardUntoDawn/Paul 714
// ==/UserScript==
var loc = window.location.toString();
if(loc.indexOf('classement.php?id=') > -1)
var trs = document.getElementsByTagName('tr');
var tabTri = new Array();
var slide = 0;
var tab = 0;
var taB = new Array();
for (i = 0; i < trs.length; i++)
{
  var tds = trs[i].getElementsByTagName('td');
  if (i === 0)
  {
    var notP = tds[0].innerHTML;
  }
  if (tds[0].innerHTML != notP)
  {
    tabTri[i] = tab + trs[i].innerHTML;
  } 
  else
  {
    tab++;
    tabTri[i] = tab + trs[i].innerHTML;
  }
}
tabTri.sort();
for (j = 0; j < trs.length; j++)
{
  var tds = trs[j].getElementsByTagName('td');
  if (tds[0].innerHTML != 'N° de parc')
  {
    trs[j].innerHTML = tabTri[j - slide].substring(1, tabTri[j - slide].length);
  } 
  else
  {
    slide++;
  }
}