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.

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

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

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

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

你需要先安裝一款使用者腳本管理器擴展,比如 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();
});