HF Give Reputation On Thread

Adds a '+' next to an user's reputation

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name        HF Give Reputation On Thread
// @description Adds a '+' next to an user's reputation
// @include     *http://hackforums.net/showthread.php*
// @version     1.0
// @namespace https://greasyfork.org/users/24272
// ==/UserScript==




min = 0;
var repElements = document.getElementsByClassName('smalltext post_author_info');

for (i = 0; i < document.links.length; i++){


	if (document.links[i].href.indexOf('reputation.php?uid=') > -1){

addPos(document.links[i].href);
min++;
		}

			
	}

function addPos(str){
	var item = repElements[min];
			url = str;
		currUID = url.toString().split('?')[1];
		currUID2 = currUID.toString().split('=')[1];
		giveRepURL = "javascript:MyBB.reputation("+currUID2+")";
	//If an user has awards, add extra breakline, then append and return to prevent double appending
		if (item.innerHTML.indexOf('<br>') > 19){
			item = item.insertAdjacentHTML('beforeend', "<br><b><a href="+ giveRepURL + ">Rate User</a></b>");
			return;
		}
		

    item = item.insertAdjacentHTML('beforeend', "<b><a href="+ giveRepURL + ">Rate User</a></b>");



}