Links to scripts that aren't just code.

Discussion in 'Scripts' started by ewd76, Nov 12, 2012.

  1. ewd76

    ewd76 User

    Joined:
    Oct 8, 2012
    Messages:
    1,133
    Likes Received:
    0
    Everytime I try to install a script with greasemonkey anymore it just leads to a page full of code. Can anyone post fresh links to the scripts? That generally seems to be the problem. Eventually the scripts and links just seem to wear out.
     
  2. Cowfin

    Cowfin Community Manager
    Staff Member

    Joined:
    Sep 12, 2012
    Messages:
    3,737
    Likes Received:
    0
    Just post and/or PM me the scripts you need, and I can get you them. It may be an issue on your end though.
     
    #2 Cowfin, Nov 12, 2012
    Last edited by a moderator: Nov 12, 2012
  3. ewd76

    ewd76 User

    Joined:
    Oct 8, 2012
    Messages:
    1,133
    Likes Received:
    0
    It could be. Everything will be fine until they just stop working. Then I deactivate and reactivate them. This works several times until it just stops working for some reason.
     
  4. Cowfin

    Cowfin Community Manager
    Staff Member

    Joined:
    Sep 12, 2012
    Messages:
    3,737
    Likes Received:
    0
    What scrips are you having issues with? I would suggest removing them completely, then reinstalling them. If it is still an issue, and you don't have too many bookmarks or settings, you could reinstall your browser.
     
  5. ewd76

    ewd76 User

    Joined:
    Oct 8, 2012
    Messages:
    1,133
    Likes Received:
    0
    Let's start with the worst case scenario.
     
  6. Cowfin

    Cowfin Community Manager
    Staff Member

    Joined:
    Sep 12, 2012
    Messages:
    3,737
    Likes Received:
    0
  7. ewd76

    ewd76 User

    Joined:
    Oct 8, 2012
    Messages:
    1,133
    Likes Received:
    0
    I got this when I clicked install, I wonder if I should reinstall greasemonkey


    // ==UserScript==
    // @name MTurk Worst Case Scenario Calculator
    // @namespace localhost
    // @author ThirdClassInternationalMasterTurker
    // @description Shows what your approval rate would be in worst case scenario
    // @include https://www.mturk.com/mturk/dashboard
    // @version 3.0
    // @grant none
    // ==/UserScript==

    //
    // 2012-09-07 First public release by ThirdClassInternationalMasterTurker
    //
    // 2012-09-09 Added approximate number of rejects that drop you to the
    // edge of RATE_GOOD and RATE_OK
    //
    // 2012-10-06 Added GUI for setting RATE_GOOD and RATE_OK
    // (Click 'Pending (Worst Case Scenario)')
    //

    // --- SETTINGS ------------------------------------------------------- //
    var RATE_GOOD = (localStorage['WCS_GOOD']) ? localStorage['WCS_GOOD'] : 99.0;
    var RATE_OK = (localStorage['WCS_OK']) ? localStorage['WCS_OK'] : 95.0;

    var COLOUR_GOOD = 'lightgreen';
    var COLOUR_OK = 'orange';
    var COLOUR_BAD = 'red';

    // -------------------------------------------------------------------- //

    var rows = document.evaluate('//tr[@class]',
    document,
    null,
    XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);

    var submitted;
    var returned;
    var abandoned;
    var approved;
    var rejected;
    var pending;

    function config_func()
    {
    return function()
    {
    var t = prompt('MTurk Worst Case Scenario\nSet your RATE_GOOD and RATE_OK.\nFor example: 99.0;95.0',
    '' + RATE_GOOD + ';' + RATE_OK);
    if (!t)
    return;

    var rates = t.split(';', 2);
    rates[0] = parseFloat(rates[0]).toFixed(1);
    rates[1] = parseFloat(rates[1]).toFixed(1);

    if (rates[0] > 0 && rates[0] <= 100)
    localStorage['WCS_GOOD'] = rates[0];
    if (rates[1] > 0 && rates[1] <= 100)
    localStorage['WCS_OK'] = rates[1];
    };
    }


    for (var i=0;i<rows.snapshotLength;i++) {
    var row = rows.snapshotItem(i);

    if (row.cells.length != 3)
    continue;
    if (row.className.match('odd|even') == null) {
    continue;
    }

    if (row.cells[0].textContent.match('\\.\\.\\. Submitted')) {
    submitted = parseInt(row.cells[1].textContent);
    }

    if (row.cells[0].textContent.match('\\.\\.\\. Returned')) {
    returned = parseInt(row.cells[1].textContent);
    }

    if (row.cells[0].textContent.match('\\.\\.\\. Abandoned')) {
    abandoned = parseInt(row.cells[1].textContent);
    }

    if (row.cells[0].textContent.match('\\.\\.\\. Approved')) {
    approved = parseInt(row.cells[1].textContent);
    approved_p = parseFloat(row.cells[2].textContent);

    if (approved_p >= RATE_GOOD) {
    row.cells[2].style.backgroundColor = COLOUR_GOOD;
    }
    else if (approved_p >= RATE_OK) {
    row.cells[2].style.backgroundColor = COLOUR_OK;
    }
    else {
    row.cells[2].style.backgroundColor = COLOUR_BAD;
    }
    }

    if (row.cells[0].textContent.match('\\.\\.\\. Rejected')) {
    rejected = parseInt(row.cells[1].textContent);
    }

    if (row.cells[0].textContent.match('\\.\\.\\. Pending')) {
    pending = parseInt(row.cells[1].textContent);

    row.cells[0].innerHTML += " <small>(Worst Case Scenario)</small>";

    if (RATE_GOOD < approved_p) {
    var p = 1.0 - RATE_GOOD/100;
    var x = (rejected-(p*submitted))/(p-1);
    row.cells[0].innerHTML += "<br>&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color:" + COLOUR_OK + "\">(~" + Math.round(x) + " rejects => " + RATE_GOOD + "%)</span>";
    }
    if (RATE_OK < approved_p) {
    var p = 1.0 - RATE_OK/100;
    var x = (rejected-(p*submitted))/(p-1);
    row.cells[0].innerHTML += "<br>&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color:" + COLOUR_BAD + "\">(~" + Math.round(x) + " rejects => " + RATE_OK + "%)</span>";
    }

    WCS = Math.round((approved/(approved+rejected+pending) * 1000))/10;
    row.cells[2].innerHTML = '(' + WCS + '%)';

    if (WCS >= RATE_GOOD) {
    row.cells[2].style.backgroundColor = COLOUR_GOOD;
    }
    else if (WCS >= RATE_OK) {
    row.cells[2].style.backgroundColor = COLOUR_OK;
    }
    else {
    row.cells[2].style.backgroundColor = COLOUR_BAD;
    }

    row.cells[0].addEventListener("click", config_func(), false);
    row.cells[2].addEventListener("click", config_func(), false);
    }
     
  8. ThirdClassIntMasterTurker

    Joined:
    Sep 8, 2012
    Messages:
    86
    Likes Received:
    0
    Is your greasemonkey enabled? (Check mark next to enabled in greasemonkey menu)
     
  9. ewd76

    ewd76 User

    Joined:
    Oct 8, 2012
    Messages:
    1,133
    Likes Received:
    0
    It works, thanks.
     

Share This Page