productrnr

Script to assist with ProductRnR MTurk Hits. F for Forward, R for Reverse, C for current

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

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.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name        productrnr 
// @namespace   Iamme
// @description Script to assist with ProductRnR MTurk Hits. F for Forward, R for Reverse, C for current
// @match      https://www.mturkcontent.com/dynamic/hit?*
// @version    1.5
// ==/UserScript==
var blocks = document.getElementsByClassName("singlebox");
var blockNum = 0;
var curBlock = blocks[blockNum];



document.getElementById("header").style.zIndex = 1;
for (var i = 0; i < blocks.length; i++){
    blocks[i].style.position = "relative";
    blocks[i].style.zIndex = 1000;
}
    
curBlock.scrollIntoView();    
document.addEventListener("keyup", function(e){
    if (e.keyCode==70){
      while (blockNum < blocks.length && blocks[blockNum].offsetTop == curBlock.offsetTop){
      	blockNum++;
      }
      if(curBlock)
      {
         curBlock = blocks[blockNum];
         curBlock.scrollIntoView();
          
      }else{ 
          blockNum = blocks.length - 1 ;
          curBlock = blocks[blocks.length - 1];
      }
    } 
    if(e.keyCode==67){
    	curBlock.scrollIntoView();
        
    }
    if(e.keyCode==82){
    	while (blockNum > 0 && blocks[blockNum].offsetTop == curBlock.offsetTop){
      	blockNum--;
      }
      if(curBlock)
      {
         curBlock = blocks[blockNum];
         curBlock.scrollIntoView();
      }else{ 
          blockNum++;
          curBlock = blocks[blockNum];
      }
    }
});

//set all non adult
var radioButtons = document.getElementsByClassName("radiobutton");
for (i = 0; i < radioButtons.length; ++i){
  var item = radioButtons[i];
  if (item.value == "notadult"){
    item.checked = true;
  }
}