Oneoh's SpoonFeeder

spoon feeder for oneoh

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name       Oneoh's SpoonFeeder
// @version    0.1
// @description  spoon feeder for oneoh
// @match      https://mi-div.crowdcomputingsystems.com/mturk-web*
// @copyright  2014+, Tjololo
// @namespace https://greasyfork.org/users/710
// ==/UserScript==

var field = document.getElementsByClassName("place")[0];
var pieces = field.innerHTML.split(":");
var finalHTML = "";
count = 0;
die = false;
for (var i = 0; i < pieces.length; i++){
    if (die)
        break;
    piece = pieces[i].trim().replace('&nbsp;', '').split("<br>");
    item = piece[0];
    thing = "";
    count++;
    if (!/ETF Name/.test(item) && item != "ETF Ticker" && item != "Issuer" && item != "URL" && item.indexOf("href") == -1){
        thing = "<a href=\"https://www.google.com/search?q="+encodeURI(item)+"\">"+item+"</a>";
        if (count != 5)
        	finalHTML += thing+"<br>"+piece[1]+" : ";
    }
    else{
        if (piece == "URL" || count == 5){
            die=true;
            break;
    	}
        else
        	finalHTML += "<br>" + item + " : ";
    }
}
field.innerHTML += "<br><br>"+finalHTML;