GM revertedpim script with style tests (all fail)

master
Fabien Benetou 14 years ago committed by utopiah
parent a9a13f249c
commit cd3b63090c
  1. 9
      pub/code/reverted_pim_links.user.js

@ -62,8 +62,9 @@ if (PIMpages != "fail")
var pages = PIMpages.split(" ");
var myDiv = document.createElement('div');
while (page = pages.shift()){
myDiv.innerHTML += "<p class=\"GM_PIM_link\"><a href=\""+PIM_URL+page+"\">"+page+"</a></p> ";
myDiv.innerHTML += "<p class=\"GM_PIM_link\" style=\"bgcolor:red;\"><a href=\""+PIM_URL+page+"\">"+page+"</a></p>";
}
myDiv.style = 'color:red; border:10px; align:right;';
document.body.appendChild(myDiv);
}
@ -71,11 +72,13 @@ if (PIMpages != "fail")
function addGlobalStyle(css) {
var head, style;
head = document.getElementsByTagName('head')[0];
if (!head) { return; }
if (!head) { alert('no head?!'); return; }
style = document.createElement('style');
style.type = 'text/css';
style.innerHTML = css;
head.appendChild(style);
}
addGlobalStyle('');
addGlobalStyle('bgcolor:black;');
//styles have no effect?!

Loading…
Cancel
Save