Greasy Fork

Greasy Fork is available in English.

Kbin Remove Reputation

Remove reputation points from user's profile. Navigate Kbin unbiased.

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         Kbin Remove Reputation
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Remove reputation points from user's profile. Navigate Kbin unbiased.
// @author       minnieo
// @match        https://kbin.social/*
// @match        https://fedia.io/*
// @match        https://karab.in/*
// @match        https://www.kbin.cafe/*
// @match        https://karab.in/*
// @match        https://readit.buzz/*
// @match        https://forum.fail/*
// @match        https://fedi196.gay/*
// @match        https://feddit.online/*
// @match        https://kbin.run/*
// @match        https://nadajnik.org/*
// @match        https://kbin.cafe/*
// @match        https://kbin.lol/*
// @match        https://nerdbin.social/*
// @match        https://kbin.lgbt/*
// @match        https://kbin.place/*
// @match        https://kopnij.in/*
// @match        https://kbin.sh/*
// @match        https://kayb.ee/*
// @match        https://wiku.hu/*
// @match        https://kbin.chat/*
// @match        https://fediverse.boo/*
// @match        https://tuna.cat/*
// @match        https://kbin.dk/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=kbin.social
// @grant        none
// @license      MIT
// ==/UserScript==


// check if reputation removal is enabled
let repEnabled = localStorage.getItem('repEnabled') === 'true';


function reputation() {
  const currentURL = window.location.href;
  

  if (!repEnabled) {
    return;
  }

  const popover = document.getElementById('popover')
  if (popover) {
    popover.addEventListener('openPopover', (e) => {
    const element = e.target;
    const liElement = element.querySelector('li:nth-child(2)');
    if (liElement)  {
      liElement.remove();
   
    }
  });
  if (currentURL.startsWith('https://kbin.social/u/')) {
    document.querySelector('.section.user-info .info li:nth-child(2)').remove();
  } else {
    return;
  }
  
}
 
}



reputation();



// checkbox (toggle on and off)
const headerMenu = document.querySelectorAll('#header.header menu')[1];
const profileDropdown = headerMenu.querySelectorAll('li.dropdown')[2];
const repToggleCont = document.createElement('li');
const repToggle = document.createElement('a');
repToggle.className = repEnabled ? 'fa-solid fa-square-check' : 'fa-solid fa-square';
repToggle.title = repEnabled ? 'Show reputation (reloads page)' : 'Hide reputation';
repToggleCont.appendChild(repToggle)
headerMenu.appendChild(repToggleCont);

repToggle.addEventListener('click', () => {
  repEnabled = !repEnabled;
  localStorage.setItem('repEnabled', repEnabled);

  if (repEnabled) {
    repToggle.classList.replace('fa-square', 'fa-square-check');
    reputation();
  } else {
    repToggle.classList.replace('fa-square-check', 'fa-square');
    location.reload();
  }

  
});