Better hackernews styles

A user script to enchance Hacker News page styles

当前为 2023-02-03 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Better hackernews styles
  3. // @namespace https://greasyfork.org/en/users/1019658-aayush-dutt
  4. // @version 1.2
  5. // @description A user script to enchance Hacker News page styles
  6. // @author aayushdutt
  7. // @match https://news.ycombinator.com/*
  8. // @grant none
  9. // @license MIT
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. 'use strict';
  14.  
  15. const styles = `<style>
  16. .comment,
  17. .toptext,
  18. .subtext,
  19. .spacer {
  20. font-size: 15px;
  21. line-height: 1.5;
  22. }
  23.  
  24. .title {
  25. font-size: 16px;
  26. }
  27.  
  28. .title a:hover {
  29. text-decoration: underline;
  30. }
  31.  
  32. .comhead,
  33. .pagetop {
  34. font-size: 14px;
  35. line-height: 1.5;
  36. }
  37.  
  38. .spacer {
  39. height: 12px !important;
  40. }
  41.  
  42. td > table {
  43. width: 100%;
  44. }
  45. </style>`
  46.  
  47. document.head.insertAdjacentHTML("beforeend", styles)
  48.  
  49. })();