Skip to content

Instantly share code, notes, and snippets.

@asciitohex
Forked from waynegraham/console.js
Created November 23, 2021 15:10
Show Gist options
  • Save asciitohex/ab76848f7ec1a43544991019c8212033 to your computer and use it in GitHub Desktop.
Save asciitohex/ab76848f7ec1a43544991019c8212033 to your computer and use it in GitHub Desktop.

Revisions

  1. Wayne Graham revised this gist Jun 12, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion index.html
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,7 @@
    <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <style>
    #debugDiv {height: 200px; width: 500px; border: 1px solid #333;}
    #debugDiv {height: 200px; width: 500px; border: 1px solid #333; overflow:scroll;}
    </style>
    <script src="console.js"></script>
    </head>
  2. Wayne Graham revised this gist Jun 12, 2013. 1 changed file with 16 additions and 0 deletions.
    16 changes: 16 additions & 0 deletions index.html
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    <!DOCTYPE HTML>
    <html>
    <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <style>
    #debugDiv {height: 200px; width: 500px; border: 1px solid #333;}
    </style>
    <script src="console.js"></script>
    </head>
    <body>
    <div id="debugDiv"></div>
    <script>
    console.log('test');
    </script>
    </body>

  3. Wayne Graham created this gist Jun 12, 2013.
    11 changes: 11 additions & 0 deletions console.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    if (typeof console != "undefined")
    if (typeof console.log != 'undefined')
    console.olog = console.log;
    else
    console.olog = function() {};

    console.log = function(message) {
    console.olog(message);
    $('#debugDiv').append('<p>' + message + '</p>');
    };
    console.error = console.debug = console.info = console.log