This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function(){ cb = function(){ create_spritz();}; var script=document.createElement('SCRIPT');script.src='https://gist.githubusercontent.com/lmmx/9852222/raw/1ab1740b53621481cea0b6bd80aa20fe34a7b095/Twitter+checker.js?callback=cb?callback=cb'; script.onload=cb; document.body.appendChild(script);})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var titleList = []; | |
var paras = document.getElementsByTagName('p'); | |
for (i=0;i<paras.length;i++) { | |
var thisPara = document.getElementsByTagName("p")[i].textContent; | |
var title = paras[i].textContent.match(/\d{4}.*?[\)]\.\s(.*?)\./); | |
if (title !== null) { | |
titleList.push(title[1]); // output is the 1st element of each array (input text = 0th) | |
} else { | |
title = paras[i].textContent.match(/\d{4}.*?[\)]\.?\s?(.*?)\./); | |
titleList.push(title[1]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sounds = document.getElementsByClassName('soundList__item') | |
for (i=sounds.length-1;i>=0;i--) { | |
if (sounds[i].innerHTML.match("Download") === null) { | |
sounds[i].remove() | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// mytable = tsv for PubChem ID KEGG ID Compound name | |
rows = mytable.split('\n'); | |
newrows = []; | |
var prefix;var PCid;var KEGGid;var cpdName;var newrow; | |
for (i=0;i<rows.length;i++) { | |
prefix = '<a href="https://pubchem.ncbi.nlm.nih.gov/summary/summary.cgi?cid='; | |
PCid = rows[i].split('\t')[0]; | |
KEGGid = rows[i].split('\t')[2]; | |
cpdName = rows[i].split('\t')[4]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clade: Mammal | |
genome: Human | |
assembly: Feb. 2009 (GRCh37/hg19) | |
group: All Tracks | |
track: | |
1000G Ph1 Accsbl | |
1000G Ph1 Vars | |
5% Lowest S | |
AceView Genes | |
Affy Exon Array |
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 2 columns, instead of 1. in line 1.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tgpPhase1Accessibility 1000G Ph1 Accsbl | |
tgpPhase1 1000G Ph1 Vars | |
ntSssTop5p 5% Lowest S | |
acembly AceView Genes | |
affyExonArray Affy Exon Array | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for (l=0;l<doilist.length;l++){ | |
newBadge = document.createElement('div'); | |
if (l=0 && document.querySelector('div.post').offsetLeft > 300) {lr='left';} | |
else {lr='right';} | |
newBadge.setAttribute('data-badge-popover',lr); | |
newBadge.setAttribute('data-badge-type','medium-donut'); | |
newBadge.setAttribute('data-doi',doilist[l]); | |
newBadge.setAttribute('data-hide-no-mentions','true'); | |
newBadge.className = "altmetric-embed"; | |
document.getElementById('altmetBox').appendChild(newBadge); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.noshow, *:hover .noshow { | |
fill: transparent !important; | |
} | |
#altmetBox { | |
text-align: center; | |
} | |
#altmetBox > div.altmetric-embed { | |
width: 276px; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xmlin = prompt(); // view-source:biochemistri.es/sitemap1.xml | |
parser = new DOMParser(); | |
xmlDoc=parser.parseFromString(xmlin,"text/xml"); | |
xmlDoc.querySelectorAll('loc')[0].remove(); | |
posts = xmlDoc.querySelectorAll('loc'); | |
postlist = []; | |
for (i=0;i<posts.length;i++) {postlist.push(posts[i].innerHTML)}; | |
copy(postlist.join('\t')); // Chronological list of all posts as .tsv |