Created
April 30, 2018 20:44
-
-
Save cuylerstuwe/d698cf5eeb86cb901351038e5f1747c7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==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