Last active
September 16, 2025 13:30
-
-
Save piec/d17ac9317025c96bb5f3a88ecab7f8e0 to your computer and use it in GitHub Desktop.
Revisions
-
piec revised this gist
Sep 16, 2025 . 1 changed file with 2 additions and 2 deletions.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 @@ -3,8 +3,8 @@ // @namespace Violentmonkey Scripts // @match https://mail.google.com/* // @grant none // @version 1.2 // @author piec // @description 3/17/2025, 10:19:57 AM // @require https://cdn.jsdelivr.net/npm/@violentmonkey/shortcut@1 // @homepageURL https://gist.github.com/piec/d17ac9317025c96bb5f3a88ecab7f8e0 -
piec revised this gist
Mar 17, 2025 . 1 changed file with 1 addition and 1 deletion.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 @@ -3,7 +3,7 @@ // @namespace Violentmonkey Scripts // @match https://mail.google.com/* // @grant none // @version 1.1 // @author - // @description 3/17/2025, 10:19:57 AM // @require https://cdn.jsdelivr.net/npm/@violentmonkey/shortcut@1 -
piec revised this gist
Mar 17, 2025 . 1 changed file with 2 additions and 0 deletions.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 @@ -7,6 +7,8 @@ // @author - // @description 3/17/2025, 10:19:57 AM // @require https://cdn.jsdelivr.net/npm/@violentmonkey/shortcut@1 // @homepageURL https://gist.github.com/piec/d17ac9317025c96bb5f3a88ecab7f8e0 // @downloadURL https://gist.github.com/piec/d17ac9317025c96bb5f3a88ecab7f8e0/raw/gmail-toggle-unread.js // @grant GM_getValue // ==/UserScript== -
piec created this gist
Mar 17, 2025 .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,24 @@ // ==UserScript== // @name gmail - toggle is unread // @namespace Violentmonkey Scripts // @match https://mail.google.com/* // @grant none // @version 1.0 // @author - // @description 3/17/2025, 10:19:57 AM // @require https://cdn.jsdelivr.net/npm/@violentmonkey/shortcut@1 // @grant GM_getValue // ==/UserScript== function isVisible(el) { return !!el.offsetParent; } VM.shortcut.register(GM_getValue('is-unread-binding', 'c-s-a'), () => { console.log("CSA"); const spans = Array.from(document.querySelectorAll('span')).filter(el => el.textContent.includes('unread') && isVisible(el)) if (spans.length == 1) { spans[0].click(); } })