Update public/assets/js/register.js
This commit is contained in:
parent
4658e475ef
commit
f0529b100e
|
@ -1,39 +1,4 @@
|
|||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const originalLog = console.log;
|
||||
const originalWarn = console.warn;
|
||||
const originalError = console.error;
|
||||
const scriptLogs = [];
|
||||
|
||||
function isScriptLog(args) {
|
||||
return args[0] && (args[0].includes('%c[+]%c') || args[0].includes('%c[*]%c') || args[0].includes('%c[#]%c') || args[0].includes('%c[-]%c') || args[0].includes('%c[!]%c'));
|
||||
}
|
||||
|
||||
console.log = function(...args) {
|
||||
if (isScriptLog(args)) {
|
||||
scriptLogs.push(args);
|
||||
}
|
||||
originalLog.apply(console, args);
|
||||
};
|
||||
|
||||
console.warn = function(...args) {
|
||||
if (isScriptLog(args)) {
|
||||
scriptLogs.push(args);
|
||||
}
|
||||
originalWarn.apply(console, args);
|
||||
};
|
||||
|
||||
console.error = function(...args) {
|
||||
if (isScriptLog(args)) {
|
||||
scriptLogs.push(args);
|
||||
}
|
||||
originalError.apply(console, args);
|
||||
};
|
||||
|
||||
setInterval(() => {
|
||||
const currentLogs = [...scriptLogs];
|
||||
console.clear();
|
||||
currentLogs.forEach(log => originalLog.apply(console, log));
|
||||
}, 400);
|
||||
|
||||
const defaultWispUrl = `${window.location.protocol === "https:" ? "wss" : "ws"}://${window.location.host}/w/`;
|
||||
let currentWispUrl = localStorage.getItem('customWispUrl') || defaultWispUrl;
|
||||
|
|
Loading…
Reference in New Issue
Block a user