Greasy Fork 还支持 简体中文。

GrammarSimplified

Simple syntax simplification function

Stan na 19-02-2024. Zobacz najnowsza wersja.

Ten skrypt nie powinien być instalowany bezpośrednio. Jest to biblioteka dla innych skyptów do włączenia dyrektywą meta // @require https://updategf.qytechs.cn/scripts/487608/1330066/GrammarSimplified.js

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name         GrammarSimplified
// @version      2024/02/20
// @author       HentaiSaru
// @description  Simple syntax simplification function
// @namespace    https://greasyfork.org/users/989635
// @match        *://*/*
// ==/UserScript==
class API{constructor(){this.ListenerRecord=new Map;this.Parser=new DOMParser;this.GM={__verify:a=>void 0!==a?a:null,set:function(a,c){GM_setValue(a,c)},get:function(a,c){return this.__verify(GM_getValue(a,c))},setjs:function(a,c){GM_setValue(a,JSON.stringify(c,null,4))},getjs:function(a,c){return JSON.parse(this.__verify(GM_getValue(a,c)))}};this.Template={log:a=>console.log(a),warn:a=>console.warn(a),error:a=>console.error(a),count:a=>console.count(a)}}$$(a,c=!1,b=document){const d=a.slice(1);switch([" ",".","#","="].some(e=>d.includes(e))?" ":a[0]){case "#":return b.getElementById(d);case " ":return c?b.querySelectorAll(a):b.querySelector(a);case ".":a=b.getElementsByClassName(d);break;default:a=b.getElementsByTagName(a)}return c?Array.from(a):a[0]}DomParse(a){return this.Parser.parseFromString(a,"text/html")}IllegalCharacters(a){return a.replace(/[\/\?<>\\:\*\|":]/g,"")}ExtensionName(a){try{return a.match(/\.([^.]+)$/)[1].toLowerCase()||"png"}catch{return"png"}}WorkerCreation(a){a=new Blob([a],{type:"application/javascript"});return new Worker(URL.createObjectURL(a))}async AddStyle(a,c="New-Style"){let b=document.getElementById(c);b||(b=document.createElement("style"),b.id=c,document.head.appendChild(b));b.appendChild(document.createTextNode(a))}async AddScript(a,c="New-Script"){let b=document.getElementById(c);b||(b=document.createElement("script"),b.id=c,document.head.appendChild(b));b.appendChild(document.createTextNode(a))}async AddListener(a,c,b,d={}){this.ListenerRecord.has(a)&&this.ListenerRecord.get(a).has(c)||(a.addEventListener(c,b,d),this.ListenerRecord.has(a)||this.ListenerRecord.set(a,new Map),this.ListenerRecord.get(a).set(c,b))}async RemovListener(a,c){if(this.ListenerRecord.has(a)&&this.ListenerRecord.get(a).has(c)){const b=this.ListenerRecord.get(a).get(c);a.removeEventListener(c,b);this.ListenerRecord.get(a).delete(c)}}async Listen(a,c,b,d={},e){try{a.addEventListener(c,b,d),e(!0)}catch{e(!1)}}async WaitElem(a,c,b,d){let e,f,g;const h=new MutationObserver(()=>{f=c?document.querySelectorAll(a):document.querySelector(a);if(g=c?0<f.length:f)h.disconnect(),clearTimeout(e),d(f)});h.observe(document.body,{childList:!0,subtree:!0});e=setTimeout(()=>{h.disconnect()},1E3*b)}async WaitMap(a,c,b){let d,e;const f=new MutationObserver(()=>{e=a.map(g=>document.querySelector(g));e.every(g=>g)&&(f.disconnect(),clearTimeout(d),b(e))});f.observe(document.body,{childList:!0,subtree:!0});d=setTimeout(()=>{f.disconnect()},1E3*c)}async log(a=null,c="print",b="log"){b="string"===typeof b&&this.Template[b]?b:b="log";if(null==a)this.Template[b](c);else console.groupCollapsed(a),this.Template[b](c),console.groupEnd()}store(a,c,b=null){switch(a[0]){case "g":return this.GM[a](c,b);case "s":return null!==b?this.GM[a](c,b):null;default:return Error("wrong type of operation")}}async Menu(a){for(const [c,b]of Object.entries(a))GM_registerMenuCommand(c,()=>{b()})}};