Google Calendar Show All

Removes scrollbars and displays entire schedule.

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name           Google Calendar Show All
// @namespace      http://www.arthaey.com/
// @description    Removes scrollbars and displays entire schedule.
// @include        http*://www.google.com/calendar/*
// @author         Arthaey Angosii <[email protected]>
// @version        1.3
//
// Backed up from http://userscripts.org/scripts/review/6545
// Last updated on 2010-05-27
// ==/UserScript==

// Google-defined element IDs and CSS class names, subject to change without notice
var PRINT_ICON_ID = "mtpPrintLk";
var CALENDAR_ID = "scrolltimedeventswk";
var TOOLBAR_CLASS = "goog-inline-block";

window.addEventListener("load", function() {

   GM_addStyle(
      "#showAll {" +
      "   cursor: pointer;" +
      "   padding-right: 4px;" +
      "   position: relative;" +
      "   top: 2px;" +
      "}"
   );
   addShowAllButton();

   var SHOW_ALL_ADDED = false;

   function addShowAllButton() {
      if (SHOW_ALL_ADDED) return;

      var printLink = document.getElementById(PRINT_ICON_ID);
      var calendarDiv = document.getElementById(CALENDAR_ID);

      // try again later; window onload doesn't seem good enough?
      if (!printLink || !calendarDiv) {
         window.setTimeout(addShowAllButton, 1000);
      }

      var showLink = createShowLink(
         "Show All", "showAll", showAll,
         "Show everything, from midnight to midnight"
      );

      var showDiv = document.createElement('div');
      showDiv.className = TOOLBAR_CLASS;
      showDiv.appendChild(showLink);
      printLink.parentNode.insertBefore(showDiv, printLink);

      SHOW_ALL_ADDED = true;
   }

}, true);

function showAll() {
   var calendarDiv = document.getElementById(CALENDAR_ID);
   calendarDiv.style.height = "";
}

function createShowLink(text, id, fnct, title) {
   var link = document.createElement('img');
   link.alt = text;
   link.src = "data:image/gif,GIF89a%0D%00%0D%00%F1%03%00%00%00%CCaa%DF%C8%C8%F4%FF%FF%FF!%F9%04%01%0A%00%03%00%2C%00%00%00%00%0D%00%0D%00%00%02'%9C-%20%C7%08%BF%9AyT%DA%96N%1Cj%24%60%04%400)%D5%D7Q_8%96K%86%1C%DDES%CF%85nR%A2%0F%05%00%3B";

   link.addEventListener("click", fnct, true);
   link.id = id;
   if (title)
      link.title = title;

   return link;
}