document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. <script src="../main.js" type="text/javascript"></script>
  2. <script>
  3.     // My quickie class creator.  It sets up classical(ish) inheritence without all
  4.     // the ugliness of .protoype this and that.  There\'s a bunch of different mechanisms
  5.     // to do this, but I\'m stubborn and did my own..
  6.     JPLT.Class.create(
  7.         // Class Name
  8.         "JPLT.SimpleHelloWorld",
  9.        
  10.         // Superclass
  11.         Object,
  12.  
  13.         // Constructor
  14.         function() {
  15.             this.createElement();
  16.             this.paint();
  17.         },
  18.  
  19.         // Members
  20.         {
  21.             createElement: function() {
  22.                 this.element = document.createElement("div");
  23.  
  24.                 this.element.innerHTML = "Hello, World!";
  25.                 this.element.style.margin = "auto";
  26.                 this.element.style.fontSize = "18pt";
  27.                 this.element.style.fontFamily = "sans-serif";
  28.  
  29.                 return this.element;
  30.             },
  31.  
  32.             paint: function() {
  33.                 var body = document.documentElement || document.body;
  34.                 body.appendChild(this.element);
  35.             }
  36.         }
  37.     );
  38.  
  39.     var helloWorld = new JPLT.SimpleHelloWorld();
  40. </script>
');