#用window.onerror捕获并上报Js错误
<!DOCTYPE html>
<html>
| var IE = (function() { | |
| if (document.documentMode) { | |
| return document.documentMode; | |
| } else { | |
| for (var i = 7; i > 4; i--) { | |
| var div = document.createElement("div"); | |
| div.innerHTML = "<!--[if IE " + i + "]><span></span><![endif]-->"; | |
| if (div.getElementsByTagName("span").length) { |
| !function (globals, document) { | |
| var storagePrefix = "mbox_"; | |
| globals.LocalJs = { | |
| require: function (file, callback) { | |
| /* | |
| 如果无法使用localstorage,则使用document.write把需要请求的脚本写在页面上 | |
| 作为fallback,使用document.write确保已经加载了所需要的类库 | |
| */ | |
| if (!localStorage.getItem(storagePrefix + "jq")) { |
| /*! | |
| * jScrollPane - v2.0.22 - 2015-04-25 | |
| * http://jscrollpane.kelvinluck.com/ | |
| * | |
| * Copyright (c) 2014 Kelvin Luck | |
| * Dual licensed under the MIT or GPL licenses. | |
| */ | |
| // Script: jScrollPane - cross browser customisable scrollbars | |
| // |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>Document</title> | |
| <style type="text/css"> | |
| .way { | |
| overflow:hidden; | |
| margin-bottom:10px; | |
| } |
| var checkVideoBuffer = (function(){ | |
| var timer = null; | |
| var timerOut = null; | |
| var timerNum = 2000; | |
| function checkBufferIng(oParam){ |
| (function (global, factory) { | |
| typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : | |
| typeof define === 'function' && define.amd ? define(factory) : | |
| (global.Danmaku = factory()); | |
| }(this, (function () { 'use strict'; | |
| function collidableRange() { | |
| var max = 9007199254740991; | |
| return [{ | |
| range: 0, |
| // 职责链模式 | |
| var Chain = function( fn ){ | |
| this.fn = fn; | |
| this.successor = null; | |
| }; | |
| Chain.prototype.setNextSuccessor = function( successor ){ | |
| return this.successor = successor; | |
| }; | |
| Chain.prototype.passRequest = function(){ | |
| var ret = this.fn.apply( this, arguments ); |