kk Blog —— 通用基础


date [-d @int|str] [+%s|"+%F %T"]
netstat -ltunp
sar -n DEV 1

JS 保持屏幕常亮

https://blog.csdn.net/GeniusCyberpunk/article/details/106082103

1
2
3
4
5
6
7
<script src='/js/NoSleep.js' type='text/javascript'></script>

<script>
var noSleep = new NoSleep();
noSleep.enable();
// alert('eeee');
</script>

https://juejin.cn/post/7229176086147825722

1
2
3
4
5
6
7
8
9
10
11
12
<script>
let wakeLock = null;
async function requestScreenWakeLock() {
	try {
		wakeLock = await navigator.wakeLock.request('screen');
		// console.log('Wake Lock activated, screen will stay awake.');
	} catch (err) {
		alert(err);
	}
}
requestScreenWakeLock();
</script>

language, web

« JS 获取当前的日期和时间 腾讯地图--静态地图API »