GM revertedpim script fixed style

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

@ -4,14 +4,10 @@
// @description overlay so that a visited page indexed in a PIM displays a link back // @description overlay so that a visited page indexed in a PIM displays a link back
// @include * // @include *
// @exclude *://mail.google.com/mail/* // @exclude *://mail.google.com/mail/*
// @require http://ecmanaut.googlecode.com/svn/trunk/lib/gm/$x$X.js
// ==/UserScript== // ==/UserScript==
// the require script is a part of ecmanaut grand project
// to re-organize the world starting with the annoying interface to the DOM API
/* /*
* Script homepage : from http://userscripts.org/ somewhere? * Script homepage : http://fabien.benetou.fr/Tools/Greasemonkey#RevertedPIMLinks
* *
* to do * to do
* find a way (visiting a special URL?) to (re)generate the data store on demand (not at each boot) * find a way (visiting a special URL?) to (re)generate the data store on demand (not at each boot)
@ -62,23 +58,8 @@ if (PIMpages != "fail")
var pages = PIMpages.split(" "); var pages = PIMpages.split(" ");
var myDiv = document.createElement('div'); var myDiv = document.createElement('div');
while (page = pages.shift()){ while (page = pages.shift()){
myDiv.innerHTML += "<p class=\"GM_PIM_link\" style=\"bgcolor:red;\"><a href=\""+PIM_URL+page+"\">"+page+"</a></p>"; myDiv.innerHTML += "<p class=\"GM_PIM_link\"><a href=\""+PIM_URL+page+"\">"+page+"</a></p>";
} }
myDiv.style = 'color:red; border:10px; align:right;'; myDiv.style.cssText = 'background-color:black !important; border:10px; align:right;';
document.body.appendChild(myDiv); document.body.appendChild(myDiv);
} }
function addGlobalStyle(css) {
var head, style;
head = document.getElementsByTagName('head')[0];
if (!head) { alert('no head?!'); return; }
style = document.createElement('style');
style.type = 'text/css';
style.innerHTML = css;
head.appendChild(style);
}
addGlobalStyle('bgcolor:black;');
//styles have no effect?!

Loading…
Cancel
Save