From eb7c9f0a6b388548c7ef87ebb4f57b43572d6e9f Mon Sep 17 00:00:00 2001 From: Fabien Benetou Date: Wed, 15 Jun 2011 00:33:59 +0200 Subject: [PATCH] GM revertedpim script working folding --- pub/code/reverted_pim_links.user.js | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/pub/code/reverted_pim_links.user.js b/pub/code/reverted_pim_links.user.js index 90520d6..63ca796 100644 --- a/pub/code/reverted_pim_links.user.js +++ b/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") +"[e]" +"

"; } - 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 += "

RevertedPIMLinks

"; - myDiv.innerHTML += "

>>

"; + myDiv.innerHTML += "

>>

"; if (PIMpages_date != "fail") { myDiv.innerHTML += "

(date:"+PIMpages_date+")

"; @@ -84,10 +81,9 @@ if (PIMpages != "fail") var myFoldedDiv = document.createElement('div'); myFoldedDiv.id = "GM_PIM_Folded_Window"; - myFoldedDiv.innerHTML = "

<<

"; - //myFoldedDiv.style.cssText = myDiv.style.cssText; - //myFoldedDiv.style.cssText = "visibility:hidden;"; - myFoldedDiv.style.cssText = "visibility:visible;"; + myFoldedDiv.innerHTML += "

<<

"; + myFoldedDiv.style.cssText = boxcss; + myFoldedDiv.style.cssText += "visibility:hidden;"; document.body.appendChild(myFoldedDiv); }