MTurkGrind.com Plus

Style tweaks and keyboard shortcuts for MTurkGrind.com forum.

当前为 2015-01-19 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 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;
            }
        }
    });
});