Kahoot font

Change font size and font face in Kahoot!.

  1. // ==UserScript==
  2. // @name Kahoot font
  3. // @namespace https://github.com/rogeraabbccdd/kahoot-font
  4. // @version 1.2
  5. // @description Change font size and font face in Kahoot!.
  6. // @author rogeraabbccdd
  7. // @include *://*.kahoot.*/*
  8. // @include *://kahoot.it/*
  9. // @grant GM_addStyle
  10. // ==/UserScript==
  11. //
  12. // _oo0oo_
  13. // o8888888o
  14. // 88" . "88
  15. // (| -_- |)
  16. // 0\ = /0
  17. // ___/`---'\___
  18. // .' \\| |// '.
  19. // / \\||| : |||// \
  20. // / _||||| -:- |||||- \
  21. // | | \\\ - /// | |
  22. // | \_| ''\---/'' |_/ |
  23. // \ .-\__ '-' ___/-. /
  24. // ___'. .' /--.--\ `. .'___
  25. // ."" '< `.___\_<|>_/___.' >' "".
  26. // | | : `- \`.;`\ _ /`;.`/ - ` : | |
  27. // \ \ `_. \_ __\ /__ _/ .-` / /
  28. // =====`-.____`.___ \_____/___.-`___.-'=====
  29. // `=---='
  30. //
  31. //
  32. // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  33. //
  34. // 佛祖保佑 永無BUG
  35. //
  36. //
  37. /* style.css (https://play.kahoot.it/theme/kahoot/css/style.css?v1.382.0)
  38. .richText.question = 倒數時顯示的題目,預設48px
  39. .launcher .quizInfo .name = 讀取時的測驗標題,預設34px
  40. div.title = 預備時的測驗標題,預設40px;
  41. input.username = 玩家輸入Nickname和其他東西時輸入欄的字
  42. span.player-name = 主控顯示的玩家名、隊伍名
  43. div.status-bar__username = 玩家端顯示的玩家名
  44. h3.nickname__text = 玩家顯示的隊伍名
  45. li.players__members-name = 玩家顯示的隊員名
  46. li.players-block__member-name = 主控顯示的隊伍玩家名
  47. */
  48. GM_addStyle(`
  49. .richText.question
  50. {
  51. font-size: 60px !important;
  52. font-family: montserrat,"helvetica neue",helvetica,arial,sans-serif,"Microsoft JhengHei";
  53. }
  54. .launcher .quizInfo .name
  55. {
  56. font-size: 50px !important;
  57. font-family: montserrat,"helvetica neue",helvetica,arial,sans-serif,"Microsoft JhengHei";
  58. }
  59. div.title
  60. {
  61. font-size: 60px !important;
  62. font-family: BPreplay, "Microsoft JhengHei";
  63. }
  64. input.username
  65. {
  66. font-family: montserrat,"helvetica neue",helvetica,arial,sans-serif,"Microsoft JhengHei";
  67. }
  68. span.player-name
  69. {
  70. font-family: montserrat,"helvetica neue",helvetica,arial,sans-serif,"Microsoft JhengHei";
  71. }
  72. div.status-bar__username
  73. {
  74. font-family: montserrat,"helvetica neue",helvetica,arial,sans-serif,"Microsoft JhengHei";
  75. }
  76. h3.nickname__text
  77. {
  78. font-family: montserrat,"helvetica neue",helvetica,arial,sans-serif,"Microsoft JhengHei";
  79. }
  80. li.players-block__member-name
  81. {
  82. font-family: montserrat,"helvetica neue",helvetica,arial,sans-serif,"Microsoft JhengHei";
  83. }
  84. `);
  85.  
  86. /* player.min.css in iframe "gameBlockIframe" (https://play.kahoot.it/game-blocks/quiz/player.min_1cdad0b3.css)
  87. span.question-choices__card-text = 選項,預設 1.125rem? 0.875rem?
  88. h1.question-bar__title = 選項出現時上面的題目,預設1.25rem;
  89. */
  90. var iframe = document.getElementsByTagName('iframe')[0];
  91. iframe.addEventListener("load", function() {
  92. var node = document.createElement('style');
  93. node.appendChild(document.createTextNode(`
  94. span.question-choices__card-text
  95. {
  96. font-size: 2.7rem !important;
  97. font-family: "Montserrat","Helvetica Neue",helvetica,arial,sans-serif,"Microsoft JhengHei";
  98. }
  99. h1.question-bar__title
  100. {
  101. font-size: 3rem !important;
  102. font-family: "Montserrat","Helvetica Neue",helvetica,arial,sans-serif,"Microsoft JhengHei";
  103. }
  104. `));
  105. window.frames[0].document.head.appendChild(node);
  106. });
  107.  
  108. /* player.min_e6985650.css in "scoreBoardIframe"
  109. https://play.kahoot.it/game-blocks/scoreboard/player.min_e6985650.css
  110. div.content__center = 每題後計分板排名的名字
  111. */
  112. var iframe2 = document.getElementsByTagName('iframe')[1];
  113. iframe2.addEventListener("load", function() {
  114. var node = document.createElement('style');
  115. node.appendChild(document.createTextNode(`
  116. div.content__center
  117. {
  118. font-family: "Montserrat","Helvetica Neue",helvetica,arial,sans-serif,"Microsoft JhengHei";
  119. }
  120. `));
  121. window.frames[1].document.head.appendChild(node);
  122. });

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址