mmmturkeybacon PandA HEAD request

Accepts a HIT with a PandA link by a HEAD request instead of a normal GET request. Add &MTB_HEAD_REQUEST to the end of a PandA URL to run. This is a very bare bones script and gives almost no feedback to the user, so keep an eye on your queue and edit REQUEST_DELAY to suit your needs.

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

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

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name        mmmturkeybacon PandA HEAD request
// @version     1.00
// @description Accepts a HIT with a PandA link by a HEAD request instead of a normal GET request. Add &MTB_HEAD_REQUEST to the end of a PandA URL to run. This is a very bare bones script and gives almost no feedback to the user, so keep an eye on your queue and edit REQUEST_DELAY to suit your needs.
// @author      mmmturkeybacon
// @namespace   http://userscripts.org/users/523367
// @match       https://www.mturk.com/mturk/previewandaccept*&MTB_HEAD_REQUEST
// @require     https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js
// @grant       GM_log
// ==/UserScript==


var REQUEST_DELAY = 2000; // milliseconds, 1000 milliseconds = 1 seconds
var TIMEOUT_TIME_LIMIT = 10000;

$(document).ready(function()
{
    function head_request()
    {
//console.log(Date.now());
        $.ajax({
            url: window.location.href,
            type: 'HEAD',
            success: function(data)
            {
//console.log(Date.now());
                setTimeout(head_request, REQUEST_DELAY);
            },
            error: function(xhr, status, error)
            {
                alert('mmmturkeybacon PandA HEAD request timed out. Reload page to restart.');
            },
            timeout: TIMEOUT_TIME_LIMIT
        });
    }

    head_request();
});