Welcome to MTurk Crowd

Work on Amazon Mechanical Turk, learn from the best, and have fun doing it. Join the crowd today!

Sign Up

How To Change Execution Order of Userscripts, and Customize Excluded Pages

Discussion in 'Userscripts, Extensions, and Software' started by clickhappier, Jan 24, 2016.

  1. clickhappier

    clickhappier
    Expand Collapse
    ┬──┬ ノ( ゜-゜ノ)

    • Subforum Curator
    • Crowd Pleaser
    Joined:
    Jan 12, 2016
    Messages:
    727
    Likes:
    1,601
    For certain combinations of userscripts, it's important that they run in a certain order within Greasemonkey/Tampermonkey for them to work properly. If the wrong one comes first, it can interfere with certain conditions the later one was expecting. Some major examples are that HitDB should run before Turkopticon, Turkopticon should run before the older 'block requesters'-type scripts (I don't recall it being an issue with mine), Great HIT Export and IRC Export should run before any 'preview/accept/hoard'-type link-splitting/changing scripts, and MTurk Dashboard HIT Status Links should run before MTurk Dashboard Change Notifier.

    To see the current execution order of the userscripts you have installed:
    • In Tampermonkey (Chrome): click on the Tampermonkey menu button, click on 'Dashboard', and click on the '#' column header to sort the list of scripts by their execution order number.
    • In Greasemonkey (Firefox): click on the Greasemonkey menu button or wherever its menu may be in your browser configuration, click on 'Manage User Scripts', and click on the 'Execution Order' sort button in the upper right-hand area.

    By default, scripts run in the order in which you installed them. So the simplest way to change your execution order is to completely remove the script that you want to come later than it currently does, and reinstall it (make sure you find the script's page to have it ready to reinstall before proceeding with removal). This will move that script to the end (last place) of the execution order.
    • To remove a script in Tampermonkey: click on the Tampermonkey menu button, click on 'Dashboard', and click on the trash can 'Delete' icon for the script you want to remove.
    • To remove a script in Greasemonkey: click on the Greasemonkey menu button, click on 'Manage User Scripts', and click the 'Remove' button for the script you want to remove.

    Or for more advanced execution order adjustment, you can do the following:
    • To change execution order in Tampermonkey: click on the Tampermonkey menu button, click on 'Dashboard', click on the name of the script you want to change the order of, an 'Editor' tab will open for that script, click on the 'Settings' tab for that script (the one right next to 'Editor'), change the number in the 'Position:' drop-down list to a lower (earlier) or higher (later) number as needed, scroll down to the bottom of the page, and click the 'Save' button.
      ...Alternatively, if you've sorted the dashboard list by execution order as described above, you can click on the three-stacked-lines 'Sort' icon that appears in each script's row towards the right-hand side, move the mouse up or down the list (without holding down the mouse button) to drag the script to a new position, and then click the 'Sort' icon again to end the dragging-mode and save that position. (In earlier versions of Tampermonkey, sorting was done by clicking on up/down arrows next to each script in that 'Sort' column.)
    • To change execution order in Greasemonkey: click on the Greasemonkey menu button, click on 'Manage User Scripts', right-click on the name of the script you want to change the order of, and click on the appropriate choice in the context menu that opens ('Execute first', 'Execute sooner', 'Execute later', or 'Execute last'). It may take multiple uses of the 'sooner'/'later' choices on multiple scripts to get them rearranged the way you want.
     
  2. clickhappier

    clickhappier
    Expand Collapse
    ┬──┬ ノ( ゜-゜ノ)

    • Subforum Curator
    • Crowd Pleaser
    Joined:
    Jan 12, 2016
    Messages:
    727
    Likes:
    1,601
    Using TO and TM together causes some issues with TM, depending on execution order, but reports have differed as to which seems to be the preferred order. The real fix for the Turkmaster/Turkopticon wars (and might come in handy for some other random script conflicts you may encounter) is to define a user exclude for
    Code:
    https://www.mturk.com/mturk/dashboard*
    in your Greasemonkey/Tampermonkey settings for the Turkopticon userscript; the dang thing doesn't need to be running on the dashboard anyway.

    • In Greasemonkey, click on the Options button for that script in the Manage User Scripts screen.
    • In Tampermonkey, click on the script in the Tampermonkey Dashboard screen, and then click on its Settings tab; don't forget to scroll down to the Save button once it's added.

    If you define exclusions by editing the actual script, then you won't receive future updates automatically, and would have to re-edit it each time you do manually request an update. If you use the user exclusion setting like this instead, it will persist across updates.
     
    A6_Foul_Out, Tribune and kryss like this.