Easier way to write scripts as dom
此脚本不应直接安装。它是供其他脚本使用的外部库,要使用该库请加入元指令 // @require https://update.cn-greasyfork.org/scripts/32816/215508/Append%20Script.js
// ==UserScript==
// @name Append Script
// @version 1.0
// @description Easier way to write scripts as dom
// @author A Meaty Alt
// @match *://*/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
function appendScript(scriptContent){
var script = document.createElement("script");
script.text = scriptContent;
document.getElementsByTagName("body")[0].appendChild(script);
}
appendScript(appendScript.toString());
})();