Greasy Fork

Greasy Fork is available in English.

wolai Plus

略略略~

当前为 2020-12-09 提交的版本,查看 最新版本

// ==UserScript==
// @name         wolai Plus
// @namespace    http://tampermonkey.net/
// @version      0.2
// @description  略略略~
// @author       Liuser
// @include      https://www.wolai.com/*
// @grant        none
// ==/UserScript==

(function() {

    var mouseClick = new MouseEvent("click", {
            bubbles: true,
            cancelable: true,
            view: window,
        });
    setTimeout( function(){//延迟5秒
        let svgItem = document.getElementsByClassName('_3skBI _1LKlS')[0].children[0]
        let svgItemChildPage = document.getElementsByClassName('_2Q7F8 _2xbd4 vCtLm')[1]
        'use strict';
        document.onkeydown = function() {
            if ((window.event.altKey)&&((window.event.keyCode==78))){
                console.log('直接新建页面')
                svgItem.dispatchEvent(mouseClick)
            }
            if ((window.event.altKey)&&((window.event.keyCode==77))){
                console.log('新建子页面')
                svgItemChildPage.dispatchEvent(mouseClick)
            }
        }
    }, 5 * 1000 );







}
)();