Easier way to write scripts as dom
此腳本不應該直接安裝,它是一個供其他腳本使用的函式庫。欲使用本函式庫,請在腳本 metadata 寫上: // @require https://update.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());
})();