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