Skip to content

Instantly share code, notes, and snippets.

@cuylerstuwe
Created April 26, 2018 21:58
Show Gist options
  • Select an option

  • Save cuylerstuwe/010d36fd1979b90124e8893b9760db53 to your computer and use it in GitHub Desktop.

Select an option

Save cuylerstuwe/010d36fd1979b90124e8893b9760db53 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Mturk Worker Site - Full HIT Text (No ellipsis)
// @namespace salembeats
// @version 3
// @description .
// @author Cuyler Stuwe (salembeats)
// @include https://worker.mturk.com/
// @include https://worker.mturk.com/projects
// @include https://worker.mturk.com/?page_size=*
// @include https://worker.mturk.com/?page_number=*
// @include https://worker.mturk.com/tasks
// @include https://worker.mturk.com/status_details/*
// @grant none
// ==/UserScript==
function fullHITText() {
for(let truncatedTextElement of document.querySelectorAll(".text-truncate")) {
truncatedTextElement.classList.remove("text-truncate");
}
for(let row of document.querySelectorAll(".desktop-row, .mobile-row")) {
for(let divOrSpan of row.querySelectorAll("div,span")) {
if(row.clientHeight < divOrSpan.clientHeight) {
row.style.height = `${divOrSpan.clientHeight + Math.floor(divOrSpan.clientHeight * 0.3)}px`;
}
}
}
}
fullHITText();
window.addEventListener("resize", fullHITText);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment