Append Script

Easier way to write scripts as dom

This script should not be not be installed directly. It is a library for other scripts to include with the meta directive // @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());
})();