GameFAQs - Private Board User Profile Invite button

GameFAQs - Private Board User Profile Invite button descr

目前為 2015-05-12 提交的版本,檢視 最新版本

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name        GameFAQs - Private Board User Profile Invite button
// @namespace   http://userscripts.org/scripts/source/181912.user.js
// @description GameFAQs - Private Board User Profile Invite button descr
// @include     http://www.gamefaqs.com/users/*/boards
// @version     1.1
// @grant       none
// ==/UserScript==

var board = "848"; //Enter the board number you are admin of here

//Do not edit below this line unless you know what you're doing.

var tbody = document.getElementsByTagName('tbody')[0];
var user = tbody.getElementsByTagName('td')[1];
var username = user.innerHTML;
var user_key = document.forms[1].key.value;
document.getElementsByClassName("span8")[0].innerHTML+=' <form action="http://www.gamefaqs.com/boardaction/848-?admin=1" method="post" style="display:inline;margin:0;padding:0;" name="gm_invite">'
+ '<input type="hidden" name="target_text" value="'+username+'" /><input type="hidden" name="key" value="'+user_key+'"><input type="hidden" name="action" value="addmember" /></form>'
+ '<input type="button" onclick="document.forms[\'gm_invite\'].submit();" value="Invite" />';