hwm_battle_time

HWM mod - Prodolzhitel'nost' bitvy i kartochnoj igry (by Demin)

Verze ze dne 16. 08. 2014. 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           hwm_battle_time
// @namespace      Demin
// @description    HWM mod - Prodolzhitel'nost' bitvy i kartochnoj igry (by Demin)
// @homepage       http://userscripts.org/users/263230/scripts
// @version        1.2
// @include        http://*heroeswm.ru/war*
// @include        http://*heroeswm.ru/cgame*
// @include        http://178.248.235.15/war*
// @include        http://178.248.235.15/cgame*
// @include        http://209.200.152.144/war*
// @include        http://209.200.152.144/cgame*
// @include        http://*lordswm.com/war*
// @include        http://*lordswm.com/cgame*
// ==/UserScript==

// (c) 2013, demin  ( http://www.heroeswm.ru/pl_info.php?id=15091 )

var version = '1.2';


var time_begin_b = new Date().getTime();
var title_b = document.title;

update_title(time_begin_b, title_b);

function update_title(time_begin_b, title_b) {
	var ct = Math.floor( ( new Date().getTime() - time_begin_b ) / 1000 );
	var dh = Math.floor( ct / 3600 ) % 24;
	var dm = Math.floor( ct / 60 ) % 60;
	var ds = ct % 60;

	document.title = ( (dh > 0) ? dh+':' : '' ) + ( (dh > 0 && dm < 10) ? '0' : '' ) + dm + ':' + ( (ds < 10) ? '0' : '' ) + ds + ' ' + title_b;

	setTimeout(function() { update_title(time_begin_b, title_b); }, 999);
}