I currently have the code below. This, however, always redirects to google. I don't get why though.
HTML
<script>
function load(){
if (typeof extension == 'undefined') {
window.location.href = "http://www.google.com/";
return false;
}
}
</script>
<body onload="load()">
inject.js from the extension
(function () {
var extension = 11;
}());