Share your CSS and JS snippets here
Share your CSS and JS snippets here
Here's a place to share your little tweaks that you might think aren't big enough to warrant a full post, share away!
You're viewing a single thread.
tampermonkey script to automatically hide voted (upvoted or downvoted) posts. Keep your feed always fresh.
// ==UserScript==
// @name hide voted posts
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://kbin.social/
// @match https://kbin.social/?p=*
// @icon https://www.google.com/s2/favicons?sz=64&domain=kbin.social
// @grant none
// ==/UserScript==
//(function() {//})();
var $ = window.jQuery;window.setInterval(clearVoted, 1000);
function clearVoted() {
'use strict';
var votedPosts = $('.vote__up.active') || $('.vote__down.active');
votedPosts.each(function() {
$(this).closest('.entry').css({'display':'none'});
});
}5 0 ReplyI can see that it's running, but it doesn't seem to work for me. :(
1 0 ReplyI'm not sure if this is fine but since it wasn't active on every page I've added an asterisk on row 7 like this:
// @match https://kbin.social/*
and it seems to work.1 0 Reply