Talk:Longcat

From Encyclopedia Dramatica
Jump to navigation Jump to search

Missing Image

- Mr.Jonzz Jonzz.png 21:59, 17 December 2012 (EST)

Pouya's longcat generator

<!--

   Modified version of:
   http://web.archive.org/web/20070310195813/http://lepouya.com/dhtml/longcat.html

-->

<head><title>Pouya's longcat generator</title></head>
    <body>
    <form id="catform" name="catform" action="#">
        <table border="1" align="center">
        <thead>
            <tr><td colspan="2" align="center">
                <font size="5">Pouya's longcat generator</font>
            </td></tr>
        </thead>
        <tbody>
            <tr><td colspan="2" align="center">
                How long is longcat? <input type="text" name="lentext" id="lentext" size="8" value="1" onchange="generate();"/>
                <input type="submit" name="go" id="go" value="Go!" onclick="generate(); return false;" onsubmit="generate(); return false;"/>
            </td></tr>
            <tr><td colspan="2" align="center">
                <div id="res" name="res" style="width: 100%; text-align: left;">
                </div>
            </td></tr>
        </tbody>
        </table>
    </form>
    <script language="javascript">
        function generate()
        {
            var olentext = document.getElementById("lentext");
            var ores = document.getElementById("res");
            var l = Math.round(olentext.value), i;
            var res = "<pre>";
            res = res + "           /\\___/\\\n";
            res = res + "          /       \\\n";
            res = res + "         |  #    # |\n";
            res = res + "         \\     @   |\n";
            res = res + "          \\   _|_ /\n";
            res = res + "          /       \\_____\n";
            res = res + "         / _______ ___   \\\n";
            res = res + "        |______   \\   \\__/\n";
            res = res + "          |    \\__/\n";
            res = res + "          |       |\n";
            for (i=0; i<l; i++)
            res = res + "          |       |\n";
            res = res + "          /        \\\n";
            res = res + "         /   ____   \\\n";
            res = res + "         |  /    \\  |\n";
            res = res + "         | |      | |\n";
            res = res + "        /  |      |  \\\n";
            res = res + "        \\__/      \\__/\n";
            ores.innerHTML = res + "</pre>";
        }
        generate();
    </script>
    </body>
</html>