Google Keep 全屏编辑

全屏编辑Google Keep,隐藏dashboard

当前为 2018-11-30 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Fullscreen Google Keep
  3. // @name:zh-CN Google Keep 全屏编辑
  4. // @namespace http://tampermonkey.net/
  5. // @description Edit Google Keep in fullscreen and hide the dashboard
  6. // @description:zh-CN 全屏编辑Google Keep,隐藏dashboard
  7. // @require https://code.jquery.com/jquery-3.3.1.min.js
  8. // @author John Ren
  9. // @match http*://keep.google.com/*
  10. // @run-at document-start
  11. // @version 1.02
  12. // ==/UserScript==
  13.  
  14. // Hide dashboard and focus input
  15. if (!location.hash) {
  16. $("html").css("opacity", 0);
  17. $(window).on("load", function() {
  18. $(".IZ65Hb-YPqjbf.h1U9Be-YPqjbf.LwH6nd")[0].click();
  19. $(".IZ65Hb-YPqjbf.h1U9Be-YPqjbf.LwH6nd")[0].focus();
  20. $("html").animate(
  21. {
  22. opacity: 1
  23. },
  24. 600, function(){}
  25. );
  26. });
  27. }
  28.  
  29. // Inject style
  30. (function() {
  31. var css = [
  32. "/* Full-screen for new note */",
  33. "",
  34. "/* Main */",
  35. " .h1U9Be-xhiy4>.IZ65Hb-n0tgWb.IZ65Hb-QQhtn>.IZ65Hb-TBnied {",
  36. " width: 100vw !important;",
  37. " height: 100vh !important;",
  38. " position: fixed !important;",
  39. " left: 0 !important;",
  40. " top: 0 !important;",
  41. " z-index: 999 !important;",
  42. " border-radius: 0px;",
  43. "}",
  44. "/* Title */",
  45. " .h1U9Be-xhiy4>.IZ65Hb-n0tgWb.IZ65Hb-QQhtn>.IZ65Hb-TBnied>.IZ65Hb-s2gQvd>.IZ65Hb-YPqjbf.r4nke-YPqjbf {",
  46. " font-size: 1.4rem !important;",
  47. " font-weight: 400 !important;",
  48. " line-height: 1.75rem !important;",
  49. " padding-bottom: 12px !important;",
  50. " padding-top: 16px !important;",
  51. "}",
  52. "/* Scroll */",
  53. " .h1U9Be-xhiy4>.IZ65Hb-n0tgWb.IZ65Hb-QQhtn>.IZ65Hb-TBnied>.IZ65Hb-s2gQvd {",
  54. " max-height: calc(100% - 40px) !important;",
  55. "}",
  56. "/* Content */",
  57. " .h1U9Be-xhiy4>.IZ65Hb-n0tgWb.IZ65Hb-QQhtn>.IZ65Hb-TBnied>.IZ65Hb-s2gQvd>.IZ65Hb-YPqjbf.h1U9Be-YPqjbf {",
  58. " width: calc(92vw - 11px) !important;",
  59. " margin:2vw 4vw!important;",
  60. " font-size: 1.1rem !important;",
  61. " line-height: 2rem !important;",
  62. "}",
  63. "/* Tools */",
  64. " .h1U9Be-xhiy4>.IZ65Hb-n0tgWb.IZ65Hb-QQhtn>.IZ65Hb-TBnied>.IZ65Hb-yePe5c {",
  65. " width: 100vw !important;",
  66. " position: absolute !important;",
  67. " bottom: 0 !important;",
  68. " left:0 !important;",
  69. "}",
  70. "/* Full-screen for editing note */",
  71. "",
  72. "/* Main */",
  73. " .IZ65Hb-n0tgWb.IZ65Hb-QQhtn.oT9UPb {",
  74. " width: 100vw !important;",
  75. " height: 100vh !important;",
  76. " position: fixed !important;",
  77. " left: 0 !important;",
  78. " top: 0 !important;",
  79. " z-index: 999 !important;",
  80. " border-radius: 0px;",
  81. "}",
  82. ".VIpgJd-TUo6Hb.XKSfm-L9AdLc.eo9XGd>.IZ65Hb-n0tgWb.IZ65Hb-QQhtn.oT9UPb>.IZ65Hb-TBnied {",
  83. " width:100% !important;",
  84. " height:100% !important;",
  85. " border-radius: 0px;",
  86. "}",
  87. "/* Title */",
  88. " .VIpgJd-TUo6Hb.XKSfm-L9AdLc.eo9XGd>.IZ65Hb-n0tgWb.IZ65Hb-QQhtn.oT9UPb>.IZ65Hb-TBnied>.IZ65Hb-s2gQvd>.IZ65Hb-YPqjbf.r4nke-YPqjbf {",
  89. " font-size: 1.4rem !important;",
  90. "}",
  91. "/* Scroll */",
  92. " .VIpgJd-TUo6Hb.XKSfm-L9AdLc.eo9XGd>.IZ65Hb-n0tgWb.IZ65Hb-QQhtn.oT9UPb>.IZ65Hb-TBnied>.IZ65Hb-s2gQvd {",
  93. " max-height: calc(100% - 40px) !important;",
  94. "}",
  95. "/* Content */",
  96. " .VIpgJd-TUo6Hb.XKSfm-L9AdLc.eo9XGd>.IZ65Hb-n0tgWb.IZ65Hb-QQhtn.oT9UPb>.IZ65Hb-TBnied>.IZ65Hb-s2gQvd>.IZ65Hb-YPqjbf.h1U9Be-YPqjbf {",
  97. " width: calc(92vw - 11px) !important;",
  98. " margin:2vw 4vw!important;",
  99. " font-size: 1.1rem !important;",
  100. " line-height: 2rem !important;",
  101. "}",
  102. ".XKSfm-L9AdLc .h1U9Be-YPqjbf, .zJtgdf-swAEc-bN97Pc .h1U9Be-YPqjbf, body.dkl3Ye .h1U9Be-YPqjbf {",
  103. " padding-top: 12px;",
  104. "}",
  105. "/* Tools */",
  106. " .VIpgJd-TUo6Hb.XKSfm-L9AdLc.eo9XGd>.IZ65Hb-n0tgWb.IZ65Hb-QQhtn.oT9UPb>.IZ65Hb-TBnied>.IZ65Hb-yePe5c {",
  107. " width:100% !important;",
  108. " position:absolute !important;",
  109. " bottom:0 !important;",
  110. " left:0 !important;",
  111. "}",
  112. "/* Info */",
  113. " .IZ65Hb-jfdpUb {",
  114. " padding:0px 15px !important",
  115. "}",
  116. "/* Fixed font size on dashboard */",
  117. ".IZ65Hb-YPqjbf.h1U9Be-YPqjbf.zfdrlf-WsjYwc-sLO9V {",
  118. " font-size: 0.8rem !important;",
  119. "}",
  120. "/* No scroll bar on dashboard */",
  121. " body::-webkit-scrollbar {",
  122. " width: 0px;",
  123. "}",
  124. "/* Fix Scroll bar in editor */",
  125. " .IZ65Hb-s2gQvd.r4nke-bJ69tf-ma6Yeb::-webkit-scrollbar {",
  126. " width:10px !important;",
  127. "}",
  128. ".IZ65Hb-s2gQvd::-webkit-scrollbar {",
  129. " width:0px !important;",
  130. "}"
  131. ].join("\n");
  132. if (typeof GM_addStyle != "undefined") {
  133. GM_addStyle(css);
  134. } else if (typeof PRO_addStyle != "undefined") {
  135. PRO_addStyle(css);
  136. } else if (typeof addStyle != "undefined") {
  137. addStyle(css);
  138. } else {
  139. var node = document.createElement("style");
  140. node.type = "text/css";
  141. node.appendChild(document.createTextNode(css));
  142. var heads = document.getElementsByTagName("head");
  143. if (heads.length > 0) {
  144. heads[0].appendChild(node);
  145. } else {
  146. // no head yet, stick it whereever
  147. document.documentElement.appendChild(node);
  148. }
  149. }
  150. })();