Panda Crazy Script for Panda's

Business Cat

Catipalist
Contributor
Joined
Jan 12, 2016
Messages
1,578
Reaction score
6,222
Points
838
Location
Saint Louis
Gender
Female
A couple suggestions, I didn't check the thread to see if people already made them -
When editing details of a panda, it would be nice if the cursor would default in the Friendly Req name field
In the captcha warning popup, when the requester name is known, if that could be bolded or somehow more obvious at a glance
 

T. Leela

Oh Lord...
Contributor
Joined
May 12, 2016
Messages
11,050
Reaction score
14,046
Points
1,388
Location
Colorado
Gender
Female
I had a couple suggestions too. Except I feel bad suggesting because i am so greatful to have this in first place! And also I realize that having absolutely no clue...these may not be feasible or more work than its wotth. But anyway,
1. a way to multi-select hits to delete, i put off deleting though the x certainly helps but because i end up with more pandas than i should and it takes me forever to delete.
2. If possible to have an option to have the same hits set to panda, delayed panda etc when i restart, incase i have to restart my browser or accidentally close it, w/out having to set it as a group, as too often its bc of something weird happening and saving a group isnt an option (power shuts off, things freeze on my screwed up pc, i just close the wrong tab, etc) plus i have too many groups that i am bad abt keeping up with.
3. Have the panda helper buttons run on the new site. Im using distill auto-refresher and when i get a notification for a hit that meets my filter, it has changed so that when i click on it, it opens the new site and if there is no hits left i no longer have a panda button and have to pull up distills dashboard where i cant export from either.

But mostly thank you :)
 
Last edited:

Johnnyrs

Active Member
Contributor
Crowd Pleaser
Joined
Jan 12, 2016
Messages
546
Reaction score
1,603
Points
668
Age
54
Location
Whittier, California
Gender
Male
A couple suggestions, I didn't check the thread to see if people already made them -
When editing details of a panda, it would be nice if the cursor would default in the Friendly Req name field
In the captcha warning popup, when the requester name is known, if that could be bolded or somehow more obvious at a glance
I don't really want to make the cursor default to any one particular detail because I can see other people changing the requester ID or group ID more than the friendly names especially if the script already figured out the name.
I can bold up the requester name in the captcha popup. Not a problem.
 
  • Like
Reactions: Business Cat

Johnnyrs

Active Member
Contributor
Crowd Pleaser
Joined
Jan 12, 2016
Messages
546
Reaction score
1,603
Points
668
Age
54
Location
Whittier, California
Gender
Male
I had a couple suggestions too. Except I feel bad suggesting because i am so greatful to have this in first place! And also I realize that having absolutely no clue...these may not be feasible or more work than its wotth. But anyway,
1. a way to multi-select hits to delete, i put off deleting though the x certainly helps but because i end up with more pandas than i should and it takes me forever to delete.
2. If possible to have an option to have the same hits set to panda, delayed panda etc when i restart, incase i have to restart my browser or accidentally close it, w/out having to set it as a group, as too often its bc of something weird happening and saving a group isnt an option (power shuts off, things freeze on my screwed up pc, i just close the wrong tab, etc) plus i have too many groups that i am bad abt keeping up with.
3. Have the panda helper buttons run on the new site. Im using distill auto-refresher and when i get a notification for a hit that meets my filter, it has changed so that when i click on it, it opens the new site and if there is no hits left i no longer have a panda button and have to pull up distills dashboard where i cant export from either.

But mostly thank you :)
  1. You can multi-select hits to delete already. Go to the jobs menu. Click on the list button. It will show all the jobs you have saved. Along the left side of the window you will see checkboxes. Click on the checkboxes of the jobs you want deleted. Then click on the delete selected button at top. It will delete all the jobs you have selected.
  2. Ok. I might be able to figure out a way to have an option for the delayed ham stuff. I have some jobs I always put on delayed ham too so I can see where that would be nice to have.
  3. Yes I have that near the top of my list to do for the helper script. Actually panda crazy does recognize the new preview and panda url's and can figure out the group id from it. So you can in theory copy and past a url from the new site and use the add button in panda crazy to add the job. It's not fast as a nice button but it's something until I can update the helper script.
 

T. Leela

