跨域解决方案
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 职责链模式 | |
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 ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var checkVideoBuffer = (function(){ | |
var timer = null; | |
var timerOut = null; | |
var timerNum = 2000; | |
function checkBufferIng(oParam){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Document</title> | |
<style type="text/css"> | |
.way { | |
overflow:hidden; | |
margin-bottom:10px; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! | |
* 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 | |
// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!function (globals, document) { | |
var storagePrefix = "mbox_"; | |
globals.LocalJs = { | |
require: function (file, callback) { | |
/* | |
如果无法使用localstorage,则使用document.write把需要请求的脚本写在页面上 | |
作为fallback,使用document.write确保已经加载了所需要的类库 | |
*/ | |
if (!localStorage.getItem(storagePrefix + "jq")) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Document</title> | |
<style type="text/css"> | |
*{ | |
margin: 0; | |
padding: 0; | |
} |
NewerOlder