mirror of
https://github.com/chylex/Userscripts.git
synced 2025-05-01 10:34:05 +02:00
Add 'Wholesome Reddit'
This commit is contained in:
parent
7c1656fb4b
commit
8ce80b4fc8
34
Reddit/WholesomeReddit.user.js
Normal file
34
Reddit/WholesomeReddit.user.js
Normal file
@ -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();
|
Loading…
Reference in New Issue
Block a user