Template:Team:TU Delft/frame check

From 2010.igem.org

(Difference between revisions)
(New page: <html> <script> $(function() { var TU_Delft_Members = new Array("Mvoges","Ravandervalk","Ebrinkman","Ptmvanboheemen","Jcnossen","Lbergwerff","Nadinebongaerts","Hugo_87","Kschipper"); // A...)
 
(3 intermediate revisions not shown)
Line 4: Line 4:
var TU_Delft_Members = new Array("Mvoges","Ravandervalk","Ebrinkman","Ptmvanboheemen","Jcnossen","Lbergwerff","Nadinebongaerts","Hugo_87","Kschipper"); // All team members
var TU_Delft_Members = new Array("Mvoges","Ravandervalk","Ebrinkman","Ptmvanboheemen","Jcnossen","Lbergwerff","Nadinebongaerts","Hugo_87","Kschipper"); // All team members
-
if(!jQuery.inArray(wgUserName,TU_Delft_Members)) {  
+
if(NotInArray(wgUserName,TU_Delft_Members)) {  
if(typeof in_frame_test == 'undefined') {
if(typeof in_frame_test == 'undefined') {
-
window.location.replace("https://2010.igem.org/Team:TU_Delft/test#page="+wgPageName.substring(14));
+
window.location.replace("https://2010.igem.org/Team:TU_Delft#page="+wgPageName.substring(14));
}
}
}
}
});
});
 +
 +
function NotInArray(needle, haystack) {
 +
    var length = haystack.length;
 +
    for(var i = 0; i < length; i++) {
 +
        if(haystack[i] == needle) return false;
 +
    }
 +
    return true;
 +
}
</script>
</script>
</html>
</html>

Latest revision as of 13:55, 12 October 2010