mock console.debug and console.info
authorDobrica Pavlinusic <dpavlin@rot13.org>
Wed, 28 Jul 2010 13:28:17 +0000 (15:28 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Wed, 28 Jul 2010 13:28:17 +0000 (15:28 +0200)
This allows us to work in Firefox without Firebug installed

scripts/RFID-JSONP-server.pl

index a904515..5c47daf 100755 (executable)
@@ -164,6 +164,15 @@ label[for=pull-reader] {
 </style>
 <script type="text/javascript">
 
 </style>
 <script type="text/javascript">
 
+// mock console
+if(!window.console) {
+       window.console = new function() {
+               this.info = function(str) {};
+               this.debug = function(str) {};
+       };
+}
+
+
 function got_visible_tags(data,textStatus) {
        var html = 'No tags in range';
        if ( data.tags ) {
 function got_visible_tags(data,textStatus) {
        var html = 'No tags in range';
        if ( data.tags ) {