Team:EPF-Lausanne/Template/Footer

From 2012.igem.org

(Difference between revisions)
Line 6: Line 6:
console.log("Editing URLs");
console.log("Editing URLs");
var toAdd = "&preload=Team:EPF-Lausanne/Notebook/Template/NewEntry";
var toAdd = "&preload=Team:EPF-Lausanne/Notebook/Template/NewEntry";
-
$("a").filter(
+
$(".month tr td a").filter(function(){ return $(this).attr("href").length > 80; }).each(
-
function(){
+
-
var str = $(this).attr("href");console.log("Filtering URL '", str,"'");
+
-
if(!str)
+
-
return false;
+
-
console.log("Match:", str.match(/Team:EPF-Lausanne\/Notebook\/[A-Za-z\-\_0-9]*&action=edit/i));
+
-
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(i, domObj){
function(i, domObj){
$(domObj).attr("href", $(domObj).attr("href")+toAdd);
$(domObj).attr("href", $(domObj).attr("href")+toAdd);

Revision as of 23:52, 3 June 2012