Team:EPF-Lausanne/Template/Header

From 2012.igem.org

(Difference between revisions)
Line 43: Line 43:
<link rel="stylesheet" href="/Team:EPF-Lausanne/Template/style.css?action=raw&ctype=text/css" type="text/css">
<link rel="stylesheet" href="/Team:EPF-Lausanne/Template/style.css?action=raw&ctype=text/css" type="text/css">
-
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
 
<script type="text/javascript">
<script type="text/javascript">
var toAdd = "&preload=Team:EPF-Lausanne/Notebook/Template/NewEntry";
var toAdd = "&preload=Team:EPF-Lausanne/Notebook/Template/NewEntry";
$(document).ready(function() {
$(document).ready(function() {
-
        $("a").filter( function() {
+
$("a").filter(
-
            var str = $.trim($(this).href); var sub = str.substr(str.length-5); return sub == '=edit';
+
function(){
-
        })
+
var str = $(this).attr("href");
-
    });
+
if(!str)
 +
return false;
 +
return str.match(/http:\/\/2012\.igem\.org\/wiki\/index\.php\?title=Team:EPF-Lausanne\/Notebook\/[A-Za-z\-\_0-9]*&action=edit/i) != null
 +
}
 +
).each(
 +
function(){
 +
$(this).attr("href", $(this).attr("href")+toAdd);
 +
}
 +
);
 +
});
</script>
</script>
</html>
</html>

Revision as of 23:34, 3 June 2012