Paste #15735: Mostly the JavaScript part

Date: 2015/05/11 00:44:09 UTC-07:00
Type: Plain Text

View Raw Paste Download This Paste
Copy Link


<!doctype html>
<html>
    <head>
        <title>Morphan1's Website</title>
        <link rel="stylesheet" type="text/css" href="style.css">
        <script type="text/javascript">
            function fillPlugins() {
                var pluginList = "<{server.list_plugin_names.comma_separated}>".split(", ");
                var versionList = "<{server.list_plugins.parse[version].substring[4].replace[|].with[ VERSESC ]}>".split(" VERSESC ");
                var authorsList = "<{server.list_plugins.parse[authors.comma_separated].substring[4].replace[|].with[ VERSESC ]}>".split(" VERSESC ");
                var table = document.getElementById("plugins");
                var trCount = table.rows.length;
                for (var i = 0; i < pluginList.length; i++) {
                    var row = table.insertRow(trCount);
                    var nameCell = row.insertCell(0);
                    var versionCell = row.insertCell(1);
                    var authorsCell = row.insertCell(2);
                    nameCell.innerHTML = pluginList[i];
                    versionCell.innerHTML = versionList[i];
                    authorsCell.innerHTML = authorsList[i];
                    trCount++;
                }
            }
        </script>
    </head>
    <body onload="fillPlugins();">
        <div class="test">
            <h1><a href="/wat.png">Yay! A thing!</a></h1><br>
            <h2><a title="<{server.list_online_players.parse[name].comma_separated}>"><{server.list_online_players.size}> online player<{tern[<server.list_online_players.size.is[!=].to[1]>]:s||}>!</a></h2><br>
            <table align="center" id="plugins">
                <tr>
                    <td colspan="3">Current Plugins</td>
                </tr>
                <tr>
                    <td><b>Name</b></td>
                    <td><b>Version</b></td>
                    <td><b>Author</b></td>
                </tr>
            </table>
        </div>
    </body>
</html>