Web Panda Default Handler

Latest update: Fixed the value in the "survey accepted" notification so that it always uses 2 decimal places for the cents value.

Author
Salem Beats
Daily installs
0
Total installs
348
Ratings
0 1 0
Version
11.0
Created
Updated
License
N/A
Applies to

Author's Description

How To Use

First-time setup

After the script is installed, you will need to set it up by visiting the following page while logged in to Mechanical Turk:

https://worker.mturk.com/requesters/registerWebPanda

Once on that page with the userscript installed, you will need to look for a popup or an button to set it up. Protocol handlers are rarely high-priority in browser UIs, so you may have to scan around a little bit before you find where it has been requested.

Chrome: In the current version of Chrome, this appears as a small double-diamond icon inside the URL bar, towards the far-right. You must click this and click "Accept".

Firefox: In the current version of Firefox, it appears as a request below the URL bar. Click "Allow/Accept".

Other Browsers: Other modern browsers should also prompt you in one way or another to allow this extension to handle web+panda:// links. How the request is presented may vary.

After setting up

This script will grab HITs that follow the web+panda:// protocol.

Known issues

"Simultaneously-opened instances cause the script to behave erratically or not work at all until settings are cleared."

Due to some quirks with cross-script synchronization, opening multiple web+panda:// links with this handler simultaneously can cause it to go haywire and not respond properly again until a few key script settings are set.

The root of the issue is the lack of true concurrent programming functionality in Javascript.

What happens is that each script initializes itself based on a snapshot of the stored database settings at the time it was opened. Because this database includes information like instance counts, which are normally incremented at startup and decremented at shutdown, what happens is something like this example:

  • 5 instances are opened,
  • Each instance accesses a copy of the database information that says "You had 0 instances before this...",
  • Each instance increments the instance count based on the number of instances it knew about (0), and stores the new count (1) to the database,
  • The outcome is that when the instances are opened simultaneously, you usually end up with 5 extra copies, but only 1 instance accounted for in the database. This causes issues.

Because of the asynchronous and sometimes undpredictable nature of the GM_ storage functionality, this issue sometimes presents itself if you manually refresh the page (i.e., with F5) as well.

Deregistering Handlers

If you had already used a different extension as your web+panda:// handler and want to switch to this one (or you want to switch away from this one to another one), you may need to go into your browser settings to deregister the current handler setting.

Chrome: In the current version of Chrome, you can manage your handlers by visiting:

chrome://settings/handlers

web+panda:// Protocol Standard

Currently, the web+panda protocol works loosely as follows:

web+panda://GID?flags&go&here

GID refers to the Hit Set ID (formerly Group ID) of the HIT to catch.

The ?flags&go&here segment can be replaced with various optional flags.

Currently Supported Flags:

once=true
Only catch the HIT once, then stop trying to catch it.

rid=ridGoesHere
Identify the requester's ID by whatever you put as ridGoesHere.

hitTitle=hitTitleGoesHere
Identify the HIT's title by whatever you put as hitTitleGoesHere.

hitDescription=hitDescriptionGoesHere
Identify the HIT's description by whatever you put as hitDescriptionGoesHere.

hitValue=hitValueGoesHere
Identify the HIT value in 0.01 format in USD by whatever you put as hitValueGoesHere.

requesterName=requesterNameGoesHere
Identify the requester's name by whatever you put as requesterNameGoesHere.

contextURL=encodedURL
The URL of the site the link came from, including anchors or any URL information that might be able to zero-in on a specific page or section (i.e., permalinks to forum posts, page numbers or search terms for scrapers, etc.).

Planned Flags:

priority=lowMediumHighOrNumericPercentageAsIntegerOrDecimal
Define the priority of the HIT. How or whether the catcher implements prioritization may vary, but some ideas may be skipping cycles for low-priority HITs, or more complicated methods of evenly sharing HITs.

exclusivePriority=1
All running items who share the highest exclusive priority will prevent other HITs from being checked. 1 can be changed to any integer or decimal number.

batchOrSurvey=batchOrSurvey
Hinting flag to tell the catcher that the HIT is a survey or batch. Most of the time, a catcher should only bother catching a survey once. Also, the catcher may have user-defined default settings that differ between batches and surveys for priority, cycler time, when/whether to give up on HITs, etc.

giveUpAfterAttempts=1000
Indicate that the catcher should give up on this HIT after the given number of attempts. If the catcher inmplements this feature, this should be treated as a rule rather than as a hint, and should override any batch/survey settings. 1000 can be changed to any number of seconds.

giveUpAfterSeconds=1000
Indicate that the catcher should give up on this HIT after the given number of seconds. If the catcher inmplements this feature, this should be treated as a rule rather than as a hint, and should override any batch/survey settings. 1000 can be changed to any number of seconds.

cyclerIntervalMilliseconds=1000
Hints to the catcher the rate at which this HIT should be run. Best conceptualized as Panda Crazy's "Ham Timer". 1000 can be changed to any number of milliseconds.

contextHTML=encodedHTML

contextText=encodedText

contextType=forumOrScraperOrWorkerSiteOrFacebookEtc

posterName=whoPostedTheHIT

postedWhen=100000000000000

posterComments=Yo%20dont%20do%this%20HIT%20unless%20you%20like%20spiders

"Might-be-Added" Flags:

toPay=5
toFair=5
toComm=5
toFast=5

tvHourly=12.00

tvPros=This%20was%20a%20great%20HIT

tvCons=It%20was%20boring

soundOnAccept=trueOrFalse
Whether or not to play a sound when the HIT is accepted.