Created
December 10, 2020 16:42
-
-
Save pyronaur/5649c6167904324f792b0c31d7ffa3b0 to your computer and use it in GitHub Desktop.
Revisions
-
pyronaur created this gist
Dec 10, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,25 @@ // ==UserScript== // @name Clear CI Activity Notification // @version 1.0.0 // @grant none // @match https://github.com/notifications // ==/UserScript== const notifications = document.querySelectorAll('.notifications-list-item') const ciNotifications = Array.from(notifications).filter( (el) => { return el.querySelector('div > div > span').innerText === "ci activity" }, []) if( ciNotifications.length === 0 ) { return; } ciNotifications.forEach( (el) => { el.querySelector('input[type=checkbox]').click() }) setTimeout( () => { document.querySelector('button[title="Done"]').click() }, 200)