EyeWire Accuracy Revealer

Now you can see your accuracy besides points after completing a cube

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         EyeWire Accuracy Revealer
// @namespace    http://eyewire.org/
// @version      0.9
// @description  Now you can see your accuracy besides points after completing a cube
// @author       posixphreak
// @match        http://eyewire.org/*
// @grant        none
// ==/UserScript==
(function() {

    function EWS_main() {
        console.log("EyeWire Script: injected!");
        var taskManager = window.tomni.taskManager;
        var orig_showLeaderboard = taskManager.ui.showLeaderboard;

        taskManager.ui.showLeaderboard = function(response) {

            if (typeof response === 'undefined') {
                /* A rare error I get */
                alert("An error occured while receiving response!");
                return;
            }

            if (!response.data.trailblazer) {
                response.type = "training"; // HAXX
                /* actually, I should do a more "low-level" patching but yeah, I'm lazy... */
                console.log("EyeWire Script: making accuracy visible...");
                ////console.log(response.data);
            }
            orig_showLeaderboard(response);
        }
    }

    function EWS_checkIfLoaded() {
        if (typeof window.tomni !== 'undefined' &&
            typeof window.tomni.taskManager !== 'undefined' &&
            typeof window.tomni.taskManager.ui !== 'undefined') {
            EWS_main();
        } else {
            window.setTimeout(EWS_checkIfLoaded, 1000);
        }
    }

    if (/eyewire\.org/i.test(document.domain)) {
        window.setTimeout(EWS_checkIfLoaded, 1000);
    }

})();