Google Calendar Show All

Removes scrollbars and displays entire schedule.

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 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;
}