On-page console panel
Captures all console calls and shows them in a scrollable panel in the corner of the page.
Code to copy
try {
const panel = document.createElement('pre');
panel.style.cssText = 'position:fixed;right:0;bottom:0;width:340px;max-height:240px;'
+ 'overflow:auto;z-index:99999;background:#1d2021;color:#a9b665;margin:0;'
+ 'font:11px monospace;padding:6px;border-top-left-radius:6px;';
document.body.appendChild(panel);
['log', 'warn', 'error', 'info'].forEach(function (level) {
const orig = console[level];
console[level] = function () {
const line = document.createElement('div');
line.textContent = '[' + level + '] '
+ Array.prototype.map.call(arguments, String).join(' ');
panel.appendChild(line);
panel.scrollTop = panel.scrollHeight;
orig.apply(console, arguments);
};
});
} catch (err) { console.error('JustZix console panel:', err); }
How to use this example
- Copy the code with the button above.
- Install JustZix (2 minutes) and open the extension on the target page.
- Add a new rule matching that page.
- Paste the code into the rule's JavaScript panel and save — it runs on every page visit.
Rate this example
No ratings yet — be the first.