質問には、要求された必要な HTMLがありませんが、一般的には、 「AJAX 駆動型サイトで適切なコントロールを選択してアクティブ化する」の手法を使用します。
何かのようなもの:
// ==UserScript==
// @name _YOUR_SCRIPT_NAME
// @include http://YOUR_SERVER.COM/YOUR_PATH/*
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js
// @grant GM_addStyle
// ==/UserScript==
/*- The @grant directive is needed to work around a design change
introduced in GM 1.0. It restores the sandbox.
*/
waitForKeyElements ("input[type='password']", logIn);
function logIn (jNode) {
var inputs = $("input");
//-- DO NOT HARDCODE LOGIN CREDENTIALS IN A SCRIPT!
$(inputs[0]).val ("username");
$(inputs[1]).val ("password");
//-- Might need to trigger a change or mouse event here.
waitForKeyElements (
"JQUERY SELECTOR FOR THE OK BUTTON IN THE ACTIVE STATE",
clickOK_Btn
);
}
function clickOK_Btn (jNode) {
triggerMouseEvent (jNode[0], "click");
}
function triggerMouseEvent (node, eventType) {
var clickEvent = document.createEvent('MouseEvents');
clickEvent.initEvent (eventType, true, true);
node.dispatchEvent (clickEvent);
}
ただし、ログイン資格情報をハードコーディングしないでください。機密情報フレームワークを使用します。