Oh Lord...
Contributor
Joined
May 12, 2016
Messages
11,050
Reaction score
14,046
Points
1,388
Location
Colorado
Gender
Female
  1. You can multi-select hits to delete already. Go to the jobs menu. Click on the list button. It will show all the jobs you have saved. Along the left side of the window you will see checkboxes. Click on the checkboxes of the jobs you want deleted. Then click on the delete selected button at top. It will delete all the jobs you have selected.
  2. Ok. I might be able to figure out a way to have an option for the delayed ham stuff. I have some jobs I always put on delayed ham too so I can see where that would be nice to have.
  3. Yes I have that near the top of my list to do for the helper script. Actually panda crazy does recognize the new preview and panda url's and can figure out the group id from it. So you can in theory copy and past a url from the new site and use the add button in panda crazy to add the job. It's not fast as a nice button but it's something until I can update the helper script.
Thanks! Now that you mention this, re: the first one, this should have occurred to me :( but since it didn't I'm glad I asked.
Thanks again
 

Kadauchi

Well-Known Member
Master Pleaser
Crowd Pleaser
Joined
Jan 12, 2016
Messages
7,098
Reaction score
21,951
Points
1,263
Thanks! I'll make the change when I see it. Updating the scripts soon so perfect timing.
Gonna look something like this. So <mts-tpe-earnings> is gonna be what you want. (could possibly change it before the Sunday update, but super unlikely)

Code:
const todaysProjectedEarnings = {
  mts: {},
  execute () {
    document.getElementById(`subtabs_and_searchbar`).insertAdjacentHTML(
      `afterbegin`,
      `<mts-tpe>
        <mts-tpe-bar>
          <mts-tpe-progress style="width: ${+this.mts.tpe / +this.mts.goal * 100}%;" />
        </mts-tpe-bar>
        <mts-tpe-projected>
          <mts-tpe-earnings>$${(+this.mts.tpe).toFixed(2)}</mts-tpe-earnings>
          /
          <mts-tpe-goal>${(+this.mts.goal).toFixed(2)}</mts-tpe-goal>
        </mts-tpe-projected>
      </mts-tpe>`
    );
  },
  update () {
    const progress = document.querySelector(`mts-tpe-progress`);
    const earnings = document.querySelector(`mts-tpe-earnings`);
    const goal = document.querySelector(`mts-tpe-goal`);

    if (progress) progress.style.width = `${+this.mts.tpe / +this.mts.goal * 100}%`;
    if (earnings) earnings.textContent = `$${(+this.mts.tpe).toFixed(2)}`;
    if (goal) goal.textContent = (+this.mts.goal).toFixed(2);
  },
  storageLocalGet (result) {
    todaysProjectedEarnings.mts = result.tpe;
    todaysProjectedEarnings.execute();
  },
  storageOnChanged (changes) {
    if (changes.tpe) {
      const newVal = changes.tpe.newValue;
      const oldVal = changes.tpe.oldValue;
     
      todaysProjectedEarnings.mts = {
        tpe: newVal.tpe ? newVal.tpe : oldVal.tpe,
        goal: newVal.goal ? newVal.goal : oldVal.goal
      };
     
      todaysProjectedEarnings.update();
    }
  }
};

if (document.querySelector(`a[href="/mturk/beginsignout"]`)) {
  chrome.storage.local.get(`tpe`, todaysProjectedEarnings.storageLocalGet);
  chrome.storage.onChanged.addListener(todaysProjectedEarnings.storageOnChanged);
  document.addEventListener(`click`, function (event) {
    const element = event.target;
     
    if (element.closest(`mts-tpe`)) {
      window.open(chrome.runtime.getURL(`/todays_hits_menu.html`));
     }
  });
}
 

ScrapingForQuarters

New Member
Joined
Mar 10, 2016
Messages
32
Reaction score
0
Points
256
Age
71
Location
Chicago Area
Gender
Male
If I have exactly 2 Searches running in "default mode", one runs twice as fast as the other.

If I manage to give them both a red border, they run at the same rate, with an elapsed of 2s on each.

If 1 of the two has the red border, they run at the same rate, with an elapsed of 2s on each.
 

Johnnyrs

Active Member
Contributor
Crowd Pleaser
Joined
Jan 12, 2016
Messages
546
Reaction score
1,603
Points
668
Age
54
Location
Whittier, California
Gender
Male
If I have exactly 2 Searches running in "default mode", one runs twice as fast as the other.
If I manage to give them both a red border, they run at the same rate, with an elapsed of 2s on each.
If 1 of the two has the red border, they run at the same rate, with an elapsed of 2s on each.
There is a complicated reason for this and it's because the script can't distinguish from you doing all the hits in a batch or if it's being throttled. One of your searches probably has hits still in search so the script keeps trying to panda them but you have done all the hits you can in the batch. So that search is faster than the other because it sends a panda after it finds the hit. When you have a red border around a search job it now becomes just a regular panda. It does no searching.

For example I tested it with 3 searches: pinterest, c-sat and noblis. Pinterest is the only one that has a batch up now but I have done all of the hits. If I turn on c-sat and pinterest I will see the elapsed time difference. If I turn on c-sat and noblis I don't see it because they have no hits up.

The only way to fix it is to have a search option to exclude those hits you have done or don't want to do. The next update will have that option which will come this weekend. It's kind of a big update so I need to test a lot.
 

ScrapingForQuarters

New Member
Joined
Mar 10, 2016
Messages
32
Reaction score
0
Points
256
Age
71
Location
Chicago Area
Gender
Male
One of them was the "new Wills" by Brian Z which fits the scenario you describe. I guess I've grabbed all 9 or 10 in the current batch, but the problem is I have no idea when the next batch will drop, and I want to "search" for them till they do.
 

Johnnyrs

Active Member
Contributor
Crowd Pleaser
Joined
Jan 12, 2016
Messages
546
Reaction score
1,603
Points
668
Age
54
Location
Whittier, California
Gender
Male
One of them was the "new Wills" by Brian Z which fits the scenario you describe. I guess I've grabbed all 9 or 10 in the current batch, but the problem is I have no idea when the next batch will drop, and I want to "search" for them till they do.
Yes Brian Z would cause that problem if it's in search mode. The groupID seems to be the same for a long while so you can just set it as a panda or set the red border around it. The panda link may change if he sets up a different timer or changes something which he does occasionally. But if he's being active I think it's safe to just make it a panda. When he goes on a break then set it back to a search if you want.
 

Johnnyrs

Active Member
Contributor
Crowd Pleaser
Joined
Jan 12, 2016
Messages
546
Reaction score
1,603
Points
668
Age
54
Location
Whittier, California
Gender
Male
Today I released a new update (0.5.0) to greasyfork. Be sure to update it if greasemonkey/tampermonkey doesn't update it automatically. Should update it automatically sometime today. Be sure to backup your data by exporting it from the jobs menu at top so you won't lose anything if something goes wrong.

New Features:
  • Search mode has 3 new options which will let you filter out hits by term or group ID. use these so it won't panda hits you don't want to do or already have done. You can also include hits by term for it to panda for you. Only one term will be searched so don't use commas to separate multiple terms. Doesn't work that way and could be extremely slow if it had to search each hit for each term.
  • Search mode can now be limited to a max price. Remember these new options are for convenient but could slow down search jobs so use them sparingly. Later I might allow more GID and terms.
  • You can now revert options back to the default value by pressing a D button on the right side of a text input field or double click the number for incremental digit values.
  • Ham timer can now be lowered to 5 seconds instead of 10 for delayed ham timer mode.
  • You can now force a job to automatically go into delayed ham mode on the job edit dialog.
  • The stop auto slowdown button option will now be saved so you don't have to always turn it on each time you restart the script.
  • Script detects mturk daily limit and will stop all jobs giving a new message as well.
  • You can now set a dailylimit in the details dialog for a job which can be used for personal limits you want. It resets at midnight MTURK time or if you set the dailylimit back to 0.
  • When receiving a captcha the requester name is now bold in the dialog that pops up.
  • Script now will work on the new site but with limited features and some problems. Two ways to make it work on new site:
  • Using the worker.mturk.com url to start Panda Crazy will allow it to accept added hits from the helper script when that gets updated in the future. If you use the old mturk.com url to start it then it only accepts added jobs from the helper script from the mturk.com and not from the new site. This is a security feature from the browser dealing with messaging passing only allowed on same domain name and not including subdomains.
  • Current problems and feature changes for new site:
    • Return links in queue watch will not be shown due to a different way of returning which needs more information.
    • Pantha jobs will just do a regular panda due to changes in the accepting a specific hit on new site. (Pantha mode is no longer great anyway)
    • Any filtered jobs will only panda the hits and not filter them out due to changes in the accepting a specific hit on new site.
    • Captchas on the new site will not be detected until I can find out what the script should be looking for.
  • More efficient use of the queue data for the queue helper script which will be updated soon with many new features.
Bugs Fixed:
  • Dialogs should show correct text color even if using stylish to change mturk theme.
  • Jobs Date Added will show the full date instead of a shorten version.
This was a big update with a lot of new features so if there are any problems please tell me here. There will be an update for the Queue helper and the regular helper later this week. There were some behind the scene changes in this update to give the queue helper some added features and be a bit faster.
 
Last edited:

JrRandy

New Member
Joined
Apr 3, 2017
Messages
9
Reaction score
0
Points
201
Age
45
Hey Johnnyrs, love the script and been using it for a while. One thing I have noticed (I have been running it on the worker site for a while now, is that the Captcha Alert no longer works. Spits out errors in the console vs actually alerting you that you have hit a captcha. I have tried to work around it myself, but have yet to find a solution (Note: I am not very good at programming, I can usually just modify to suit my needs).
 

Johnnyrs

Active Member
Contributor
Crowd Pleaser
Joined
Jan 12, 2016
Messages
546
Reaction score
1,603
Points
668
Age
54
Location
Whittier, California
Gender
Male
Hey Johnnyrs, love the script and been using it for a while. One thing I have noticed (I have been running it on the worker site for a while now, is that the Captcha Alert no longer works. Spits out errors in the console vs actually alerting you that you have hit a captcha. I have tried to work around it myself, but have yet to find a solution (Note: I am not very good at programming, I can usually just modify to suit my needs).
Thanks for reminding me about this. I don't get captcha's so I have no idea what the script needs to look for in the source code of a page. I was able to do it for the old page because scripts were already made for it. I'll just have to find out what the new site uses to show the captcha so I can get it working. I'll add that in the release notes.
 

JrRandy

New Member
Joined
Apr 3, 2017
Messages
9
Reaction score
0
Points
201
Age
45
Thanks for reminding me about this. I don't get captcha's so I have no idea what the script needs to look for in the source code of a page. I was able to do it for the old page because scripts were already made for it. I'll just have to find out what the new site uses to show the captcha so I can get it working. I'll add that in the release notes.
Yeah, in the old site the captcha box is named, so its alerting when it finds that named box on the page. The new site does not appear to tag a name to the box, so it wasnt as simple as adjusting the name in the code to get it to alert. Is there anything I can provide to help?

I found it! Line 1403 needs to be changed to:
if (htmlDoc.getElementsByClassName("captcha-image").length)

Instead of:
if (htmlDoc.getElementsByName("userCaptchaResponse").length)

This will resolve the Captcha alert issue on the worker side of things.
 
Last edited:

Johnnyrs

Active Member
Contributor
Crowd Pleaser
Joined
Jan 12, 2016
Messages
546
Reaction score
1,603
Points
668
Age
54
Location
Whittier, California
Gender
Male
Yeah, in the old site the captcha box is named, so its alerting when it finds that named box on the page. The new site does not appear to tag a name to the box, so it wasnt as simple as adjusting the name in the code to get it to alert. Is there anything I can provide to help?
I found it! Line 1403 needs to be changed to:
if (htmlDoc.getElementsByClassName("captcha-image").length)
Instead of:
if (htmlDoc.getElementsByName("userCaptchaResponse").length)
This will resolve the Captcha alert issue on the worker side of things.
Thanks! So that is working on the new site but it probably breaks detection on the old site right?
If so try replacing that line with:
Code:
if (htmlDoc.getElementsByName("userCaptchaResponse").length || htmlDoc.getElementsByClassName("captcha-image").length) {
Tell me if that works on both sites and I'll get it fixed in a new update.
 

JrRandy

New Member
Joined
Apr 3, 2017
Messages
9
Reaction score
0
Points
201
Age
45
Thanks! So that is working on the new site but it probably breaks detection on the old site right?
If so try replacing that line with:
Code:
if (htmlDoc.getElementsByName("userCaptchaResponse").length || htmlDoc.getElementsByClassName("captcha-image").length) {
Tell me if that works on both sites and I'll get it fixed in a new update.
I would assume it does, I run on 2 separate computers so wasnt experiencing any pain on the other system lol I have updated both systems with the new link, now just have to wait for a captcha on each and I will let you know. Should work based on the logic :)

Update: Works on www. site, pending a captcha on Worker to confirm still functioning there.
 
Last edited:

JrRandy

New Member
Joined
Apr 3, 2017
Messages
9
Reaction score
0
Points
201
Age
45
Johnnyrs @Johnnyrs - That worked for the alert. Will need to update the link to open job on the new worker site to type in the captcha as well, its opening the www site even though the alert popped on the worker site.
 

Eisenpower

It was all a genjutsu
Joined
Mar 14, 2017
Messages
15
Reaction score
48
Points
263
Age
32
Location
Tsukuyomi
Gender
Male
Hi. First, I want to say thanks for creating such a program. I'm still pretty new to Turking, but this script is awesome. I wish I had the knowledge and skills to make things like this. I hope you're proud. Second, I wanted to ask if there was a way I could sync my jobs between two computers. I tried to export from one to the other thinking it will only add the ones it doesn't have or let me choose, but it took off everything and cloned the import. I go back and forth between a desktop and a laptop, so I don't always have them running the same jobs and I was looking for a way to sync the ones the other is missing without having to manually add each of them. Is there a way I can do that?