Last active
May 6, 2025 19:03
-
-
Save joshmckibbin/b3de1c4621e02c3294f355a22a667831 to your computer and use it in GitHub Desktop.
Revisions
-
joshmckibbin revised this gist
May 6, 2025 . 1 changed file with 3 additions and 3 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 @@ -25,10 +25,10 @@ } } emailIndex++; if ( emailIndex > emails.length - 1 ) { emailIndex = 0; } localStorage.setItem( 'outlookEmailIndex', emailIndex ); -
joshmckibbin created this gist
May 6, 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,36 @@ javascript:(function() { const emails = [ '[email protected]', '[email protected]', '[email protected]' ]; const baseUrl = 'https://outlook.office365.com/mail/'; if ( ! window.location.href.includes( baseUrl ) ) { alert( 'This bookmarklet only works on Outlook email pages.' ); return; } var emailIndex = localStorage.getItem( 'outlookEmailIndex' ); if ( emailIndex === null ) { emailIndex = 0; for( const [i, email] of emails.entries() ) { if ( window.location.href.includes(email) ) { emailIndex = i; break; } } } if ( emailIndex >= emails.length - 1 ) { emailIndex = 0; } else { emailIndex++; } localStorage.setItem( 'outlookEmailIndex', emailIndex ); window.open( baseUrl + emails[emailIndex], '_self' ); })();