GM revertedpim script working folding

master
Fabien Benetou 13 years ago committed by utopiah
parent 593396c87f
commit eb7c9f0a6b
  1. 22
      pub/code/reverted_pim_links.user.js

@ -56,10 +56,6 @@ PIMpages_date = GM_getValue(script_name+" date","fail");
//if the current URL is in data store
if (PIMpages != "fail")
{
var hiddingscript = document.createElement('script');
hiddingscript.src="\nfunction showPimWindow(){ document.getElementById('GM_PIM_Window').style.visibility='visible'; document.getElementById('GM_PIM_Folded_Window').style.visibility='hidden'; }\nfunction hidePimWindow(boxid){ document.getElementById('GM_PIM_Folded_Window').style.visibility='visible'; document.getElementById('GM_PIM_Window').style.visibility='hidden'; }\n";
document.body.appendChild(hiddingscript);
//display link
var pages = PIMpages.split(" ");
var myDiv = document.createElement('div');
@ -70,12 +66,13 @@ if (PIMpages != "fail")
+"<sup><a href=\""+PIM_URL+page+"?action=edit\">[e]</a></sup>"
+"</p>";
}
myDiv.style.cssText = 'position:fixed; right:5px; top:5px; background-color:black; z-index:1;';
myDiv.style.cssText += 'padding:2px; margin:1px;';
myDiv.style.cssText += 'color:blue; font-size:10px; text-align:right;';
myDiv.style.cssText += 'border-width:3px; border-color:gray; border-style:solid;';
boxcss = 'position:fixed; right:5px; top:5px; background-color:black; z-index:1;';
boxcss += 'padding:2px; margin:1px;';
boxcss += 'color:blue; font-size:10px; text-align:right;';
boxcss += 'border-width:3px; border-color:gray; border-style:solid;';
myDiv.style.cssText = boxcss;
myDiv.innerHTML += "<hr/><p style='font-size:8px;' class='GM_PIM_ref'><a href='http://fabien.benetou.fr/Tools/Greasemonkey#RevertedPIMLinks'>RevertedPIMLinks</a></p>";
myDiv.innerHTML += "<p style='float:left;' class='GM_PIM_ref' onclick='hidePimWindow();'>&gt;&gt;</p>";
myDiv.innerHTML += "<p style='float:left;' class='GM_PIM_ref' onclick=\"document.getElementById('GM_PIM_Window').style.visibility='hidden';document.getElementById('GM_PIM_Folded_Window').style.visibility='visible';\">&gt;&gt;</p>";
if (PIMpages_date != "fail")
{
myDiv.innerHTML += "<p> (date:"+PIMpages_date+")</p>";
@ -84,10 +81,9 @@ if (PIMpages != "fail")
var myFoldedDiv = document.createElement('div');
myFoldedDiv.id = "GM_PIM_Folded_Window";
myFoldedDiv.innerHTML = "<p style='float:left;' class='GM_PIM_ref' onclick='showPimWindow();'>&lt;&lt;</a></p>";
//myFoldedDiv.style.cssText = myDiv.style.cssText;
//myFoldedDiv.style.cssText = "visibility:hidden;";
myFoldedDiv.style.cssText = "visibility:visible;";
myFoldedDiv.innerHTML += "<p style='float:left;' class='GM_PIM_ref' onclick=\"document.getElementById('GM_PIM_Window').style.visibility='visible';document.getElementById('GM_PIM_Folded_Window').style.visibility='hidden';\">&lt;&lt;</p>";
myFoldedDiv.style.cssText = boxcss;
myFoldedDiv.style.cssText += "visibility:hidden;";
document.body.appendChild(myFoldedDiv);
}

Loading…
Cancel
Save