iCloud customizations

Customizations for iCloud website.

目前為 2024-12-22 提交的版本,檢視 最新版本

  1. /* ==UserStyle==
  2. @name iCloud customizations
  3. @version 1.0.7
  4. @description Customizations for iCloud website.
  5. @author BreatFR (https://breat.fr)
  6. @namespace https://gitlab.com/breatfr
  7. @homepageURL https://gitlab.com/breatfr/icloud
  8. @supportURL https://discord.gg/Q8KSHzdBxs
  9. @license AGPL-3.0-or-later; https://www.gnu.org/licenses/agpl-3.0.txt
  10. @preprocessor stylus
  11.  
  12. @var checkbox hidebanner "Hide banner" 1
  13. @var checkbox hidemail "Hide mail" 0
  14. @var checkbox hidecontacts "Hide contacts" 0
  15. @var checkbox hidecalendar "Hide calendar" 0
  16. @var checkbox hidephotos "Hide photos" 0
  17. @var checkbox hidedrive "Hide drive" 0
  18. @var checkbox hidenotes "Hide notes" 0
  19. @var checkbox hidereminders "Hide reminders" 0
  20. @var checkbox hidepages "Hide pages" 0
  21. @var checkbox hidenumbers "Hide numbers" 0
  22. @var checkbox hidekeynote "Hide keynote" 0
  23. @var checkbox hidefind "Hide find" 0
  24. @var checkbox biggertextevents "Bigger text in events" 1
  25. @var text fontsize "Font size" 1rem
  26. @var checkbox hideheader "Hide calendar header" 0
  27. @var checkbox hidecalendarsidebar "Hide calendar sidebar" 0
  28. @var checkbox monthyearright "Set month and year on right" 0
  29. ==/UserStyle== */
  30.  
  31. /* === Credits ===
  32. Website https://breat.fr
  33. facebook https://www.facebook.com/breatfroff
  34. mastodon https://mastodon.social/@breat_fr
  35. telegram https://t.me/breatfr
  36. vk https://vk.com/breatfroff
  37. X (twitter) https://x.com/breatfroff
  38. === Credits === */
  39.  
  40. @-moz-document domain("icloud.com") {
  41. /* iCloud */
  42. if hidebanner {
  43. .banner-content {
  44. display: none !important;
  45. height: 0;
  46. width: 0;
  47. }
  48. }
  49. /* Hide elements you don't use */
  50. if hidemail {
  51. [href="https://www.icloud.com/mail"] {
  52. display: none !important;
  53. height: 0;
  54. width: 0;
  55. }
  56. }
  57. if hidecontacts {
  58. [href="https://www.icloud.com/contacts"] {
  59. display: none !important;
  60. height: 0;
  61. width: 0;
  62. }
  63. }
  64. if hidecalendar {
  65. [href="https://www.icloud.com/calendar"] {
  66. display: none !important;
  67. height: 0;
  68. width: 0;
  69. }
  70. }
  71. if hidephotos {
  72. [href="https://www.icloud.com/photos"] {
  73. display: none !important;
  74. height: 0;
  75. width: 0;
  76. }
  77. }
  78. if hidedrive {
  79. [href="https://www.icloud.com/iclouddrive"] {
  80. display: none !important;
  81. height: 0;
  82. width: 0;
  83. }
  84. }
  85. if hidenotes {
  86. [href="https://www.icloud.com/notes"] {
  87. display: none !important;
  88. height: 0;
  89. width: 0;
  90. }
  91. }
  92. if hidereminders {
  93. [href="https://www.icloud.com/reminders"] {
  94. display: none !important;
  95. height: 0;
  96. width: 0;
  97. }
  98. }
  99. if hidepages {
  100. [href="https://www.icloud.com/pages"] {
  101. display: none !important;
  102. height: 0;
  103. width: 0;
  104. }
  105. }
  106. if hidenumbers {
  107. [href="https://www.icloud.com/numbers"] {
  108. display: none !important;
  109. height: 0;
  110. width: 0;
  111. }
  112. }
  113. if hidekeynote {
  114. [href="https://www.icloud.com/keynote"] {
  115. display: none !important;
  116. height: 0;
  117. width: 0;
  118. }
  119. }
  120. if hidefind {
  121. [href="https://www.icloud.com/find"] {
  122. display: none !important;
  123. height: 0;
  124. width: 0;
  125. }
  126. }
  127. [dir=ltr] .navigation-drawer {
  128. padding: 20px;
  129. }
  130. [dir=ltr] .home-page .application-content .tile-grid.lg {
  131. padding-bottom: 40px;
  132. }
  133. [dir=ltr] .home-page .announcement-content {
  134. padding: 40px auto;
  135. }
  136. [dir=ltr] .home-page .announcement-content .announcement-container.lg {
  137. min-width: 1035px;
  138. }
  139. [dir=ltr] .home-page .announcement-content .announcement-container.lg > .content {
  140. margin: 0 auto;
  141. }
  142. /* If scripts to add icons */
  143. /* On wide screen */
  144. [dir=ltr] .home-page .application-content .tile-grid.lg:has(a[href="https://beta.maps.apple.com/"]):has(a[href="https://tv.apple.com/"]),
  145. [dir=ltr] .home-page .application-content .tile-grid.lg:has(a[href="https://beta.maps.apple.com/"]):has(a[href="https://music.apple.com/"]),
  146. [dir=ltr] .home-page .application-content .tile-grid.lg:has(a[href="https://tv.apple.com/"]):has(a[href="https://music.apple.com/"]),
  147. [dir=ltr] .home-page .application-content .tile-grid.lg:has(a[href="https://beta.maps.apple.com/"]):has(a[href="https://tv.apple.com/"]):has(a[href="https://music.apple.com/"]) {
  148. width: calc(1035px + 75px);
  149. }
  150. [dir=ltr] .tile-grid .tile-grid-tile-container.large:has(a[href="https://beta.maps.apple.com/"]):has(a[href="https://tv.apple.com/"]),
  151. [dir=ltr] .tile-grid .tile-grid-tile-container.large:has(a[href="https://beta.maps.apple.com/"]):has(a[href="https://music.apple.com/"]),
  152. [dir=ltr] .tile-grid .tile-grid-tile-container.large:has(a[href="https://tv.apple.com/"]):has(a[href="https://music.apple.com/"]),
  153. [dir=ltr] .tile-grid .tile-grid-tile-container.large:has(a[href="https://beta.maps.apple.com/"]):has(a[href="https://tv.apple.com/"]):has(a[href="https://music.apple.com/"]),
  154. [dir=ltr] .tile-grid .tile-grid-tile-container .tile-grid-tile-content.large:has(a[href="https://beta.maps.apple.com/"]):has(a[href="https://tv.apple.com/"]),
  155. [dir=ltr] .tile-grid .tile-grid-tile-container .tile-grid-tile-content.large:has(a[href="https://beta.maps.apple.com/"]):has(a[href="https://music.apple.com/"]),
  156. [dir=ltr] .tile-grid .tile-grid-tile-container .tile-grid-tile-content.large:has(a[href="https://tv.apple.com/"]):has(a[href="https://music.apple.com/"]),
  157. [dir=ltr] .tile-grid .tile-grid-tile-container .tile-grid-tile-content.large:has(a[href="https://beta.maps.apple.com/"]):has(a[href="https://tv.apple.com/"]):has(a[href="https://music.apple.com/"]) {
  158. width: calc(660px + 75px);
  159. }
  160. .app-library.large .app-icon-container:has(a[href="https://beta.maps.apple.com/"]):has(a[href="https://tv.apple.com/"]),
  161. .app-library.large .app-icon-container:has(a[href="https://beta.maps.apple.com/"]):has(a[href="https://music.apple.com/"]),
  162. .app-library.large .app-icon-container:has(a[href="https://tv.apple.com/"]):has(a[href="https://music.apple.com/"]),
  163. .app-library.large .app-icon-container:has(a[href="https://beta.maps.apple.com/"]):has(a[href="https://tv.apple.com/"]):has(a[href="https://music.apple.com/"]) {
  164. grid-template-columns: repeat(7, 1fr);
  165. }
  166. /* On small screen */
  167. [dir=ltr] .tile-grid .tile-grid-tile-container.small .app-library img {
  168. height: 56px !important;
  169. width: 56px !important;
  170. }
  171. [dir=ltr] .tile-grid .tile-grid-tile-container.small:has(a[href="https://beta.maps.apple.com/"]):has(a[href="https://tv.apple.com/"]),
  172. [dir=ltr] .tile-grid .tile-grid-tile-container.small:has(a[href="https://beta.maps.apple.com/"]):has(a[href="https://music.apple.com/"]),
  173. [dir=ltr] .tile-grid .tile-grid-tile-container.small:has(a[href="https://tv.apple.com/"]):has(a[href="https://music.apple.com/"]),
  174. [dir=ltr] .tile-grid .tile-grid-tile-container.small:has(a[href="https://beta.maps.apple.com/"]):has(a[href="https://tv.apple.com/"]):has(a[href="https://music.apple.com/"]),
  175. [dir=ltr] .tile-grid .tile-grid-tile-container.small .tile-grid-tile-content.cell.small:has(a[href="https://beta.maps.apple.com/"]):has(a[href="https://tv.apple.com/"]),
  176. [dir=ltr] .tile-grid .tile-grid-tile-container.small .tile-grid-tile-content.cell.small:has(a[href="https://beta.maps.apple.com/"]):has(a[href="https://music.apple.com/"]),
  177. [dir=ltr] .tile-grid .tile-grid-tile-container.small .tile-grid-tile-content.cell.small:has(a[href="https://tv.apple.com/"]):has(a[href="https://music.apple.com/"]),
  178. [dir=ltr] .tile-grid .tile-grid-tile-container.small .tile-grid-tile-content.cell.small:has(a[href="https://beta.maps.apple.com/"]):has(a[href="https://tv.apple.com/"]):has(a[href="https://music.apple.com/"]),
  179. [dir=ltr] .tile-grid .tile-grid-tile-container.small .tile-container:has(a[href="https://beta.maps.apple.com/"]):has(a[href="https://tv.apple.com/"]),
  180. [dir=ltr] .tile-grid .tile-grid-tile-container.small .tile-container:has(a[href="https://beta.maps.apple.com/"]):has(a[href="https://music.apple.com/"]),
  181. [dir=ltr] .tile-grid .tile-grid-tile-container.small .tile-container:has(a[href="https://tv.apple.com/"]):has(a[href="https://music.apple.com/"]),
  182. [dir=ltr] .tile-grid .tile-grid-tile-container.small .tile-container:has(a[href="https://beta.maps.apple.com/"]):has(a[href="https://tv.apple.com/"]):has(a[href="https://music.apple.com/"]),
  183. [dir=ltr] .tile-grid .tile-grid-tile-container.small .app-library:has(a[href="https://beta.maps.apple.com/"]):has(a[href="https://tv.apple.com/"]),
  184. [dir=ltr] .tile-grid .tile-grid-tile-container.small .app-library:has(a[href="https://beta.maps.apple.com/"]):has(a[href="https://music.apple.com/"]),
  185. [dir=ltr] .tile-grid .tile-grid-tile-container.small .app-library:has(a[href="https://tv.apple.com/"]):has(a[href="https://music.apple.com/"]),
  186. [dir=ltr] .tile-grid .tile-grid-tile-container.small .app-library:has(a[href="https://beta.maps.apple.com/"]):has(a[href="https://tv.apple.com/"]):has(a[href="https://music.apple.com/"]) {
  187. height: calc(315px + 88.39px + 10px);
  188. }
  189. }
  190.  
  191. @-moz-document url-prefix("https://www.icloud.com/applications/calendar/") {
  192. /* Calendar */
  193. if hidecalendarsidebar {
  194. ui-split[style="width: 250px;"],
  195. ui-split-divider[style="left: 250px;"] {
  196. display: none;
  197. width: 0;
  198. }
  199. }
  200. if hideheader {
  201. header {
  202. display: none !important;
  203. height: 0 !important;
  204. }
  205. }
  206. if biggertextevents {
  207. .event-button * {
  208. font-size: fontsize;
  209. line-height: 1.5;
  210. }
  211. .col-color,
  212. .event-button svg {
  213. height: fontsize !important;
  214. width: fontsize !important;
  215. }
  216. }
  217. /* Today */
  218. .css-107fxrr > span,
  219. .css-8ts4xs,
  220. .css-6k0qnq {
  221. color: var(--theme-color-systemWhite);
  222. }
  223. /* Birthday better view */
  224. .event-button:has(.birthday) {
  225. background-color: transparent;
  226. }
  227. .birthday > div {
  228. color: var(--theme-color-systemRed);
  229. fill: var(--theme-color-systemRed);
  230. }
  231.  
  232. /* Set month and year on right */
  233. if monthyearright {
  234. .css-10udamb {
  235. order: 3;
  236. }
  237. .css-1yaufk0 {
  238. color: var(--theme-color-systemRed);
  239. }
  240. .css-xcsuj9 {
  241. margin-inline-start: auto;
  242. }
  243. .css-t7kvo9 {
  244. order: 2;
  245. }
  246. .css-iwyx1e {
  247. flex-direction: row-reverse;
  248. justify-content: flex-start;
  249. order: 1;
  250. }
  251. }
  252. /* ========================
  253. Day view
  254. ======================== */
  255. /* No more space around day table */
  256. .css-6ub2mo {
  257. padding: 0;
  258. }
  259. if biggertextevents {
  260. .css-1b9imfs {
  261. grid-auto-rows: auto;
  262. }
  263. .css-oyl8cq {
  264. height: max-content;
  265. }
  266. }
  267. /* ========================
  268. Week view
  269. ======================== */
  270. /* No more space around week table */
  271. .css-bhx65h {
  272. padding: 0;
  273. }
  274. if biggertextevents {
  275. .css-12eikme {
  276. align-self: center;
  277. }
  278. .css-5ve0cs {
  279. height: max-content;
  280. }
  281. .css-1h98574 {
  282. grid-auto-rows: auto;
  283. }
  284. }
  285. /* Days label */
  286. .week-daylabel {
  287. justify-content: center;
  288. }
  289. .css-1ttvfef {
  290. color: var(--theme-color-systemWhite);
  291. }
  292. .css-8ts4xs + .css-1ttvfef {
  293. color: var(--theme-color-systemRed);
  294. }
  295.  
  296. /* ========================
  297. Month view
  298. ======================== */
  299. /* No more space around month table */
  300. .css-6mc1rx {
  301. padding: 0;
  302. }
  303. if biggertextevents {
  304. .css-6310j7 {
  305. height: auto;
  306. }
  307. .css-1opsrsm {
  308. grid-auto-rows: auto;
  309. }
  310. .css-6pogpz {
  311. white-space: wrap;
  312. }
  313. }
  314. /* Other months days */
  315. .css-swsj24 {
  316. color: var(--theme-color-labelTertiary)
  317. }
  318. /* Day focused */
  319. .month-view-day-cell:focus {
  320. background: rgba(255, 255, 255, 0.2);
  321. }
  322. /* Days label */
  323. .n-grid-col > span {
  324. display: flex;
  325. justify-self: center;
  326. padding-inline-start: 0;
  327. }
  328. .css-1fdlgye {
  329. color: var(--theme-color-systemWhite);
  330. }
  331. }