Skip to content

Instantly share code, notes, and snippets.

View xtj7's full-sized avatar

Tobias Jacksteit xtj7

View GitHub Profile
@xtj7
xtj7 / custom-console-demo.html
Created February 29, 2020 11:46
Demo to create a custom console that intercepts all console.X methods and errors that would end up in the console.
<!doctype html>
<html>
<head>
<title>Console Demo</title>
<script>
// Method that adds log entries to your custom console
const addEntryToMyConsole = (type, content) => {
if (typeof content === 'undefined') {
content = '[missing content]';
} else if (typeof content !== 'string') {