MTurkGrind.com Plus

Style tweaks and keyboard shortcuts for MTurkGrind.com forum.

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name                MTurkGrind.com Plus
// @author              Chet Manley
// @version             0.2.1.1x
// @description         Style tweaks and keyboard shortcuts for MTurkGrind.com forum.
// @include             http://www.mturkgrind.com/*
// @include             http://mturkgrind.com/*
// @require		http://code.jquery.com/jquery-latest.min.js
// @grant       GM_log
// @namespace https://greasyfork.org/users/6438
// ==/UserScript==

// v0.2x, 2015-01-17: updates by clickhappier for MTG migration from vbulletin to xenforo

// v0.1, 2013-10-19		Style tweaks and keyboard shortcuts on MTurkGrind.com
//                      ---------------------------------------------------------------------------

$(document).ready(function () {
    $('.messageText').attr('style', 'font-size: 15px;');
//    $('a.quickreply').hide().next().hide();

    $(window).keyup(function (e) {
        if (!$('input, textarea').is(':focus')) {
            var key = (e.keyCode ? e.keyCode : e.which);
            switch (key) {
                case 37: // Left arrow - Previous page
                    if ($('div.PageNav > nav > a:contains("Prev")').first().attr('href')) {
                        window.location.href = $('div.PageNav > nav > a:contains("Prev")').first().attr('href');
                    }
                    break;
                case 39: // Right arrow - Next page
                    if ($('div.PageNav > nav > a:contains("Next")').first().attr('href')) {
                        window.location.href = $('div.PageNav > nav > a:contains("Next")').first().attr('href');
                    }
                    break;
                case 73: // I - Inbox
                    window.location.href = 'http://www.mturkgrind.com/conversations/';
                    break;
                case 82: // R - Start a reply
                    $('html, body').animate({ scrollTop: $("form#QuickReply").offset().top }, 100);
                    break;
                case 83: // S - Settings
                    window.location.href = 'http://www.mturkgrind.com/account/';
                    break;
                default:
                    break;
            }
        }
    });
});