- Thread Status:
- Not open for further replies.
Page 1 of 48
-
-
Hello night owls, here is a present.
Code:// ==UserScript== // @name Cliff DesPeaux // @namespace https://gist.github.com/Kadauchi // @version 1.0.0 // @description Hotel Image Rating // @author Kadauchi // @icon http://i.imgur.com/oGRQwPN.png // @include /^https://(www\.mturkcontent|s3\.amazonaws)\.com/ // @hitsave https://www.mturkcontent.com/dynamic/hit?hitId=38G0E1M85M4QD3BEYP7BMC8YT7YVU5 // @hitname Hotel Image Rating // ==/UserScript== if (document.getElementsByTagName(`strong`)[0].textContent !== `How much is the image making you want to stay at the hotel?`) return; function SHOW () { for (let i = 0; i < images.length; i ++) images[i].style.display = `none`; images[index].style.display = ``; counter.textContent = index + 1; for (let element of document.querySelectorAll(`[class="rate"]`)) element.style.backgroundColor = ``; for (let element of images[index].querySelectorAll(`[type="radio"]`)) if (element.checked) document.querySelector(`[class="rate"][value="${ element.value }"]`).style.backgroundColor = `lightgreen`; } function PREV () { if (index === 0) return; index --; SHOW(); } function NEXT () { if (index === 9) return; index ++; SHOW(); } document.getElementsByClassName(`container`)[0].insertAdjacentHTML( `afterend`, `<div class="text-center">` + `<button id="prev" style="margin: 3px;" type="button">Previous</button>` + `<button class="rate" value="1" style="margin: 3px;" type="button">1</button>` + `<button class="rate" value="2" style="margin: 3px;" type="button">2</button>` + `<button class="rate" value="3" style="margin: 3px;" type="button">3</button>` + `<button class="rate" value="4" style="margin: 3px;" type="button">4</button>` + `<button class="rate" value="5" style="margin: 3px;" type="button">5</button>` + `<button class="rate" value="6" style="margin: 3px;" type="button">6</button>` + `<button class="rate" value="7" style="margin: 3px;" type="button">7</button>` + `<button class="rate" value="8" style="margin: 3px;" type="button">8</button>` + `<button class="rate" value="9" style="margin: 3px;" type="button">9</button>` + `<button class="rate" value="10" style="margin: 3px;" type="button">10</button>` + `<button id="next" type="button">Next</button>` + `</div>` + `<div class="text-center"><span id="counter"></span> / 10</div>` ); let index = 0; const images = document.getElementsByClassName(`form-group`); const counter = document.getElementById(`counter`); for (let i = 0; i < images.length; i ++) { images[i].style.display = `none`; images[i].parentElement.className = `text-center`; images[i].parentElement.parentElement.className = `text-center`; } document.addEventListener(`click`, function (event) { const element = event.target; if (element.matches(`#prev`)) PREV(); if (element.matches(`#next`)) NEXT(); if (element.matches(`.rate`)) { document.getElementById(`rating${ index + 1 }-${ element.value }`).click(); NEXT(); } }); window.addEventListener(`keydown`, function (event) { const key = event.key; if (key.match(/0/)) document.querySelector(`[class="rate"][value="1${ key }"]`).click(); if (key.match(/[1-9]/)) document.querySelector(`[class="rate"][value="${ key }"]`).click(); if (key.match(/Enter/)) document.querySelector(`[type="submit"]`).click(); }); SHOW();
-
Today I Learned x 8 -
5/5 Pay x 1 -
Love x 1
-
-
-
Like x 4
-
-
-
Like x 1
-
-
-
-
Like x 1
-
-
-
Title: Live Q/A about an Image (With Captions). | PANDA
Requester: Research Tasks [A1CEBF7WRZ74YK] (Contact)
TO: [Pay: 3.24] [Fair: 4.72] [Comm: 4.33] [Fast: 4.45] [Reviews: 215] [ToS: 0]
Description: Ask or Answer questions about an image with a fellow Turker.
Time: 20 minutes
HITs Available: 2348
Reward: $0.15
Qualifications: Total approved HITs is not less than 5000; HIT approval rate (%) is not less than 95; Location is US;HIT exported from Mturk Suite v1.11.7 -
Code:// ==UserScript== // @name Hotel Photos // @namespace https://github.com/Kadauchi/ // @version 1.0.0 // @description Helps with Hotel Photos // @author Kadauchi // @icon http://i.imgur.com/oGRQwPN.png // @include https://s3.amazonaws.com/mturk_bulk/* // @grant GM_log // @hitsave https://s3.amazonaws.com/mturk_bulk/hits/245802341/_xoA59feByMOGyJnAVu_2Q.html // ==/UserScript== let q = 1, i = 0; const inputs = [ `_DoesImageContainExterior_`, `_DoesContainMoreThanOneBuilding_`, `_DoesImageContainOver75_`, `_IsBuildingRestaurantOrStore_`, `_IsBuildingPrimarySubject_`, ]; document.addEventListener(`keydown`, function (pressed) { switch (pressed.key) { case `1`: KEYPRESS(1); break; case `2`: KEYPRESS(2); break; case `Enter`: document.getElementsByName(`submit`)[0].click(); } }); function KEYPRESS (KEY) { const yn = KEY === 1 ? `yes` : `no`; document.getElementById(`ID0${q}${inputs[i]}${yn}`).click(); if (document.getElementById(`ID0${q}_Done`).offsetParent !== null) { q ++; i = 0; } else { i ++; } if (q === 6) {/*document.getElementsByName(`submit`)[0].click();*/ return;} document.getElementById(`ID0${q}_DoesImageContainExterior_yes`).focus(); document.getElementById(`ID0${q}_DoesImageContainExterior_yes`).scrollIntoView(); }
-
Today I Learned x 1
-
-
-
-
Like x 1
-
-
@Kadauchi I don't currently use linux on my mturk machine.. but once I build a new computer I am planning to do so. I boot into linux sometimes on my laptop to do stuff ect and I used to have a dedicated server rented with debian on it.
-
Like x 1
-
-
-
-
-
Like x 2
-
-
-
-
LOL x 1
-
-
Page 1 of 48
- Thread Status:
- Not open for further replies.