diff --git a/Reddit/WholesomeReddit.user.js b/Reddit/WholesomeReddit.user.js new file mode 100644 index 0000000..0d739ea --- /dev/null +++ b/Reddit/WholesomeReddit.user.js @@ -0,0 +1,34 @@ +// ==UserScript== +// @name Wholesome Reddit +// @description Hides the downvote button, and forces the upvote button to be always visible. +// @version 1 +// @license MPL-2.0 +// @namespace https://chylex.com +// @homepageURL https://github.com/chylex/Userscripts +// @supportURL https://github.com/chylex/Userscripts/issues +// @include https://*.reddit.com +// @include https://*.reddit.com/* +// @run-at document-start +// @grant none +// ==/UserScript== + +var style = ` +body:not(:lang(np)) .arrow.up { + visibility: visible !important; + pointer-events: auto !important; +} + +body:not(:lang(np)) .arrow.down { + visibility: hidden !important; +}`; + +function inject(){ + if (document.head && document.body){ + document.head.insertAdjacentHTML("beforeend", `<style type="text/css" id="wholesome-reddit">${style}</style>`); + } + else{ + window.setTimeout(inject, 50); + } +}; + +inject();