|
|
|
@ -4,14 +4,10 @@ |
|
|
|
|
// @description overlay so that a visited page indexed in a PIM displays a link back
|
|
|
|
|
// @include *
|
|
|
|
|
// @exclude *://mail.google.com/mail/*
|
|
|
|
|
// @require http://ecmanaut.googlecode.com/svn/trunk/lib/gm/$x$X.js
|
|
|
|
|
// ==/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 |
|
|
|
|
* 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 myDiv = document.createElement('div'); |
|
|
|
|
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); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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?!
|
|
|
|
|