Clear Console using Cmd+K

12/10/2021, 8:13:24 PM

  1. // ==UserScript==
  2. // @name Clear Console using Cmd+K
  3. // @namespace Violentmonkey Scripts
  4. // @match http*://*.*/*
  5. // @grant none
  6. // @version 1.0
  7. // @author dutzi
  8. // @license MIT
  9. // @description 12/10/2021, 8:13:24 PM
  10. // ==/UserScript==
  11.  
  12. window.addEventListener('keydown', (e) => {
  13. if (e.key === 'k' && e.metaKey) {
  14. console.clear()
  15. }
  16. })