ClearNotes (ships only)

remove all notes and custom colours from ships.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         ClearNotes (ships only)
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  remove all notes and custom colours from ships.
// @author       Daniel Vale
// @match        http://*/*
// @grant        none
// @include       https://planets.nu/#/*
// @include       https://planets.nu/*
// @include       http://play.planets.nu/*
// @include       http://test.planets.nu/*
// ==/UserScript==
function wrapper () {// wrapper for injection
    'use strict';

    // instantiate a new object, and register it as a plugin
    var version = "0.1";
    var name = "Celar Notes";

    // Declare an object type (constructor)
    function ClearNotes() {

        this.showmap = function() {
            console.log("Clear Notes - running");

            for (var i = 0; i < vgap.notes.length; i++){
                var note = vgap.notes[i];
                if (note !== null) {
                    if (note.targettype == 2) {
                        // planet or ship note
                        note.body = "";
                        note.color = "";
                        note.changed = 1;
                    }
                }
            }
            vgap.map.clearcace
            vgap.map.draw();
        }
    }
    // create an instance of the plugin and register it
    var plugin = new ClearNotes();
    vgap.registerPlugin(plugin, "TestPlugin");
    console.log(name + " " + version + " planets.nu plugin registered");
}


var script = document.createElement("script");
script.type = "application/javascript";
script.textContent = "(" + wrapper + ")();";

document.body.appendChild(script);