Created
March 15, 2012 09:39
-
-
Save imrahil/2043287 to your computer and use it in GitHub Desktop.
ecDB.net - Adds red background to missing components
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
// ==UserScript== | |
// @name ecDB | |
// @namespace http://www.ecdb.net | |
// @description Adds red background to missing components | |
// @include http://ecdb.net/proj_show.php?proj_id=* | |
// ==/UserScript== | |
var componentsTable = document.getElementsByClassName('globalTables')[0]; | |
var componentsTableBody = componentsTable.getElementsByTagName("tbody")[0]; | |
var componentsTableRows = componentsTableBody.getElementsByTagName("tr"); | |
for (i in componentsTableRows) | |
{ | |
var cell = componentsTableRows[i].getElementsByTagName("td")[7]; | |
var quantity = cell.childNodes[0].data; | |
if (quantity == 0) | |
{ | |
cell.style.background = "rgb(255,0,0)"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment