Team:Cornell/javascripts/notebook

From 2013.igem.org

(Difference between revisions)
(another fix for Eric Appel (I hope))
(another fix for Eric Appel (I hope))
Line 417: Line 417:
if( ( before.length == 0 || before.match(/[^a-zA-Z]$/) ) &&
if( ( before.length == 0 || before.match(/[^a-zA-Z]$/) ) &&
( after.length == 0  || after.match(/^[^a-zA-Z]/) ) &&
( after.length == 0  || after.match(/^[^a-zA-Z]/) ) &&
-
(name != 'Eric' || after.length == 0 || after.match(/^ Appel/) )
+
(name != 'Eric' || !after.match(/^ Appel/) )
{
{
var image = img ? '<img src="' + img + '">' : '';
var image = img ? '<img src="' + img + '">' : '';

Revision as of 04:35, 27 September 2013

function loadHref() { if(document.location != "https://2013.igem.org/Team:Cornell/notebook") { var href = document.location.href; var i = href.substring(href.indexOf("#")+1); document.getElementById('week' + i + 'entry').style.display = 'block'; if(i != 'A') { document.getElementById('weekAentry').style.display = 'none'; document.getElementById('weekA').className = ; } document.getElementById('week' + i ).className = 'active'; } var techb = document.getElementsByClassName('nb-onetech-i'); for(var i = techb.length-1; i >= 0; i--) { techb[i].onclick = function() { showTech(this); } var teche = techb[i].parentNode.parentNode.children[1]; if(teche.innerHTML == "" || teche.innerHTML.indexOf("{{{tech}}}") != -1){ techb[i].className = 'nb-onetech-disabled'; teche.className = 'nb-tech-disabled'; } } } function filter(that) { var ele = that.children[0]; var show = ele.style.display == 'none'; ele.style.display= (show ? 'block' : 'none'); that.parentNode.children[1].className = (show ? 'nb-only' : 'nb-only-i'); all(); var list = document.getElementsByClassName('nb-' + ele.id); for (var i = 0; i < list.length; i++) { list[i].style.display = (show ? 'block' : 'none'); } } function onlyFilter(that) { var filt = that.parentNode; var row = filt.parentNode;

for(var i=1; i<row.children.length - 1; i++) { var hide = true; if(row.children[i] == filt) hide = false;

row.children[i].children[0].children[0].style.display = (hide ? 'none' : 'block'); row.children[i].children[1].className = (hide ? 'nb-only-i' : 'nb-only');

var list = document.getElementsByClassName('nb-' + row.children[i].children[0].children[0].id); for (var j = 0; j < list.length; j++) { list[j].style.display = (hide ? 'none' : 'block'); } } all(); } function all() { var all = true; var allbut = document.getElementById('nb-all'); var row = document.getElementById('wet-only').parentNode.parentNode; for(var i=0; i<row.children.length; i++) { if(row.children[i].children[1].className == 'nb-only-i') all = false; } allbut.className = (all ? 'nb-all' : 'nb-all-i'); } function showAll() { var all = true; var allbut = document.getElementById('nb-all'); var row = document.getElementById('wet-only').parentNode.parentNode; for(var i=0; i<row.children.length; i++) { row.children[i].children[0].children[0].style.display = 'block'; row.children[i].children[1].className = 'nb-only'; } allbut.className = (all ? 'nb-all' : 'nb-all-i'); var list = document.getElementsByClassName("entry"); for (var i = 0; i < list.length; i++) { list[i].style.display = 'block'; } } function weekFilter(that) { for(var i = -4; i<25; i++) { var c = (i > 0 ? "" + i : String.fromCharCode(69 + i)); var ele = document.getElementById('week' + c); if(ele != null) ele.className = (that.id.substr(4) == c ? 'active' : ); } var filt = that.id + "entry"; var all = document.getElementsByClassName('nb-week'); for(var i = 0; i<all.length; i++) { if(all[i].tagName == 'DIV') all[i].style.display = 'none'; } document.getElementById(filt).style.display = 'block'; } function showAllTech() { var techbut = document.getElementById('nb-alltech'); var all = techbut.className == 'nb-all-i'; techbut.className = (all ? 'nb-all' : 'nb-all-i'); var row = document.getElementsByClassName('nb-tech'); for(var i=0; i<row.length; i++) { row[i].style.display = (all ? 'block' : 'none'); } var techs = document.getElementsByClassName(all ? 'nb-onetech-i' : 'nb-onetech'); for(var i= techs.length -1; i >= 0; i--) { techs[i].className = (all ? 'nb-onetech' : 'nb-onetech-i'); } } function showTech(that) { var show = that.className == 'nb-onetech'; that.className = show ? 'nb-onetech-i' : 'nb-onetech'; that.parentNode.parentNode.children[1].style.display = show ? 'none' : 'block'; }

function findNames() {

var info = [ //don't use Lorem. I don't know why, but it murders kittens every time.

              ["Tim", "Tim Abbot", 

"Abbott_tim.jpg", "Wetlab member", "https://2013.igem.org/Team:Cornell/team/bios#abbot" ],

              ["Hannah", "Hannah Ajmani", 

"Ajmani_hannah.jpg", "Human practices and outreach coordinator", "https://2013.igem.org/Team:Cornell/team/bios#ajmani" ],

              ["Eric Appel", "Eric Appel", 

"Appel_eric.jpg", "Computer generated imagery", "https://2013.igem.org/Team:Cornell/team/bios#appel" ],

              ["Ryan", "Ryan Ashley", 

"Ashley_ryan.jpg", "Wetlab member", "https://2013.igem.org/Team:Cornell/team/bios#ashley" ], ["Nupur", "Nupur Bhatt", "Bhatt_nupur.jpg", "Wiki developer, wetlab member, professional gamer.", "https://2013.igem.org/Team:Cornell/team/bios#bhatt" ],

              ["Arun", "Arun Chakravorty", 

"Chakravorty_arun.jpg", "Wetlab taskforce leader, presenter, and overall awesome guy", "https://2013.igem.org/Team:Cornell/team/bios#chakravorty" ],

              ["Jonlin", "Jonlin Chen", 

"Chen_jonlin.jpg", "Wetlab member and miniprep master", "https://2013.igem.org/Team:Cornell/team/bios#chen" ],

              ["Rebecca", "Rebecca Chew", 

"Chew_rebecca.jpg", "Drylab member and wetlab member", "https://2013.igem.org/Team:Cornell/team/bios#chew" ],

              ["Sharlene", "Sharlene Dong", 

"Dong_sharlene.jpg", "Wetlab taskforce leader", "https://2013.igem.org/Team:Cornell/team/bios#dong" ],

              ["Sara", "Sara Gregg", 

"Gregg_sara.jpg", "Drylab member and wetlab member", "https://2013.igem.org/Team:Cornell/team/bios#gregg" ], ["Alex", "Alex Han", "Han_alex.jpg", "Wetlab taskforce leader", "https://2013.igem.org/Team:Cornell/team/bios#han" ],

              ["Eric", "Eric Holmes", 

"Holmes_eric.jpg", "Wetlab taskforce leader and presenter", "https://2013.igem.org/Team:Cornell/team/bios#holmes" ],

              ["Danielle", "Danielle Huang", 

"Huang_danielle.jpg", "Human practices and outreach coordinator", "https://2013.igem.org/Team:Cornell/team/bios#huang" ],

              ["Dan", "Daniel Leach", 

"", "Wetlab taskforce leader", "https://2013.igem.org/Team:Cornell/team/bios#leach" ],

              ["Daniel", "Daniel Leach", 

"", "Wetlab taskforce leader", "https://2013.igem.org/Team:Cornell/team/bios#leach" ], ["Rafael", "Rafael Lizarralde", "Rafael_Lizarralde_small.jpg", "Wetlab supervisor, wiki master, and wice president.", "https://2013.igem.org/Team:Cornell/team/bios#lizarralde" ],

              ["Oat", "Oat Luengvarinkul", 

"", "Design team (leader)", "https://2013.igem.org/Team:Cornell/team/bios#luengvarinkul" ],

              ["Jeffrey", "Jeffrey Ly", 

"Ly_jeffrey.jpg", "Wetlab member and energizer bunny", "https://2013.igem.org/Team:Cornell/team/bios#ly" ],

              ["Ritvik", "Ritvik Sarkar", 

"Sarkar_ritvik.jpg", "Drylab member.", "https://2013.igem.org/Team:Cornell/team/bios#sarkar" ],

               ["Mac", "Mac Sennet", 

"Sennett_mac.jpg", "Drylab leader.", "https://2013.igem.org/Team:Cornell/team/bios#sennet" ],

              ["Prashant", "Prashant Sharma", 

"Sharma_prashant.jpg", "Wetlab member and energizer bunny", "https://2013.igem.org/Team:Cornell/team/bios#sharma" ],

              ["Mark", "Mark Simpson", 

"Simpson_mark.jpg", "Wetlab member and energizer bunny", "https://2013.igem.org/Team:Cornell/team/bios#simpson" ],

               ["Christine", "Christine Soong", 

"Soong_christine.jpg", "Drylab member.", "https://2013.igem.org/Team:Cornell/team/bios#soong" ],

              ["Olya", "Olya Spassibojko", 

"Spassibojko_olya.jpg", "Wetlab taskforce leader", "https://2013.igem.org/Team:Cornell/team/bios#spassibojko" ],

              ["Tina", "Tina Su", 

"Su_tina.jpg", "Wetlab member and sponsorship team leader", "https://2013.igem.org/Team:Cornell/team/bios#su" ],

              ["Swati", "Swati Sureka", 

"Sureka_swati.jpg", "The Boss", "https://2013.igem.org/Team:Cornell/team/bios#sureka" ],

              ["Yoshi", "Yoshiko Toyoda", 

"Toyoda_yoshi.jpg", "Wetlab member", "https://2013.igem.org/Team:Cornell/team/bios#toyoda" ],

              ["Yoshiko", "Yoshiko Toyoda", 

"Toyoda_yoshi.jpg", "Wetlab member", "https://2013.igem.org/Team:Cornell/team/bios#toyoda" ],

               ["Lydia", "Lydia Wang", 

"Wang_lydia.jpg", "Drylab member.", "https://2013.igem.org/Team:Cornell/team/bios#wang" ], ["Kyle", "Kyle Wheeler", "Wheeler_kyle.jpg", "Wetlab member.", "https://2013.igem.org/Team:Cornell/team/bios#wheeler" ],

["pAK13AA", "pAK13AA", "", "PT7 + crtE in pSB1AK8", ""], ["pAK13AB", "pAK13AB", "", "PT7 + crtB in pSB1AK8", ""], ["pAK13AC", "pAK13AC", "", "PT7 + crtI in pSB1AK8", ""], ["pAK13AD", "pAK13AD", "", "PT7 + crtY in pSB1AK8", ""], ["pC13AE", "pC13AE", "", "PT7 + crtE in pSB1C3", ""], ["pC13AF", "pC13AF", "", "PT7 + crtB in pSB1C3", ""], ["pC13AG", "pC13AG", "", "PT7 + crtI in pSB1C3", ""], ["pC13AH", "pC13AH", "", "PT7 + crtY in pSB1C3", ""], ["pC13AI", "pC13AI", "", "lox site in pSB1C3", ""], ["pA13AJ", "pA13AJ", "", "lox site in pSB1A2", ""], ["pC13AK", "pC13AK", "", "mRFP (coding sequence only) in pSB1C3", ""], ["pK13AL", "pK13AL", "", "mRFP (coding sequence only) in pSB2K3", ""], ["pA13AM", "pA13AM", "", "Strongest Anderson constitutive promoter + mRFP in BBa_J61002", ""], ["pAK13AN", "pAK13AN", "", "PT7 + GFP in pSB1AK8", ""], ["pAK13AO", "pAK13AO", "", "PT7 + mRFP in pSB1AK8", ""], ["pAK13AP", "pAK13AP", "", "PT7 + bar in pSB1AK8", ""], ["pC13AQ", "pC13AQ", "", "PT7 + GFP in pSB1C3", ""], ["pC13AR", "pC13AR", "", "PT7 + mRFP in pSB1C3", ""], ["pC13AS", "pC13AS", "", "PT7 + bar in pSB1C3", ""], ["pC13AT", "pC13AT", "", "PtrpC + GFP in pSB1C3", ""], ["pC13AU", "pC13AU", "", "PtrpC + mRFP in pSB1C3", ""], ["pC13AV", "pC13AV", "", "PtrpC + bar in pSB1C3", ""], ["pA13AW", "pA13AW", "", "Anderson promoter + T7 polymerase from BBa_J61002", ""], ["pK13AX", "pK13AX", "", "Anderson promoter + T7 polymerase in pSB2K3", ""], ["pC13AY", "pC13AY", "", "PtrpC + T7 polymerase in pSB1C3", ""], ["pC13AZ", "pC13AZ", "", "Anderson promoter + T7 polymerase in pSB1C3", ""],

["pC13BA", "pC13BA", "", "afp1 in pSB1C3", ""], ["pAK13BB", "pAK13BB", "", "PT7 + nptII biobrick in pSB1AK8", ""], ["pC13BC", "pC13BC", "", "PT7 + nptII biobrick in pSB1C3", ""], ["pC13BD", "pC13BD", "", "PtrpC + crtI in pSB1C3", ""], ["pA13BE", "pA13BE", "", "PpelA, flanked by KpnI and BamHI cutsites in pHPG", ""], ["pC13BF", "pC13BF", "", "PpelA in pSB1C3", ""], ["pC13BG", "pC13BG", "", "A. nidulans PgpdA in pSB1C3", ""], ["pC13BH", "pC13BH", "", "G. lucidum PgpdA in pSB1C3", ""], ["pC13BI", "pC13BI", "", "G. lucidum PgpdA biobrick in pSB1C3", ""], ["pC13BJ", "pC13BJ", "", "100bp left region of homology of G. lucidum PgpdA in pSB1C3", ""], ["pC13BK", "pC13BK", "", "200bp left region of homology of G. lucidum PgpdA in pSB1C3", ""], ["pC13BL", "pC13BL", "", "100bp right region of homology of G. lucidum PgpdA in pSB1C3", ""], ["pC13BM", "pC13BM", "", "200bp right region of homology of G. lucidum PgpdA in pSB1C3", ""], ["pC13BN", "pC13BN", "", "lox [cutsite 1] [cutsite 2] lox in pSB1C3", ""], ["pC13BO", "pC13BO", "", "short homology regions flanking two unique cutsites in pSB1C3", ""], ["pC13BP", "pC13BP", "", "long homology regions flanking two unique cutsites in pSB1C3", ""], ["pC13BQ", "pC13BQ", "", "A. nidulans PgpdA + nptII biobrick in pSB1C3", ""], ["pC13BR", "pC13BR", "", "A. nidulans PgpdA + hph biobrick in pSB1C3", ""], ["pC13BS", "pC13BS", "", "G. lucidum PgpdA biobrick + nptII biobrick in pSB1C3", ""], ["pC13BT", "pC13BT", "", "G. lucidum Pgpd biobrick + hph biobrick in pSB1C3", ""], ["pAK13BU", "pAK13BU", "", "PT7 + hph biobrick in pSB1AK8", ""], ["pC13BV", "pC13BV", "", "PT7 + hph biobrick in pSB1C3", ""], ["pA13BW", "pA13BW", "", "CMV Cre in pBS185", ""], ["pC13BX", "pC13BX", "", "Cre recombinase in pSB1C3", ""], ["pC13BY", "pC13BY", "", "PpelA + Cre in pSB1C3", ""], ["pC13BZ", "pC13BZ", "", "PpelA + GFP in pSB1C3", ""],

["pC13CA", "pC13CA", "", "PpelA + mRFP in pSB1C3", ""], ["pC13CB", "pC13CB", "", "PT7 + GFP + PtrpC + nptII biobrick in pSB1C3", ""], ["pC13CC", "pC13CC", "", "PtrpC + nptII biobrick + TtrpC in pSB1C3", ""], ["pC13CD", "pC13CD", "", "PtrpC + hph biobrick in pSB1C3", ""], ["pC13CE", "pC13CE", "", "PtrpC + hph biobrick + TtrpC in pSB1C3", ""], ["pC13CF", "pC13CF", "", "A. nidulans PgpdA + GFP in pSB1C3", ""], ["pC13CG", "pC13CG", "", "A. nidulans PgpdA + mRFP in pSB1C3", ""], ["pC13CH", "pC13CH", "", "G. lucium PgpdA + GFP in pSB1C3", ""], ["pC13CI", "pC13CI", "", "G. lucidum PgpdA + mRFP in pSB1C3", ""], ["pC13CJ", "pC13CJ", "", "Limonene synthase in pSB1C3", ""], ["pAK13CK", "pAK13CK", "", "PT7 + Limonene Synthase in pSB1AK8", ""], ["pC13CL", "pC13CL", "", "Cht1_2 in pSB1C3", ""], ["pC13CM", "pC13CM", "", "PpelA + Cht1_2 in pSB1C3", ""], ["pS13CN", "pS13CN", "", "Lambda Holin in BBa_K112950", ""], ["pC13CO", "pC13CO", "", "Lambda Holin in pSB1C3", ""], ["pC13CP", "pC13CP", "", "PpelA + Lambda Holin in pSB1C3", ""], ["pAK13CQ", "pAK13CQ", "", "PT7 + rbs + crtE in pSB1AK8", ""], ["pAK13CR", "pAK13CR", "", "PT7 + rbs + crtB in pSB1AK8", ""], ["pAK13CS", "pAK13CS", "", "PT7 + rbs + crtI in pSB1AK8", ""], ["pAK13CT", "pAK13CT", "", "PT7 + rbs + crtY in pSB1AK8", ""], ["pC13CU", "pC13CU", "", "PT7 + rbs + crtE in pSB1C3", ""], ["pC13CV", "pC13CV", "", "PT7 + rbs + crtB in pSB1C3", ""], ["pC13CW", "pC13CW", "", "PT7 + rbs + crtI in pSB1C3", ""], ["pC13CX", "pC13CX", "", "PT7 + rbs + crtY in pSB1C3", ""], ["pAK13CY", "pAK13CY", "", "PT7 + rbs + GFP in pSB1AK8", ""], ["pA13CZ", "pA13CZ", "", "Strong RBS in pSB1A2", ""],

["pAK13DA", "pAK13CA", "", "PT7 + rbs + mRFP in pSB1AK8", ""], ["pA13DB", "pA13DB", "", "RBS + GFP in pSB1A2", ""], ["pA13DC", "pA13DC", "", "RBS + mRFP in pSB1A2", ""], ["pC13DD", "pC13DD", "", "PT7 + limonene synthase in pSB1C3", ""], ["pC13DE", "pC13DE", "", "lox + PtrpC + nptII biobrick + lox in pSB1C3", ""], ["pC13DF", "pC13DF", "", "lox + A. nidulans PgpdA + nptII biobrick + lox in pSB1C3", ""], ["pC13DG", "pC13DG", "", "lox + A.nidulans PgpdA + hph biobrick + lox in pSB1C3", ""], ["pC13DH", "pC13DH", "", "lox + PtrpC + hph biobrick + lox in pSB1C3", ""], ["pC13DI", "pC13DI", "", "PtrpC + hph biobrick + GFP in pSB1C3", ""], ["pC13DJ", "pC13DJ", "", "PT7 + crtB + PT7 + crtI in pSB1C3", ""], ["pC13DK", "pC13DK", "", "PT7 + crtE + PT7 + crtB + PT7 + crtI in pSB1C3", ""], ["pC13DL", "pC13DL", "", "PT7 + crtE + PT7 + crtB + PT7 + crtI + PT7 + nptII biobrick in pSB1C3", ""], ["pC13DM", "pC13DM", "", "PT7 + rbs + crtB + PT7 + rbs + crtI in pSB1C3", ""], ["pC13DN", "pC13DN", "", "PT7 + rbs + crtE + PT7 + rbs + crtB + PT7 + rbs + crtI in pSB1C3", ""], ["pC13DO", "pC13DO", "", "G. lucidum PgpdA + crtE in pSB1C3", ""], ["pC13DP", "pC13DP", "", "A. nidulans PgpdA + crtB in pSB1C3", ""], ["pC13DQ", "pC13DQ", "", "A. nidulans PgpdA + crtB + PtrpC + crtI in pSB1C3", ""], ["pC13DR", "pC13DR", "", "G. lucidum PgpdA + crtE + A. nidulans PgpdA + crtB + PtrpC + crtI in pSB1C3", ""], ["pC13A", "pC13A", "", "crtE + crtI + crtB in pSB1C3", ""], ["pC13B", "pC13B", "", "crtY in PSB1C3", ""], ["pA13C", "pA13C", "", "T7 promoter and terminator in pIVEX2.3d", ""], ["pAK13D", "pAK13D", "", "T7 promoter in PSB1AK8", ""], ["pC13E", "pC13E", "", "T7 polymerase in pSB1C3", ""], ["pC13F", "pC13F", "", "mRFP in pSB1C3", ""], ["pAh13G", "pAh13G", "", "PtrpC + hph + TtrpC in pUCATPH", ""], ["pAg13H", "pAg13H", "", "Pgpd (C.h.) + nptII in pNG", ""], ["pC13I", "pC13I", "", "crtE in pSB1C3", ""], ["pC13J", "pC13J", "", "rbs + crtE in pSB1C3", ""], ["pC13K", "pC13K", "", "crtI in pSB1C3", ""], ["pC13L", "pC13L", "", "rbs + crtI in pSB1C3", ""], ["pC13M", "pC13M", "", "crtB in pSB1C3", ""], ["pC13N", "pC13N", "", "rbs + crtB in pSB1C3", ""], ["pC13O", "pC13O", "", "rbs + crtY in pSB1C3", ""], ["pC13P", "pC13P", "", "trpC promoter in pSB1C3", ""], ["pC13Q", "pC13Q", "", "trpC terminator in pSB1C3", ""], ["pCg13R", "pCg13R", "", "nptII in pSB1C3", ""], ["pCg13S", "pCg13S", "", "nptII biobrick in pSB1C3", ""], ["pAb13T", "pAb13T", "", "PtrpC + bar + Ttrpc + PgpdA + lox in pBARGPE1", ""], ["pCg13U", "pCg13U", "", "nptII biobrick + TtrpC in pSB1C3", ""], ["pCh13V", "pCh13V", "", "hph in pSB1C3", ""], ["pCh13W", "pCh13W", "", "hph biobrick in pSB1C3", ""], ["pCp13X", "pCp13X", "", "bar in pSB1C3", ""], ["pCg13Y", "pCg13Y", "", "PtrpC + nptII biobrick in pSB1C3", ""], ["pC13Z", "pC13Z", "", "GFP + LVA in pSB1C3", ""]

];

var parents = document.getElementsByClassName("entry"); for(var pi = 0; pi < parents.length; pi++) { var eles = [parents[pi].children[0].children[1], parents[pi].children[0].children[2]]; for(var ti = 0; ti < 2; ti++) { var ele = eles[ti]; var text = ele.innerHTML; for(var i = 0; i < info.length; i++) { var p = info[i]; var name = p[0]; var full = p[1]; var img = p[2]; var desc = p[3]; var href = p[4];

var content = ; var after = text; var pos = after.toLowerCase().indexOf(p[0].toLowerCase()); while(pos != -1) { var before = after.substring(0, pos); var actualName = after.substring(pos, pos + name.length); after = after.substring(pos + name.length); if( ( before.length == 0 || before.match(/[^a-zA-Z]$/) ) && ( after.length == 0 || after.match(/^[^a-zA-Z]/) ) && (name != 'Eric' || !after.match(/^ Appel/) ) { var image = img ? '<img src="' + img + '">' : ;

var middle = '
<a href="' + href + '">' + actualName + '</a>
' + image + '
' + full + '

' + desc + '

';

content = content + before + middle; } pos = after.toLowerCase().indexOf(p[0].toLowerCase()); } text = content ? content + after : text; } ele.innerHTML = text; } } // // var hovers = document.getElementsByClassName("author-hover"); // var hoverpics = document.getElementsByClassName("author-hover-pic"); // for(var i = 0; i < hovers.length; i++) // { // alert(hovers[i].offsetWidth); // hoverpics[i].style.marginLeft = 0 - hovers[i].offsetWidth; // } }

function isDelimiter(ch) { return ch == ' ' || ch == '.'; }