MTG Grind Mode Switch

Adds buttons to the bottom of your screen to switch grind mode on and off

이 스크립트를 설치하려면 Tampermonkey, Greasemonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램을 설치해야 합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Userscripts와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 유저 스크립트 관리자 확장 프로그램이 필요합니다.

(이미 유저 스크립트 관리자가 설치되어 있습니다. 설치를 진행합니다!)

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

(이미 유저 스타일 관리자가 설치되어 있습니다. 설치를 진행합니다!)

// ==UserScript==
// @name          MTG Grind Mode Switch
// @description   Adds buttons to the bottom of your screen to switch grind mode on and off
// @version       1.1
// @include       http://www.mturkgrind.com/threads/*
// @author        Cristo
// @copyright    2012+, You
// @namespace https://greasyfork.org/users/1973
// ==/UserScript==

function chnageMode(f){
    var toUrl = 'http://www.mturkgrind.com/misc.php?do=filterposts_linksonly&filterposts_linksonly='+f;
    modeGet = new XMLHttpRequest();
    modeGet.onreadystatechange = function () {
        if ((modeGet.readyState ===4) && (modeGet.status ===200)) {
            location.reload();
        }
    }
    modeGet.open('GET', toUrl, true);
    modeGet.send(null);
}
if (window.top === window.self){
    var mtgBody = document.getElementsByTagName('body')[0];
    var sDiv = document.createElement('div');
    sDiv.style.position = "fixed";
    sDiv.style.zIndex="999";
    sDiv.style.bottom = "0%";
    sDiv.style.right ="1%";
    sDiv.style.bottom ="1%";
    sDiv.setAttribute('id','grinddiv');
    mtgBody.appendChild(sDiv); 
    var grindin = document.createElement("input");
    grindin.type = "button";
    grindin.value = 'Grind';
    grindin.style.cursor = "pointer";
    grindin.style.height ="auto";
    grindin.style.width ="50px";
    grindin.style.opacity = "0.5";
    grindin.addEventListener("click", function(){chnageMode(1);}, false); 
    sDiv.appendChild(grindin); 
    var talkin = document.createElement("input");
    talkin.type = "button";
    talkin.value = 'Social';
    talkin.style.cursor = "pointer";
    talkin.style.height ="auto";
    talkin.style.width ="50px";
    talkin.style.marginLeft ="10px";
    talkin.style.opacity = "0.5"; 
    talkin.addEventListener("click", function(){chnageMode(0);}, false); 
    sDiv.appendChild(talkin); 
}