Bläddra i källkod

Revert Safari timestamp injection (#632)

Will be superseded by the report tool which does log timestamps
Lennart Grahl 6 år sedan
förälder
incheckning
5f9bd8f477
1 ändrade filer med 0 tillägg och 32 borttagningar
  1. 0 32
      src/app.ts

+ 0 - 32
src/app.ts

@@ -27,7 +27,6 @@ import './filters';
 import './partials/messenger';
 import './partials/welcome';
 import './services';
-import {BrowserService} from './services/browser';
 import './threema/container';
 
 // Configure asynchronous events
@@ -147,35 +146,4 @@ angular.module('3ema', [
     }]);
 }])
 
-.run([
-    '$log', 'CONFIG', 'BrowserService',
-    function($log: ng.ILogService, CONFIG: threema.Config, browserService: BrowserService) {
-        // For Safari (when in DEBUG mode), monkey-patch $log to show timestamps.
-
-        if (!browserService.getBrowser().isSafari(false)) {
-            return;
-        }
-
-        const oldLog = $log.log;
-        const oldInfo = $log.info;
-        const oldWarn = $log.warn;
-        const oldDebug = $log.debug;
-        const oldError = $log.error;
-
-        function enhanceLogging(wrapped) {
-            return function(data) {
-                const now = new Date();
-                const currentDate = `[${now.toISOString()}.${now.getMilliseconds()}]`;
-                wrapped.apply(this, [currentDate, ...arguments]);
-            };
-        }
-
-        $log.log = enhanceLogging(oldLog);
-        $log.info = enhanceLogging(oldInfo);
-        $log.warn = enhanceLogging(oldWarn);
-        $log.debug = enhanceLogging(oldDebug);
-        $log.error = enhanceLogging(oldError);
-    },
-])
-
 ;