Facebook Secure

By Jared Forsyth Last update Sep 30, 2009 — Installed 496 times. Daily Installs: 0, 7, 1, 1, 0, 1, 0, 1, 3, 3, 2, 2, 0, 1, 1, 0, 1, 2, 6, 1, 0, 1, 2, 0, 1, 0, 0, 0, 0, 0, 2, 1

There are 5 previous versions of this script.

// ==UserScript==
// @name           Facebook Secure
// @namespace      http://jaredforsyth.com
// @description    make facebook secure w/ https
// @include        https://*.facebook.com/*
// @include        http://*.facebook.com/*
// @include        https://facebook.com/*
// @include        http://172.16.0.28:15871/*
// ==/UserScript==
(function(){
/** this is specific to Websense **/
var url = 'http://172.16.0.28:15871/'
if (document.location.href.slice(0,url.length)==url && parent){
    var nurl = document.getElementById('UrlText').innerHTML.replace(/&/g,'&');
    parent.location = 'https://'+nurl.split('://')[1];
}

var links = document.getElementsByTagName("a");
for (var i=0;i<links.length;i++){
    if (!links[i].href || links[i].href.indexOf('javascript')==0)continue;
    links[i].href = "https://"+links[i].href.split("//")[1];
}

})();