Add a Trustscan button to the posts of the members from HF. - Hash G.
当前为
// ==UserScript==
// @name HF Trustscan
// @namespace HF Trustscan
// @description Add a Trustscan button to the posts of the members from HF. - Hash G.
// @include http://www.hackforums.net/*
// @version 1
// @grant none
// ==/UserScript==
if (document.URL.indexOf("showthread.php") >= 0) {
var uid = document.querySelectorAll('a[title="Find all posts by this user"]');
var buttonsLocation = document.querySelectorAll('.author_buttons.float_left');
for (n=0; n < uid.length; n++) {
var a_trustscan = document.createElement('a');
var trustscan_text = document.createTextNode("Trustscan");
a_trustscan.appendChild(trustscan_text);
a_trustscan.setAttribute('title', 'Trustscan of this user');
a_trustscan.setAttribute('target', '_blank');
a_trustscan.setAttribute('class', 'bitButton');
a_trustscan.setAttribute('href', 'http://www.hackforums.net/trustscan.php?uid=' + uid[n]);
buttonsLocation[n].appendChild(a_trustscan);
}
}