SOURCE

console 命令行工具 X clear

                    
>
console
<script>
            var issafariBrowser = /Safari/.test(navigator.userAgent) && !/Chrome/.test(navigator.userAgent);
            if (issafariBrowser) {
                Date = function (Date) {
                    MyDate.prototype = Date.prototype;
                    return MyDate;

                    function MyDate() {
                        // 当只有一个参数并且参数类型是字符串时,把字符串中的-替换为/
                        if (arguments.length === 1) {
                        let arg = arguments[0];
                        if (Object.prototype.toString.call(arg) === '[object String]' && arg.indexOf('T') === -1) {
                            arguments[0] = arg.replace(/-/g, "/");
                            // console.log(arguments[0]);
                        }
                        }
                        let bind = Function.bind;
                        let unbind = bind.bind(bind);
                        return new (unbind(Date, null).apply(null, arguments));
                    }
                }(Date);
            }
        </script>