[.05 K Ehinger]Image naming

Auto-opens survey link in new window

  1. // ==UserScript==
  2. // @name [.05 K Ehinger]Image naming
  3. // @namespace robert
  4. // @namespace https://greasyfork.org/en/users/13168-robert
  5. // @include https://search.partners.org/mturk/naming/mturk.html*
  6. // @version 1
  7. // @grant none
  8. // @run-at document-end
  9. // @description Auto-opens survey link in new window
  10. // @require http://code.jquery.com/jquery-2.1.0.min.js
  11. // ==/UserScript==
  12.  
  13. /*
  14. To do:
  15. - after open new window, focus textbox
  16. - copy/paste validation code
  17. - give user option to autosubmit
  18. */
  19.  
  20. if ( $("p:contains('kehinger@partners.org')").length )
  21. {
  22. document.getElementById('checkconsent').click();
  23. var surveyUrl = 'https://search.partners.org/mturk/naming/index.php?assignmentid=' + gup('assignmentId') +
  24. '&workerid=' + gup('workerId');
  25. window.open(surveyUrl, "MsgWindow", '_blank', 'toolbar=0,location=0,menubar=0');
  26. }
  27.  
  28. /*
  29. Auto-opens survey link in new window
  30. */