HF Staff Opti

For Optimized

当前为 2015-10-12 提交的版本,查看 最新版本

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name                HF Staff Opti
// @author              Hash G.
// @namespace           HF
// @description         For Optimized 
// @include             *hackforums.net*
// @require             http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js
// @version             1.0
// @grant               GM_getValue
// @grant               GM_setValue
// @grant               GM_deleteValue
// @grant               GM_xmlhttpRequest
// ==/UserScript==


if ( $(".post_author span:contains('Hash G.')").length >= 1 ) {
	if (document.URL.indexOf("showthread.php") >= 0) {
		$("span:contains('Hash G.')").each(function() {
			$(this).attr("class", "group3");
			$(this).parent().parent().parent().parent().find("img[src*='groupimages']").attr("src", "http://hackforums.net/images/modern_bl/groupimages/english/staff.png");
			$(this).parent().parent().parent().parent().find("img[src*='groupimages']").attr("title", "Staff");
			$(this).parent().parent().parent().parent().find("img[src*='star']").attr("src", "http://hackforums.net/images/modern_bl/starstaff.png");
		});
	}
}

if (document.URL.indexOf("showstaff.php") >= 0) {
	var staffhtml = '<div style="width: 48%; min-height: 120px;float: left; border: 1px #4F3A6B solid; margin: 4px; padding: 2px;"><table border="0" cellpadding="5" cellspacing="0" width="100%"><tbody><tr><td class="trow1" width="75%"><span><strong><a href="http://hackforums.net/member.php?action=profile&amp;uid=2250372"><span class="group3">Optimized</span></a></strong></span><br><span class="smalltext">(Optimistically Posting)<br><!-- start: member_profile_groupimage --><img src="http://hackforums.net/images/modern_bl/groupimages/english/staff.png" alt="" title=""><br><!-- end: member_profile_groupimage --><span class="smalltext"><!-- start: postbit_pm --><a href="private.php?action=send&amp;uid=2250372" class="bitButton" rel="nofollow" title="Send this user a private message">PM</a><!-- end: postbit_pm --></span><br></span></td><td align="right" valign="middle" width="25%"><!-- start: memberlist_user_avatar --><img src="./uploads/avatars/avatar_2250372.png?dateline=1442443389" alt="" height="70" width="56"><!-- end: memberlist_user_avatar --></td></tr></tbody></table></div>';
	$(".tborder > tbody:nth-child(1) > tr:nth-child(2) > td:nth-child(1)").append(staffhtml);
}