External Scripts - JohnnyRS/PandaCrazy-Max GitHub Wiki

PandaCrazy Max - External Scripts -

The previous Panda Crazy script allowed other users to create their own scripts to send messages to that script. This extension allows the same thing but it is different with more steps. The three major scripts that I am aware of being used with Panda Crazy are: HIT Forker, Overwatch and Panda Push. I was able to allow the same messages these scripts used so nothing needs to be changed. I placed an iframe on each of those pages so the iframe could listen for messages from the script and then pass it on to the extension. This is because the extension is run on a chrome-extension page so messages from MTURK are not allowed to be sent by other scripts due to security. Any external script running on MTURK should be able to run like this but I need to know so I can add an iframe on it as well. You can also add an iframe of your own so any messages will be passed to the iframe and then the iframe creates a CustomEvent to send a message to the extension like the example below.







[External Scripts not on MTURK]

There are some scripts running on forums or other pages to help users out and send messages to Panda Crazy. Most of these will still work if they open up the popup MTURK pages to send messages but there is another way and it will be a lot faster. This will only work on the forums that the extension runs on: turkerview, mturkcrowd, ourhitstop, discord, slack and mturkforum. If another page is needed then it must be requested and I can add those pages in the future.

  • You must use the three line code below to send a message. You can just copy the code and replace the [COMMAND] with your command you want to send to the extension. Replace the [DATA] with the data object for a HIT. It must have at least the GroupID and RequesterID for a search job. For more details of what commands and data you can send see below.
    let event = document.createEvent("CustomEvent");
    event.initCustomEvent("JR_message_pandacrazy", true, true, { time: new Date().getTime(), command: '[COMMAND]', data: {[DATA]}});
    document.dispatchEvent(event);

[Commands available for extension:]

  • pause
  • unpause
  • startcollect
  • stopcollect

















⚠️ **GitHub.com Fallback** ⚠️