Munzee Garden Painter

Show an 80x80 grid

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         Munzee Garden Painter
// @version      0.1
// @description  Show an 80x80 grid
// @author       rabe85
// @match        *://gardenpainter.ide.sk/paint.php
// @grant        none
// @namespace    https://greasyfork.org/users/156194
// ==/UserScript==

(function() {
    'use strict';

    function munzee_garden_painter() {

        // Show an 80x80 grid button
        var toolbox = document.getElementById('toolbox');
        if(toolbox) {
            toolbox.querySelector('img[src="grid_size3.png"]').insertAdjacentHTML("afterend", "<img class='btn' src='https://www.otb-server.de/munzee/grid_size4.png' title='Grid size: 80 x 80' onclick='n=80;setupCrosses();setupPins();setGridSize(n);'>");
        }

    }


    // DOM vollständig aufgebaut?
    if (/complete|interactive|loaded/.test(document.readyState)) {
        munzee_garden_painter();
    } else {
        document.addEventListener("DOMContentLoaded", munzee_garden_painter, false);
    }

})();