Created
April 26, 2018 21:58
-
-
Save cuylerstuwe/010d36fd1979b90124e8893b9760db53 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