Guest User

hacker news dark mode

a guest
Oct 10th, 2018
374
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. // ==UserScript==
  2. // @name Hacker News - Dark Theme
  3. // @namespace http://userscripts.org/users/509235
  4. // @description A dark theme for Hacker News (YCombinator).
  5. // @include https://news.ycombinator.com*
  6. // @grant none
  7. // @version 1.0
  8. // ==/UserScript==
  9.  
  10. const style = `
  11. body {
  12. background: #332725;
  13. }
  14. * {
  15. font-family: Helvetica Neue;
  16. font-weight: 400;
  17. line-height: 1.6;
  18. }
  19. table#hnmain {
  20. background: transparent;
  21. }
  22. table.itemlist > *,
  23. table.fatitem > *,
  24. table.comment-tree > *{
  25. filter: invert()
  26. }`
  27.  
  28. const x = document.createElement('style')
  29. x.innerHTML = style
  30. document.body.appendChild(x)
Add Comment
Please, Sign In to add comment