CH MTurk Qualifications Wrapper

Word-wraps long qualifications on individual HIT pages, with better multi-script compatibility. Now also word-wraps the HIT links cells on search results pages.

Tendrás que instalar una extensión para tu navegador como Tampermonkey, Greasemonkey o Violentmonkey si quieres utilizar este script.

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

Necesitarás instalar una extensión como Tampermonkey o Violentmonkey para instalar este script.

Necesitarás instalar una extensión como Tampermonkey o Userscripts para instalar este script.

Necesitará instalar una extensión como Tampermonkey para instalar este script.

Necesitarás instalar una extensión para administrar scripts de usuario si quieres instalar este script.

(Ya tengo un administrador de scripts de usuario, déjame instalarlo)

Necesitará instalar una extensión como Stylus para instalar este estilo.

Necesitará instalar una extensión como Stylus para instalar este estilo.

Necesitará instalar una extensión como Stylus para instalar este estilo.

Necesitará instalar una extensión del gestor de estilos de usuario para instalar este estilo.

Necesitará instalar una extensión del gestor de estilos de usuario para instalar este estilo.

Necesitará instalar una extensión del gestor de estilos de usuario para instalar este estilo.

(Ya tengo un administrador de estilos de usuario, déjame instalarlo)

// ==UserScript==
// @name                CH MTurk Qualifications Wrapper
// @description         Word-wraps long qualifications on individual HIT pages, with better multi-script compatibility. Now also word-wraps the HIT links cells on search results pages.
// @version             1.1c
// @author              clickhappier
// @namespace           clickhappier
// @include             https://www.mturk.com/mturk/findhits*
// @include             https://www.mturk.com/mturk/viewhits*
// @include             https://www.mturk.com/mturk/sorthits*
// @include             https://www.mturk.com/mturk/searchbar*selectedSearchType=hitgroups*
// @include             https://www.mturk.com/mturk/viewsearchbar*selectedSearchType=hitgroups*
// @include             https://www.mturk.com/mturk/sortsearchbar*HITGroup*
// @include             https://www.mturk.com/mturk/preview*
// @include             https://www.mturk.com/mturk/accept*
// @include             https://www.mturk.com/mturk/return*
// @include             https://www.mturk.com/mturk/continue*
// @include             https://www.mturk.com/mturk/submit*
// @exclude             https://www.mturk.com/*hit_scraper*
// @require             http://code.jquery.com/jquery-latest.min.js
// @grant               GM_log
// ==/UserScript==

// The original MTurk Qualifications Wrapper by Chet Manley, v0.1, 2013-09-25, was this one line using jquery:
// $('#qualifications\\.tooltip').parent().parent().children('.capsule_field_text').removeAttr('nowrap');
// 
// It didn't get along well with 'mTurk - Show Auto-App Time and Link Turkopticon', a script that adds the
// auto-approve time to the individual HIT pages' info table after the qualification cell with with=100%,
// causing the qualifications cell to be scrunched-up unnecessarily long and narrow, a couple words per line.
// This is my rewrite without that side effect. It works with or without that Auto-App Time script running.


// Allow wrapping in the qualifications list cell on individual HIT pages:

function addGlobalStyle(css) {
    var head, style;
    head = document.getElementsByTagName('head')[0];
    if (!head) { return; }
    style = document.createElement('style');
    style.type = 'text/css';
    style.innerHTML = css;
    head.appendChild(style);
}

addGlobalStyle('tr td table tbody tr td.capsule_field_text { white-space: initial ! important; }');

addGlobalStyle('tr td table tbody tr td.capsule_field_title { width: initial ! important;  padding-right: 2px ! important; }');

addGlobalStyle('div#buttonContainer { width: 80px ! important; }'); // for HIT Area Expander compatibility


// Allow wrapping in the HIT links cells on search results pages - the 'View a HIT in this group',
// 'Take Qualification test', etc area - to prevent horizontal scrolling when it would otherwise happen
// due to a combination of window/monitor size and zoom level, and/or long HIT title, and/or lots of
// buttons being added after HIT titles by other scripts, and/or a HIT with lots of qual tests, and/or
// the wide border and long-format date info added by mmmturkeybacon Color-Coded Search With Checkpoints
// on checkedpointed HITs, etc.

$('span.capsulelink').parent().filter('td').removeAttr('nowrap');