代码拉取完成,页面将自动刷新
同步操作将从 云峰网络/wrouter 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
/*! wrouter v0.10 | (c) leiweicyz | www.51news.cc/license */
!function (a) { "use strict"; var b = function (a) { var c, d, e, f, b = this.configure(a); if (this.checkrouter()) $(function () { $("body").delegate("a", "click", function () { return b.load($(this).attr("href")) ? !1 : void 0 }) }), b.load(), c = function () { b.load() }, this.html5history ? window.onpopstate = c : window.onhashchange = c; else { d = location.hash, d && d.indexOf("#") > -1 && (e = d.indexOf("#"), d = d.substr(e + 1, d.length - e)); for (f in b.routers) d.match(b.routers[f].rule) && (location.href = d) } }; b.prototype.combine = function () { var b, a = ""; for (b in arguments) a += "/" + this.trim(arguments[b], arguments.length - 1 == b ? 1 : 0); return a }, b.prototype.trim = function (a, b, c) { return "number" == typeof b ? (c = b, b = "/") : c || (c = 0), b || (b = "/"), 0 != c && 1 != c || 0 != a.indexOf(b) || (a = a.substr(1, a.length - 1)), 0 != c && 2 != c || a.lastIndexOf(b) != a.length - b.length || (a = a.substr(0, a.length - b.length)), a }, b.prototype.checkrouter = function () { var a, b; return "onpopstate" in window ? !0 : "onhashchange" in window ? (a = navigator.userAgent, a.indexOf("compatible") > -1 && a.indexOf("MSIE") > -1 && -1 == a.indexOf("Opera") ? (b = new RegExp("MSIE (\\d+\\.\\d+);"), b.test(a), parseFloat(RegExp["$1"]) >= 8) : !0) : !1 }, b.prototype.configure = function (a) { var c, b = this; b.routers = a && a.routers || []; for (c in b.routers) "string" == typeof b.routers[c].rule && (b.routers[c].rule = new RegExp(b.routers[c].rule, "g")); return b.html5history = a && "boolean" == typeof a.html5history && !a.html5history ? a.html5history : void 0 !== window.history.pushState, b.root = a && a.root || "/", b.progress = a && a.progress || "#progress", b.onprogress = a && a.onprogress || function (a) { $(b.progress).css("width", 0).show().animate({ width: (0 == a.total ? 100 : 100 * (a.loaded / a.total)) + "%" }, function () { (0 == a.total || a.loaded == a.total) && $(b.progress).fadeOut(100) }) }, b }, b.prototype.getxhr = function () { return this.xhr ? this.xhr : (this.xhr = window.XMLHttpRequest ? new XMLHttpRequest : new ActiveXObject("Microsoft.XMLHTTP"), this.xhr.onprogress = this.onprogress, this.xhr) }, b.prototype.ajax = function (a, b) { var c = this, d = c.getxhr(); return d.open("GET", a), d.setRequestHeader("WRouter", "1.0"), d.send(null), d.onreadystatechange = function () { 4 == d.readyState && 200 == d.status && b && b(d.responseText), 4 == d.readyState && 200 != d.status && c.error && c.error(d.readyState) }, c }, b.prototype.load = function (a) { var d, e, b = this, c = a ? !0 : !1; if (a = a || (b.html5history ? location.pathname + location.search : location.hash), !b.html5history || a != b.root) { if (d = a.indexOf("#"), d > -1 && (a = b.html5history ? a.substr(0, d) : a.substr(d + 1, a.length - d)), c && !b.html5history) return location.href = "#" + a, !0; for (e in b.routers) if (a.match(b.routers[e].rule)) return b.routers[e].title && (document.title = b.routers[e].title), b.ajax(a, function (a) { b.routers[e].container && $(b.routers[e].container).html(b.routers[e].action ? b.routers[e].action(a) : a), !b.routers[e].container && b.routers[e].action(a) }), c && window.history.pushState(null, null, a), !0 } }, a.wrouter = function (a) { return new b(a) } }(window);
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。