PageSourceSearch

https://twovps.org/usr/plugins/SiteRunningTime/js/SiteRunningTime.js?v=1.5.1

js twovps.org collected 2026-10-04 01:41:58 UTC 1,731 bytes, 49 lines download raw bytes

1var SiteRunningTime = function(config)
2{
3	var node = document.createElement("span");
4	node.innerHTML = config.startTimeText;
5	node.className = "SiteRunningTime";
6	document.getElementById("footer").appendChild(node);
7
8	var _selector = function(selector)
9	{
10		return document.querySelector(selector);
11	}
12	var refreshTime = function(startTime)
13	{
14		//fix bug#2 在ios中使用时间戳加减使用 Data.parse()转换
15		var s1 = Date.parse(startTime.replace(/-/g, "/")),
16		s2 = new Date(),
17		runTime = parseInt((s2.getTime() - s1) / 1000);
18
19		var year = month = day = hour = minute = second = 0;
20		
21		year = Math.floor(runTime / 86400 / 365);
22		runTime = runTime % (86400 * 365);
23		month = Math.floor(runTime / 86400 / 30);
24		runTime = runTime % (86400 * 30);
25		day = Math.floor(runTime / 86400);
26		runTime = runTime % 86400;
27		hour = Math.floor(runTime / 3600);
28		runTime = runTime % 3600;
29		minute = Math.floor(runTime / 60);
30		runTime = runTime % 60;
31		second = runTime;
32
33		var _year = _month = _day = _hour = _minute = _second = null;
34		if((_year = _selector(".SiteRunningTime > .year")) != null) _year.innerText = year;
35		if((_month = _selector(".SiteRunningTime > .month")) != null) _month.innerText = month;
36		if((_day = _selector(".SiteRunningTime > .day")) != null) _day.innerText = day;
37		if((_hour = _selector(".SiteRunningTime > .hour")) != null) _hour.innerText = hour;
38		if((_minute = _selector(".SiteRunningTime > .minute")) != null) _minute.innerText = minute;
39		if((_second = _selector(".SiteRunningTime > .second")) != null) _second.innerText = second;
40	};
41	if(config.autoRefresh == "1")
42	{
43		setInterval(function()
44			{
45				refreshTime.call(null,config.startTime);
46			}, 1000);
47	}
48	refreshTime(config.startTime);
49};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.