just add some code to the script, it will work.! Chromium:
console._commandLineAPI.clear();
Safari:
console._inspectorCommandLineAPI.clear();
You can create your own variable that works in both:
if (typeof console._commandLineAPI !== 'undefined') { console.API = console._commandLineAPI; } else if (typeof console._inspectorCommandLineAPI !== 'undefined') { console.API = console._inspectorCommandLineAPI; } else if (typeof console.clear !== 'undefined') { console.API = console; }
After that you can simply use
console.API.clear().
Rahul dhoundiyal
source share