SecureHotmailLogin

By Paul Venuti Last update Apr 30, 2008 — Installed 459 times.
// SecureHotmailLogin
// Version 1.0
// 2008-4-30
// Copyright (c) 2008, Paul Venuti
// Released under the GPL license
// http://www.gnu.org/copyleft/gpl.html
//
// --------------------------------------------------------------------
//
// This is a Greasemonkey user script.  To install it, you need
// Greasemonkey 0.3 or later: http://greasemonkey.mozdev.org/
// Then restart Firefox and revisit this script.
// Under Tools, there will be a new menu item to "Install User Script".
// Accept the default configuration and install.
//
// To uninstall, go to Tools/Manage User Scripts,
// select "SecureHotmail", and click Uninstall.
//
// --------------------------------------------------------------------
//
// ==UserScript==
// @name          SecureHotmailLogin
// @namespace     http://www.venutip.com/namespace
// @description   Automatically selects Hotmail's secure login page
// @include       http://login.live.com/*
// ==/UserScript==

function switchToSSL()
{
  window.location.href = window.location.href.replace(/^http:/, 'https:');
}

if(!(window.location.href.match("https")))
{
  // Needs to be added to a listener, since the login page is generated by JS
  window.addEventListener('load', switchToSSL, true);
}