Greasy Fork 还支持 简体中文。

Google Calendar - Hide Header

Hide the header of Google Calendar. Show it when you click on the "Calendar" logo in the top left.

目前為 2016-06-09 提交的版本,檢視 最新版本

  1. // ==UserScript==
  2. // @name Google Calendar - Hide Header
  3. // @namespace http://seanbannister.com/
  4. // @version 0.1
  5. // @description Hide the header of Google Calendar. Show it when you click on the "Calendar" logo in the top left.
  6. // @author Sean Bannister
  7. // @match *://calendar.google.com/*
  8. // ==/UserScript==
  9.  
  10. (function() {
  11. 'use strict';
  12.  
  13. var header = document.getElementById('onegoogbar').style;
  14.  
  15. // Hide the header
  16. header.display = 'none';
  17.  
  18. // When you click on the word "Calednar" (The logo in the top left)
  19. document.getElementById('mainlogo').addEventListener('click', function() {
  20. // If header is hidden show it
  21. if (header.display == 'none') {
  22. header.display = 'block';
  23. }
  24. // If header is showing hide it
  25. else if (header.display == 'block') {
  26. header.display = 'none';
  27. }
  28. });
  29. })();