forked from magicoflolis/Userscript-Plus
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlogger.js
More file actions
44 lines (42 loc) · 896 Bytes
/
Copy pathlogger.js
File metadata and controls
44 lines (42 loc) · 896 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
'use strict';
// #region Console
const dbg = (...msg) => {
const dt = new Date();
console.debug(
'[%cMagic Userscript+%c] %cDBG',
'color: rgb(29, 155, 240);',
'',
'color: rgb(255, 212, 0);',
`[${dt.getHours()}:${('0' + dt.getMinutes()).slice(-2)}:${('0' + dt.getSeconds()).slice(-2)}]`,
...msg
);
};
const err = (...msg) => {
console.error(
'[%cMagic Userscript+%c] %cERROR',
'color: rgb(29, 155, 240);',
'',
'color: rgb(249, 24, 128);',
...msg
);
};
const info = (...msg) => {
console.info(
'[%cMagic Userscript+%c] %cINF',
'color: rgb(29, 155, 240);',
'',
'color: rgb(0, 186, 124);',
...msg
);
};
const log = (...msg) => {
console.log(
'[%cMagic Userscript+%c] %cLOG',
'color: rgb(29, 155, 240);',
'',
'color: rgb(219, 160, 73);',
...msg
);
};
// #endregion
export { dbg, err, info, log };