Last active
January 5, 2018 15:53
-
-
Save Krailon/bfe5a2d312c2854aa1c5ffbf185b79fe to your computer and use it in GitHub Desktop.
Javascript functions for assisting in informed Gridcoin BOINC project selection
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
function highlight_gpu_projects(gpu_projects) { | |
if (location.hostname != 'gridcoinstats.eu' || location.pathname != '/project') { | |
throw 'This function is designed to run only on https://gridcoinstats.eu/project' | |
} | |
for (var index in gpu_projects) { | |
$('td a[href*="gridcoinstats.eu/project/"]').filter(function() { | |
return $(this).text().toLowerCase() == gpu_projects[index].toLowerCase() | |
}).parent().parent().css('background-color', 'rgb(96, 255, 80)') | |
//$('a:contains(' + gpu_projects[index] + ')').parent().parent().css('background-color', 'rgb(96, 255, 80)') | |
} | |
} | |
// This function runs on the official Gridcoin project whitelist page @ https://www.gridcoin.us/Guides/whitelist.htm | |
function get_gpu_projects() { | |
if (location.hostname != 'www.gridcoin.us' || location.pathname != '/Guides/whitelist.htm') { | |
throw 'This function is designed to run only on https://www.gridcoin.us/Guides/whitelist.htm' | |
} | |
var gpu_projects = [] | |
$('td:nth-child(5) i.fa-check').parent().parent().children(':first-child').children().each(function(){ | |
gpu_projects.push($(this).text()) | |
}) | |
return gpu_projects | |
} | |
// This function runs on the official Gridcoin project whitelist page @ https://www.gridcoin.us/Guides/whitelist.htm | |
function get_cpu_projects() { | |
if (location.hostname != 'www.gridcoin.us' || location.pathname != '/Guides/whitelist.htm') { | |
throw 'This function is designed to run only on https://www.gridcoin.us/Guides/whitelist.htm' | |
} | |
var cpu_projects = [] | |
$('td:nth-child(4) i.fa-check').parent().parent().children(':first-child').children().each(function(){ | |
cpu_projects.push($(this).text()) | |
}) | |
return cpu_projects | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment