hwm_battle_time

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

You will need to install an extension such as Tampermonkey, Greasemonkey 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 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.

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.

ستحتاج إلى تثبيت إضافة مثل Stylus لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتتمكن من تثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

(لدي بالفعل مثبت أنماط للمستخدم، دعني أقم بتثبيته!)

// ==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);
}