Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Hide DNA matches on Ancestry and 23andMe below a threshold for the ratio of total shared DNA to longest segment
javascript:var mint=42;var minr=12;if (location.href.indexOf('23andme')!==-1) {$('#peeps li').each(function(){var e=$(this).find('.b3:last');var m=e.text().trim().match(/([^%]+)[^\d]+(\d+)/);var n=parseInt(m[2]);var t=parseFloat(m[1])*75;var r=t/n;if(t<mint||r<minr){$(this).hide()}else{e.prepend('Ratio '+Math.round(r*100)/100+', ')}})}else {
$('match-entry').each(function(){var b=$(this).find('.dnaGrayDark');var s=b.text().match(/(\d+)[^\d]+(\d+)/);var t=parseInt(s[1]);var r = t/parseInt(s[2]);if(t<mint||r<minr){$(this).hide()}else{b.prepend('<strong>Ratio '+Math.round(r*100)/100+'</strong> ')}})}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.