CH MTurk Qualifications Wrapper

Word-wraps long qualifications on individual HIT pages, with better multi-script compatibility.

当前为 2014-09-05 提交的版本,查看 最新版本

// ==UserScript==
// @name                CH MTurk Qualifications Wrapper
// @author              clickhappier
// @namespace           clickhappier
// @version             1.0c
// @description         Word-wraps long qualifications on individual HIT pages, with better multi-script compatibility.
// @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*
// ==/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.


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

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址