include includes/pre
<title>Latest pastes</title>
script.
    function bodyLoad() {
        loadPasteList({preview: 150}, result => {
            let columns = [
                {name: "pasteID", align: "left", inject: true, transform: d => `<a href="/pastes/${d}">${d}</a>`},
                {name: "author", align: "left", css: "white-space: nowrap; overflow: hidden", transform: d => d.replace(/\s+/g, " ")},
                {name: "creationTime", align: "left", transform: d => new Date(d).toLocaleString()},
                {name: "content", align: "left", css: "white-space: nowrap; overflow: hidden; max-width: 700px", transform: d => d.replace(/\s+/g, " ")}
            ];
            let output = dataToTable(columns, result);
            output.forEach(tr => {
                q("#tbody").appendChild(tr);
            });
        });
    }
include includes/header
<div>
    <table style="white-space: nowrap">
        <thead>
            <tr>
                <td>ID</td>
                <td>Author</td>
                <td>Created on</td>
                <td>Preview</td>
            </tr>
        </thead>
        <tbody id="tbody">
        </tbody>
    </table>
</div>
<span id="username"></span>
include includes/end
