// ==UserScript== // @name Google Calendar Bars Toggler // @namespace http://userscripts.org/scripts/show/107309 // @description This script toggles display of the top and side bars of Google Calendar with click or I U O G key. // @version 1.3.1 // @author rat_siem // @include https://*.google.*/calendar/* // @include http://*.google.*/calendar/* // ==/UserScript== (function() { function $(id) { return document.getElementById(id); } var ogb_hide = "hide-all"; var open_by_search = false; document.addEventListener("keydown", function(e) { var element = e.target; var elementName = element.nodeName.toLowerCase(); if (elementName == "input" || elementName == "textarea") return true; var i; // press slash('/') key if (e.which == 191 && !e.ctrlKey && !e.shiftKey && !e.altKey && !e.metaKey) { var ogb = $("__myogb"); if (ogb) { if (ogb.className != "") toggle_gc(true); } return true; } // settings var cc = String.fromCharCode(e.which); if (cc.match(/S/i) && !e.ctrlKey && e.shiftKey && !e.altKey && !e.metaKey) { open_settings(); try { e.preventDefault(); } catch (ex) { } return false; } // press toggle key var tg = [ [["GCBT_GG_SPKY", "0"], ["GCBT_GG_SCKY", "71"], sw_gglbar], [["GCBT_GC_SPKY", "0"], ["GCBT_GC_SCKY", "73"], toggle_gc], [["GCBT_NV_SPKY", "0"], ["GCBT_NV_SCKY", "85"], toggle_nv], [["GCBT_GD_SPKY", "0"], ["GCBT_GD_SCKY", "79"], toggle_ga] ]; var sp, sc, fg = false; for (i = 0 ; i < tg.length ; i++) { sp = eval(GM_getValue(tg[i][0][0], tg[i][0][1])); sc = eval(GM_getValue(tg[i][1][0], tg[i][1][1])); if (e.which == sc && e.ctrlKey == ctrl(sp) && e.shiftKey == shft(sp) && e.altKey == alt(sp) && e.metaKey == meta(sp)) { tg[i][2](); fg = true; } } if (fg) { try { e.preventDefault(); } catch (ex) { } return false; } return true; }, false); var nEv = 0; function addBlurEvent2SearchBox() { var mi = $("gbqfq") ? $("gbqfq") : $("maininput"); if (mi) { mi.addEventListener("blur", function(e) { if (open_by_search == true) { var element = e.target; if (element.value == "") { toggle_gc(); } } }, false); } else { if (nEv < 5) setTimeout(addBlurEvent2SearchBox, 1000); nEv++; } } setTimeout(addBlurEvent2SearchBox, 1000); // toggle top area - start function toggle_gc(obs) { if (!obs) obs = false; open_by_search = obs; var ogb = $("__myogb"); if (!ogb) return; ogb.className = (ogb.className == "" ? ogb_hide : ""); GM_setValue("GCBT_GC_HIDE", ogb.className == "" ? "false" : "true"); var myc = $("__mycct"); if (myc) { myc.className = (ogb.className == "" ? "" : "hide"); } var myo = $("__mynto"); if (myo) { myo.className = (ogb.className == "" ? "" : (ogb_hide == "hide-all" ? "hide" : "hide2")); } var ttb = $("__myttb"); if (ttb) { ttb.className = (ogb.className == "" ? "open" : "hide"); } refreshCal(); } function refreshCal() { var he = document.createEvent('HTMLEvents'); he.initEvent("resize", true, false); document.body.dispatchEvent(he); } // toggle top area - end // toggle nav - start function toggle_nv() { var nav = $("__mynav"); if (nav) { nav.style.display = (nav.style.display == "none" ? "" : "none"); sdb = $("sidebar"); if (sdb) sdb.style.display = nav.style.display; var onv = $("nav"); var mab = $("mainbody"); var ltb = $("__myltb"); if (nav.style.display == "none") { GM_setValue("GCBT_NV_HIDE", "true"); if (onv) onv.style.width = "0"; if (mab) mab.style.marginLeft = "0"; if (ltb) ltb.className = "hide"; } else { GM_setValue("GCBT_NV_HIDE", "false"); if (onv) onv.style.width = ""; if (mab) mab.style.marginLeft = ""; if (ltb) ltb.className = ""; } } refreshCal(); } // toggle nav - end // switch google bar - start function sw_gglbar() { var ogb = $("__myogb"); if (!ogb) return; if (ogb_hide == "hide-all") { GM_setValue("GCBT_GG_OPEN", "true"); ogb_hide = "hide"; ogb.className = (ogb.className == "" ? "" : ogb_hide); } else { GM_setValue("GCBT_GG_OPEN", "false"); ogb_hide = "hide-all"; ogb.className = (ogb.className == "" ? "" : ogb_hide); } var myo = $("__mynto"); if (myo) { if (myo.className != "") { myo.className = (ogb_hide == "hide-all" ? "hide" : "hide2"); } } refreshCal(); } // switch google bar - end // toggle gadget area - start function toggle_ga() { var rtc = $("rhstogglecell"); if (!rtc) return; var tgc = rtc.childNodes[0]; if (!tgc) return; var me = document.createEvent("MouseEvents"); if (!me) return; me.initEvent("mousedown", false, true ); tgc.dispatchEvent(me); } // toggle gadget area - end // settings - start function getIndexByVal(e, v, d) { var r = d; var o = e.options; var n = o.length; for(var i = 0 ; i < n ; i++) { if (o[i].value == v) { r = i; break; } } return r; } function ctrl(sp) { return (sp & 0x01) != 0; } function shft(sp) { return (sp & 0x02) != 0; } function alt(sp) { return (sp & 0x04) != 0; } function meta(sp) { return (sp & 0x08) != 0; } function open_settings() { var it, sv; var mitgg = $("__myit_gg"); if (mitgg) { it = eval(GM_getValue("GCBT_GG_INIT", "false")); sv = eval(GM_getValue("GCBT_GG_SAVE", "false")); mitgg.selectedIndex = getIndexByVal(mitgg, (sv ? "2" : (it ? "1" : "0")), 0); } var mitgc = $("__myit_gc"); if (mitgc) { it = eval(GM_getValue("GCBT_GC_INIT", "true")); sv = eval(GM_getValue("GCBT_GC_SAVE", "false")); mitgc.selectedIndex = getIndexByVal(mitgc, (sv ? "2" : (it ? "0" : "1")), 0); } var mitnv = $("__myit_nv"); if (mitnv) { it = eval(GM_getValue("GCBT_NV_INIT", "true")); sv = eval(GM_getValue("GCBT_NV_SAVE", "false")); mitnv.selectedIndex = getIndexByVal(mitnv, (sv ? "2" : (it ? "0" : "1")), 0); } var sp, sc; var mstgg = $("__myst_gg"); if (mstgg) { sp = eval(GM_getValue("GCBT_GG_SPKY", "0")); sc = eval(GM_getValue("GCBT_GG_SCKY", "71")); mstgg.value = keyString(ctrl(sp), shft(sp), alt(sp), meta(sp), sc); } var mstgc = $("__myst_gc"); if (mstgc) { sp = eval(GM_getValue("GCBT_GC_SPKY", "0")); sc = eval(GM_getValue("GCBT_GC_SCKY", "73")); mstgc.value = keyString(ctrl(sp), shft(sp), alt(sp), meta(sp), sc); } var mstnv = $("__myst_nv"); if (mstnv) { sp = eval(GM_getValue("GCBT_NV_SPKY", "0")); sc = eval(GM_getValue("GCBT_NV_SCKY", "85")); mstnv.value = keyString(ctrl(sp), shft(sp), alt(sp), meta(sp), sc); } var mstgd = $("__myst_gd"); if (mstgd) { sp = eval(GM_getValue("GCBT_GD_SPKY", "0")); sc = eval(GM_getValue("GCBT_GD_SCKY", "79")); mstgd.value = keyString(ctrl(sp), shft(sp), alt(sp), meta(sp), sc); } var stg = $("__mystg"); if (stg) stg.style.display = ""; var stgbg = $("__mystg_bg"); if (stgbg) stgbg.style.display = ""; var stgbr = $("__mystg_br"); if (stgbr) stgbg.style.display = ""; var stgcs = $("__mystg_cs"); if (stgcs) stgcs.focus(); } function close_settings() { var stg = $("__mystg"); if (stg) stg.style.display = "none"; var stgbg = $("__mystg_bg"); if (stgbg) stgbg.style.display = "none"; var stgbr = $("__mystg_br"); if (stgbr) stgbg.style.display = "none"; } function focus_settings() { var stg = $("__mystg"); if (stg) stg.focus(); } function focus_closebtn() { var stgcs = $("__mystg_cs"); if (stgcs) stgcs.focus(); } function keydown_settings(e) { var element = e.target; var elementName = element.nodeName.toLowerCase(); if (elementName == "input" || elementName == "select") return true; if (e.which == 27) { close_settings(); try { e.preventDefault(); } catch (ex) { } return false; } return true; } function keydown_shortcut(e, def) { var element = e.target; if (!element) return true; if (e.which >= 16 && e.which <= 18 || e.which == 224 || e.which == 9) { // ctrl, shift, alt, meta, tab return true; } var ks = { "G":["GCBT_GG_SPKY", "GCBT_GG_SCKY"], "I":["GCBT_GC_SPKY", "GCBT_GC_SCKY"], "U":["GCBT_NV_SPKY", "GCBT_NV_SCKY"], "O":["GCBT_GD_SPKY", "GCBT_GD_SCKY"] }; element.value = keyString(e.ctrlKey, e.shiftKey, e.altKey, e.metaKey, e.which); var sp = 0; if (e.ctrlKey) sp += 0x01; if (e.shiftKey) sp += 0x02; if (e.altKey) sp += 0x04; if (e.metaKey) sp += 0x08; GM_setValue(ks[def][0], [sp].join("")); GM_setValue(ks[def][1], [e.which].join("")); try { e.preventDefault(); } catch (ex) { } return false; } function keyString(ctrlKey, shiftKey, altKey, metaKey, cd) { var key = []; if (ctrlKey) key.push("Ctrl"); if (shiftKey) key.push("Shift"); if (altKey) key.push("Alt"); if (metaKey) key.push("Meta"); if (cd >= 16 && cd <= 18 || cd == 224) { } else if ((cd >= 48 && cd <= 57) || (cd >= 65 && cd <= 90)) { key.push(String.fromCharCode(cd)); } else if (cd >= 96 && cd <= 105) { key.push(["[", cd - 96, "]"].join("")); } else if (cd >= 112 && cd <= 123) { key.push(["F", cd - 111].join("")); } else { switch (cd) { case 8: key.push("[BS]"); break; case 9: key.push("[Tab]"); break; case 13: key.push("[Enter]"); break; case 19: key.push("[Pause]"); break; case 20: key.push("[Caps]"); break; case 27: key.push("[Esc]"); break; case 33: key.push("[PU]"); break; case 34: key.push("[PD]"); break; case 35: key.push("[End]"); break; case 36: key.push("[Home]"); break; case 37: key.push("[Left]"); break; case 38: key.push("[Up]"); break; case 39: key.push("[Right]"); break; case 40: key.push("[Down]"); break; case 45: key.push("[Ins]"); break; case 46: key.push("[Del]"); break; case 91: key.push("[LW]"); break; case 92: key.push("[RW]"); break; case 93: key.push("[Sel]"); break; case 106: key.push("[*]"); break; case 107: key.push("[+]"); break; case 109: key.push("[-]"); break; case 110: key.push("[.]"); break; case 111: key.push("[/]"); break; case 144: key.push("[Num]"); break; case 145: key.push("[SL]"); break; case 188: key.push(","); break; case 190: key.push("."); break; case 191: key.push("/"); break; case 219: key.push("["); break; case 220: key.push("\\"); break; case 221: key.push("]"); break; default: key.push(["(", cd, ")"].join("")); break; } } return key.join("+"); } function change_initial(e, id) { var element = e.target; if (!element) return true; var ks = { "gg":{"k":["GCBT_GG_INIT", "GCBT_GG_SAVE"], "0":["false", "false"], "1":["true", "false"], "2":["false", "true"]}, "gc":{"k":["GCBT_GC_INIT", "GCBT_GC_SAVE"], "0":["true", "false"], "1":["false", "false"], "2":["false", "true"]}, "nv":{"k":["GCBT_NV_INIT", "GCBT_NV_SAVE"], "0":["true", "false"], "1":["false", "false"], "2":["false", "true"]} }; var gs = ks[id]; if (gs && gs[element.value]) { GM_setValue(gs["k"][0], gs[element.value][0]); GM_setValue(gs["k"][1], gs[element.value][1]); } return true; } var stgbg = document.createElement("div"); stgbg.setAttribute("id", "__mystg_bg"); stgbg.setAttribute("tabindex", "0"); stgbg.className = "scpopup-bg"; stgbg.style.cssText = "opacity: 0; width: 100%; height: 100%; display: none;" stgbg.addEventListener("focus", function(e){ focus_closebtn(); return true; }, false); document.body.appendChild(stgbg); var stg = document.createElement("div"); stg.setAttribute("id", "__mystg"); stg.setAttribute("tabindex", "0"); stg.className = "scpopup"; stg.style.display = "none"; stg.innerHTML = [ " <div class=\"scpopup-title scpopup-title-draggable\">", " <span class=\"scpopup-title-text\">Settings</span>", " <span class=\"scpopup-title-close\"></span>", " </div>", " <div class=\"scpopup-content\">", " <div class=\"scpopupcontent\">", " <table class=\"scpopupbody\"><tbody>", " <tr><td class=\"scpopup-col\">", " <table><tbody>", " <tr><th></th><th class=\"scpopup-th\">Initial states</th></tr>", " <tr><td class=\"scpopup-key\"><span class=\"keymnemonic\">Google Bar</span> :</td><td class=\"scpopup-desc\"><select id=\"__myit_gg\" style=\"width: 100px;\"><option value=\"0\">Hide</option><option value=\"1\">Visible</option><option value=\"2\">Save</option></select></td></tr>", " <tr><td class=\"scpopup-key\"><span class=\"keymnemonic\">Top Bar</span> :</td><td class=\"scpopup-desc\"><select id=\"__myit_gc\" style=\"width: 100px;\"><option value=\"0\">Hide</option><option value=\"1\">Visible</option><option value=\"2\">Save</option></select></td></tr>", " <tr><td class=\"scpopup-key\"><span class=\"keymnemonic\">Left Bar</span> :</td><td class=\"scpopup-desc\"><select id=\"__myit_nv\" style=\"width: 100px;\"><option value=\"0\">Hide</option><option value=\"1\">Visible</option><option value=\"2\">Save</option></select></td></tr>", " </tbody></table>", " </td>", " <td class=\"scpopup-col\">", " <table><tbody>", " <tr><th></th><th class=\"scpopup-th\">Shortcuts</th></tr>", " <tr><td class=\"scpopup-key\"><span class=\"keymnemonic\">Google Bar (G)</span> :</td><td class=\"scpopup-desc\"><input id=\"__myst_gg\" type=\"text\" style=\"width: 150px;\" /></td></tr>", " <tr><td class=\"scpopup-key\"><span class=\"keymnemonic\">Top Bar (I)</span> :</td><td class=\"scpopup-desc\"><input id=\"__myst_gc\" type=\"text\" style=\"width: 150px;\" /></td></tr>", " <tr><td class=\"scpopup-key\"><span class=\"keymnemonic\">Left Bar (U)</span> :</td><td class=\"scpopup-desc\"><input id=\"__myst_nv\" type=\"text\" style=\"width: 150px;\" /></td></tr>", " <tr><td class=\"scpopup-key\"><span class=\"keymnemonic\">Right Bar (O)</span> :</td><td class=\"scpopup-desc\"><input id=\"__myst_gd\" type=\"text\" style=\"width: 150px;\" /></td></tr>", " </tbody></table>", " </td></tr>", " </tbody></table>", " </div>", " </div>", " <div class=\"scpopup-buttons\"><button id=\"__mystg_cs\" class=\"goog-buttonset-default\">Close</button></div>" ].join(""); stg.addEventListener("keydown", function(e) { return keydown_settings(e); }, false); document.body.appendChild(stg); var stgbr = document.createElement("span"); stgbr.setAttribute("id", "__mystg_br"); stgbr.setAttribute("tabindex", "0"); stgbr.style.position = "absolute"; stgbr.addEventListener("focus", function(e){ focus_settings(); return true; }, false); document.body.appendChild(stgbr); var mitgg = $("__myit_gg"); if (mitgg) mitgg.addEventListener("change", function(e) { return change_initial(e, "gg"); }, false); var mitgc = $("__myit_gc"); if (mitgc) mitgc.addEventListener("change", function(e) { return change_initial(e, "gc"); }, false); var mitnv = $("__myit_nv"); if (mitnv) mitnv.addEventListener("change", function(e) { return change_initial(e, "nv"); }, false); var mstgg = $("__myst_gg"); if (mstgg) mstgg.addEventListener("keydown", function(e) { return keydown_shortcut(e, "G"); }, false); var mstgc = $("__myst_gc"); if (mstgc) mstgc.addEventListener("keydown", function(e) { return keydown_shortcut(e, "I"); }, false); var mstnv = $("__myst_nv"); if (mstnv) mstnv.addEventListener("keydown", function(e) { return keydown_shortcut(e, "U"); }, false); var mstgd = $("__myst_gd"); if (mstgd) mstgd.addEventListener("keydown", function(e) { return keydown_shortcut(e, "O"); }, false); var stgcs = $("__mystg_cs"); if (stgcs) stgcs.addEventListener("click", function(e){ close_settings(); return true; }, false); // settings - end // one-googbar var nog = false; var ogb = $("onegoogbar"); if (ogb) { var myg = document.createElement("div"); myg.setAttribute("id", "__myogb"); ogb.parentNode.insertBefore(myg, ogb); myg.appendChild(ogb); if (ogb.className.search("new-onegpad") >= 0) nog = true; } var ggd = $("gbgs4d"); if (ggd) { var arw = document.createElement("span"); arw.className = "gbma"; ggd.appendChild(arw); } // calcontent var cct = $("calcontent"); if (cct) { var myc = document.createElement("div"); myc.setAttribute("id", "__mycct"); cct.parentNode.insertBefore(myc, cct); myc.appendChild(cct); } var nto = $("ntowner"); if (cct && nto) { var myo = document.createElement("div"); myo.setAttribute("id", "__mynto"); cct.appendChild(myo); myo.appendChild(nto); } // nav var nav = $("nav"); if (nav) { var myn = document.createElement("div"); myn.setAttribute("id", "__mynav"); if (nav.tagName.toUpperCase() == "TD") { // classic look var nvl = nav.childNodes.length; for (var i = 0 ; i < nvl ; i++) { myn.appendChild(nav.childNodes[0]); } nav.appendChild(myn); } else { nav.parentNode.insertBefore(myn, nav); myn.appendChild(nav); } } // Top toggle bar var vpn = $("vr-nav"); var ftc = $("fastui-topnav-container"); var nst = true; if (!vpn && ftc) { vpn = ftc; nst = false; } if (vpn) { var ttb = document.createElement("div"); ttb.setAttribute("id", "__myttb"); // arrows - start var i,buf; var arh = document.createElement("div"); var aro = document.createElement("div"); arh.setAttribute("id", "__myttb_ar1"); aro.setAttribute("id", "__myttb_ar2"); for (i = 0 ; i < 6 ; i++) { buf = document.createElement("div"); if (i < 3) { buf.className = ["__ar_v __ar_v", i].join(""); arh.appendChild(buf); } else { buf.className = ["__ar_v __ar_v", (5 - i)].join(""); aro.appendChild(buf); } } ttb.appendChild(arh); ttb.appendChild(aro); // arrows - end ttb.addEventListener("mousedown", function(e){ toggle_gc(); return true; }, false); vpn.parentNode.insertBefore(ttb, vpn); // minimalize space vpn.style.marginTop = "0px"; if (nst) vpn.style.paddingBottom = "7px"; } // Left toggle bar var mbd = $("mainbody"); if (mbd) { var ltb = document.createElement("div"); ltb.setAttribute("id", "__myltb"); // arrows - start var i,buf; var arh = document.createElement("div"); var aro = document.createElement("div"); var arc = document.createElement("div"); arh.setAttribute("id", "__myltb_ar1"); aro.setAttribute("id", "__myltb_ar2"); arc.className = "__clear_float"; for (i = 0 ; i < 8 ; i++) { buf = document.createElement("div"); if (i < 3) { buf.className = ["__ar_h __ar_h", i].join(""); arh.appendChild(buf); } else if (i == 3) { buf.className = "__clear_float"; arh.appendChild(buf); } else if (i < 7) { buf.className = ["__ar_h __ar_h", (6 - i)].join(""); aro.appendChild(buf); } else { buf.className = "__clear_float"; aro.appendChild(buf); } } ltb.appendChild(arh); ltb.appendChild(aro); ltb.appendChild(arc); // arrows - end ltb.addEventListener("mousedown", function(e){ toggle_nv(); return true; }, false); mbd.appendChild(ltb); if (nst) { // minimalize space mbd.style.paddingTop = "8px"; // create space of left toggle bar. var bdr = document.createElement("div"); bdr.style.borderLeft = "7px solid #FFF"; var mbl = mbd.childNodes.length; for (i = 0 ; i < mbl ; i++) { bdr.appendChild(mbd.childNodes[0]); } mbd.appendChild(bdr); } } var tbc = (nst ? "#E7EBEF" : "#E3E9FF"); // bgcolor of toggle bars for mouse hover. var ntv = (nst ? "139px" : "107px"); // top value of notice area when topbar is open and #calcontent class is nothing. ntv = (nog ? "139px" : ntv); // var nts = (nst ? "125px" : "107px"); // top value of notice area when topbar is open and #calcontent class is "eui-s". nts = (nog ? "139px" : nts); // var ntt = (nst ? "111px" : "107px"); // top value of notice area when topbar is open and #calcontent class is "eui-t". ntt = (nog ? "106px" : ntt); // var nh1 = (nst ? "37px" : "12px"); // top value of notice area when topbar is close and google bar is close. var nh2 = (nst ? "67px" : "42px"); // top value of notice area when topbar is close and google bar is open nh2 = (nog ? "67px" : nh2); // and #calcontent class is nothing or "eui-s". var nh3 = (nst ? "67px" : "42px"); // top value of notice area when topbar is close and google bar is open nh3 = (nog ? "62px" : nh3); // and #calcontent class is "eui-t". var css = [ " #__myogb.hide .new-onegpad #gbq { ", " visibility: hidden; ", " } ", " #__myogb.hide .new-onegpad #gbx1 { ", " visibility: hidden; ", " } ", " #__myogb.hide .new-onegpad #gbu { ", " /*visibility: hidden;*/ ", " position: absolute; ", " top: 0; ", " right: 0; ", " height: 30px; ", " padding-top: 2px; ", " padding-bottom: 0; ", " z-index: 991; ", " } ", " #__myogb.hide .new-onegpad #gb.gbes #gbu { ", " height: 25px; ", " } ", " #__myogb.hide .new-onegpad .gbt { ", " line-height: 27px; ", " } ", " #__myogb.hide .new-onegpad #gb.gbes .gbt { ", " line-height: 20px; ", " } ", " #__myogb .new-onegpad #gbgs4d .gbma { ", " display: none; ", " } ", " #__myogb.hide .new-onegpad #gbgs4d .gbma { ", " display: inline-block; ", " } ", " #__myogb.hide .new-onegpad #gbgs4d .gbmai { ", " display: none; ", " } ", " #__myogb.hide .new-onegpad #gbgs4dn { ", " color: #CCC; ", " overflow: visible; ", " } ", " #__myogb.hide .new-onegpad #gb { ", " height: 25px; ", " } ", " #__myogb.hide .new-onegpad #gb { ", " height: 30px; ", " } ", " #__myogb.hide .new-onegpad #gb.gbes { ", " height: 25px; ", " } ", " #__myogb.hide-all { ", " visibility: hidden; ", " height: 0px; ", " } ", " #__mycct.hide #vr-header { ", " /*visibility: hidden;*/ ", " /*height: 0px;*/ ", " display: none; ", " } ", " #__myttb { ", " height: 5px; ", " padding: 2px 0 1px 0; ", " /*border-bottom: 1px solid #EBEBEB;*/ ", " } ", " #__myttb_ar1, #__myttb_ar2 { ", " display: none; ", " width: 6px; ", " position: relative; ", " left: 50%; ", " } ", " #__myttb.hide #__myttb_ar1 { ", " display: block; ", " } ", " #__myttb:not([class~=\"hide\"]) #__myttb_ar2 { ", " display: block; ", " } ", " .__ar_v { ", " height: 1px; ", " background-color: #858A8D; ", " } ", " .__ar_v0 { ", " margin: 0; ", " } ", " .__ar_v1 { ", " margin: 0 1px; ", " } ", " .__ar_v2 { ", " margin: 0 2px; ", " } ", " #__myltb { ", " position: absolute; ", " top: 0; ", " left: 0; ", " height: 100%; ", " width: 5px; ", " padding: 0 0 0 2px; ", " /*border-right: 1px solid #EBEBEB;*/ ", " } ", " #__myltb_ar1, #__myltb_ar2 { ", " display: none; ", " float: left; ", " height: 6px; ", " position: relative; ", " top: 50%; ", " } ", " #__myltb.hide #__myltb_ar1 { ", " display: block; ", " } ", " #__myltb:not([class~=\"hide\"]) #__myltb_ar2 { ", " display: block; ", " } ", " .__ar_h { ", " float: left; ", " width: 1px; ", " background-color: #858A8D; ", " } ", " .__ar_h0 { ", " height: 6px; ", " margin: 0; ", " } ", " .__ar_h1 { ", " height: 4px; ", " margin: 1px 0; ", " } ", " .__ar_h2 { ", " height: 2px; ", " margin: 2px 0; ", " } ", " .__clear_float { ", " display: none; ", " clear: both; ", " } ", " #__myttb:hover, #__myltb:hover { ", " background-color: ",tbc,"; ", " cursor: pointer; ", " } ", " ", " #calcontent #__mynto #ntowner { ", " height: 0; ", " position: absolute; ", " top: ",ntv,"; ", " left: 10px; ", " right: 10px; ", " } ", " #calcontent.eui-s #__mynto #ntowner { ", " top: ",nts,"; ", " } ", " #calcontent.eui-t #__mynto #ntowner { ", " top: ",ntt,"; ", " } ", " #calcontent #__mynto.hide #ntowner { ", " top: ",nh1,"; ", " } ", " #calcontent #__mynto.hide2 #ntowner { ", " top: ",nh2,"; ", " } ", " #calcontent.eui-t #__mynto.hide2 #ntowner { ", " top: ",nh3,"; ", " } ", " #calcontent #__mynto #ntowner #nt1 { ", " height: 0; ", " } ", " ", " #mainbody { ", " position: relative; ", " } ", " ", " div#maincell.has-sn { ", " margin-right: 10px !important; ", " } ", " #maincell.has-sn #gridcontainer { ", " margin-right: 0 !important; ", " } ", " #maincell.has-sn-ex #gridcontainer { ", " margin-right: 0 !important; ", " } ", " #calcontent #gadgetcell { ", " margin-right: 0 !important; ", " } ", " #calcontent #rhstogglecell.rhstogglecell-open { ", " right: 178px !important; ", " } ", " ", " /* classic look */ ", " #mainbody .printborder { ", " border-left: 7px solid #BCF; ", " } ", " #fastui-topnav-container #mainnav{ ", " width: 100%; ", " } ", " #calcontent #topBar { ", " padding-top: 6px; ", " } ", " #topBar .logoparent, #topBar #topCtrls { ", " padding-top: 0; ", " } " ].join(""); if (typeof GM_addStyle != "undefined") { GM_addStyle(css); } else if (typeof PRO_addStyle != "undefined") { PRO_addStyle(css); } else if (typeof addStyle != "undefined") { addStyle(css); } else { var heads = document.getElementsByTagName("head"); if (heads.length > 0) { var node = document.createElement("style"); node.type = "text/css"; node.appendChild(document.createTextNode(css)); heads[0].appendChild(node); } } if (!GM_getValue || (GM_getValue.toString && GM_getValue.toString().indexOf("not supported") > -1)) { this.GM_getValue = function (key, def) { return localStorage[key] || def; }; this.GM_setValue = function (key, value) { return localStorage[key] = value; }; this.GM_deleteValue = function (key) { return delete localStorage[key]; }; } // toggle if (eval(GM_getValue("GCBT_GG_INIT", "false")) || (eval(GM_getValue("GCBT_GG_SAVE", "false")) && eval(GM_getValue("GCBT_GG_OPEN", "false")))) { setTimeout(sw_gglbar, 0); } if (eval(GM_getValue("GCBT_GC_INIT", "true")) || (eval(GM_getValue("GCBT_GC_SAVE", "false")) && eval(GM_getValue("GCBT_GC_HIDE", "true")))) { setTimeout(toggle_gc, 0); } if (eval(GM_getValue("GCBT_NV_INIT", "true")) || (eval(GM_getValue("GCBT_NV_SAVE", "false")) && eval(GM_getValue("GCBT_NV_HIDE", "true")))) { setTimeout(toggle_nv, 0); } })();
Mozilla add on,User script,Grease Monkey Script, greasemonkey userscripts, updater userscripts mafia wars userscripts mafia wars autoplayer userscripts mafia wars wall userscripts scripts userscripts travian greasemonkey greasemonkey download greasemonkey facebook greasemonkey tutorial greasemonkey youtube greasemonkey travian greasemonkey chrome greasemonkey mafia wars greasemonkey mafia wars autoplayer
Friday, March 9, 2012
Google Calendar Bars Toggler
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment