2 ms·
Using this bookmarklet, is the graph better or worse? javascript:(function()%7B%7Bfunction%20%24(el%2Csel%2Ccb)%7BArray.prototype.forEach.call(el.querySele
by panzi 12y ago
Using this bookmarklet, is the graph better or worse?
javascript:(function()%7B%7Bfunction%20%24(el%2Csel%2Ccb)%7BArray.prototype.forEach.call(el.querySelectorAll(sel)%2Ccb)%3B%7Dfunction%20fix(el%2Cbgcol%2Ctxtcol)%7Bel.style.backgroundColor%3Dbgcol%3Bel.style.color%3Dtxtcol%3B%24(el%2C%22*%22%2Cfunction(el)%7Bel.style.color%3Dtxtcol%3Bif(el.tagName%3D%3D%3D%22A%22)%7Bel.style.textDecoration%3D%22underline%22%3B%7D%7D)%3B%7D%24(document%2C%22.legend-color%2C%20td%22%2Cfunction(el)%7Bswitch(el.style.backgroundColor)%7Bcase%20%22rgb(170%2C%20170%2C%20255)%22%3Afix(el%2C%22black%22%2C%22white%22)%3Bbreak%3Bcase%20%22rgb(255%2C%20204%2C%20187)%22%3Afix(el%2C%22%230055aa%22%2C%22white%22)%3Bbreak%3Bcase%20%22rgb(255%2C%20153%2C%20238)%22%3Afix(el%2C%22%23ff9900%22%2C%22black%22)%3Bbreak%3B%7D%7D)%7D)()
Source:
javascript:(function(){
function $(el,sel,cb) { Array.prototype.forEach.call(el.querySelectorAll(sel),cb); }
function fix(el,bgcol,txtcol) {
el.style.backgroundColor = bgcol;
el.style.color = txtcol;
$(el,"*",function (el) {
el.style.color = txtcol;
if (el.tagName === "A") {
el.style.textDecoration = "underline";
}
});
}
$(document,".legend-color, td",function (el) {
switch(el.style.backgroundColor) {
case "rgb(170, 170, 255)":
fix(el,"black","white");
break;
case "rgb(255, 204, 187)":
fix(el,"#0055aa","white");
break;
case "rgb(255, 153, 238)":
fix(el,"#ff9900","black");
break;
}
});
})();
- ydant 12y agoSignificantly better. Before the change I can see the two colors on "Ender's Game", since that's the only place they are side by side. All of the blocks which only have one of "Novels" or "Short Stories / Enderverse" I struggle to tell which it is. "Short Stories" is quite distinct from the other two colors.