Expand Survey Instructions

Auto-expand the collapsed survey instructions used in some HITs.

  1. // ==UserScript==
  2. // @name Expand Survey Instructions
  3. // @version 0.2.1
  4. // @description Auto-expand the collapsed survey instructions used in some HITs.
  5. // @author Kerek
  6. // @namespace Kerek
  7. // @include https://s3.amazonaws.com/mturk_bulk/hits*
  8. // @include https://www.mturkcontent.com/dynamic/*
  9. // @require https://code.jquery.com/jquery-2.1.4.min.js
  10. // @grant GM_log
  11. // ==/UserScript==
  12.  
  13. if ($('a#collapseTrigger strong:contains("Survey Link Instructions")').length > 0 && $('.panel-primary span.collapse-text').text() == "(Click to expand)")
  14. {
  15. setTimeout(function(){ $('a#collapseTrigger')[0].click(); }, 100); // added a small delay to prevent the template's hiding code sometimes kicking in after this ran, undoing the unhiding; wrapping it in document.ready or/and window.load didn't help, so did this instead
  16. }