Greasy Fork

来自缓存

Greasy Fork is available in English.

hwm_battle_time

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

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 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);
}