Created
November 21, 2014 09:52
-
-
Save MattiSG/45db55722db5df2dfd09 to your computer and use it in GitHub Desktop.
Userscripts for Outlook webmail
This file contains 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 characters
/** If you use Fluid.app, this is a drop-in. | |
* The variable storing the count of unread mails is window.fluid.dockBadge, change it as needed for your use case. | |
*/ | |
window.fluid.dockBadge = ''; | |
setTimeout(updateDockBadge, 1000); | |
setTimeout(updateDockBadge, 3000); | |
setInterval(updateDockBadge, 5000); | |
function updateDockBadge() { | |
var outlookBadge = document.querySelectorAll('[fldrnm="Boîte de réception"] + span span')[0]; | |
window.fluid.dockBadge = outlookBadge ? outlookBadge.innerText : ''; | |
} |
This file contains 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 characters
/** | |
* THIS SCRIPT DOES NOT WORK YET | |
* Some event is not triggered through simulation. | |
*/ | |
setTimeout(login, 1000); | |
setTimeout(acceptDisconnectOtherSessions, 1000); | |
function login() { | |
// Outlook login | |
document.getElementById('usernameWODomain').focus(); | |
[0x4E, 0x53, 0x43, 0x48, 0x4E, 0x45, 0x49, 0x44, 0x45, 0x52, 0x6D, 0x41, 0x44, 0x43].forEach(function(keycode) { | |
var event = document.createEvent('KeyboardEvent'); | |
event.initKeyboardEvent("keypress", true, true, null, false, false, false, false, 9, keycode); | |
document.getElementById('usernameWODomain').dispatchEvent(event); | |
}); | |
document.getElementById('password').onfocus(); | |
document.getElementById('password').value = 'your password'; | |
document.getElementById('SubmitCreds').click(); | |
} |
This file contains 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 characters
setTimeout(login, 1000); | |
setTimeout(acceptDisconnectOtherSessions, 3000); | |
function login() { | |
// Melissa login | |
document.getElementById('username').value = 'your username'; | |
document.getElementById('password').value = 'your Melissa password'; | |
document.getElementById('passwordSecondary').value = 'your Outlook password'; | |
document.getElementById('btnSubmit_6').click(); | |
} | |
function acceptDisconnectOtherSessions() { | |
document.getElementById('btnContinue').click(); | |
document.getElementById('signindiv').click(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment