You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
20 KiB
1 line
20 KiB
5 years ago
|
window.BCSE_KEY = '', window.BCSE_VS = '2.0', window.BCSE_TK = '5ff687f1302e609d08e92386af91fb15';!function(){window.BCse={};var e=function(e){"use strict";var t,r,o,a,n,s,i,c,u;return r=function(e,t,r){e.addEventListener?e.addEventListener(t,r,!1):e.attachEvent?e.attachEvent("on"+t,r):e["on"+t]=r},o=function(r,o){t.log("Garbage collecting!"),o.parentNode.removeChild(o),e[r]=void 0;try{delete e[r]}catch(a){}},a=function(e,t){var r,o,a="";for(r in e)e.hasOwnProperty(r)&&(r=t?encodeURIComponent(r):r,o=t?encodeURIComponent(e[r]):e[r],a+=r+"="+o+"&");return a.replace(/&$/,"")},n=function(){var e="",t=[],r="0123456789ABCDEF",o=0;for(o=0;32>o;o+=1)t[o]=r.substr(Math.floor(16*Math.random()),1);return t[12]="4",t[16]=r.substr(3&t[16]|8,1),e="flyjsonp_"+t.join("")},s=function(e,r){t.log(r),"undefined"!=typeof e&&e(r)},i=function(e,r){t.log("GET success"),"undefined"!=typeof e&&e(r),t.log(r)},c=function(e,r){t.log("POST success"),"undefined"!=typeof e&&e(r),t.log(r)},u=function(e){t.log("Request complete"),"undefined"!=typeof e&&e()},t={},t.options={debug:!1},t.init=function(e){var r;t.log("Initializing!");for(r in e)e.hasOwnProperty(r)&&(t.options[r]=e[r]);return t.log("Initialization options"),t.log(t.options),!0},t.log=function(r){e.console&&t.options.debug&&e.console.log(r)},t.get=function(m){m=m||{};var d=m.url,p=m.callbackParameter||"callback",l=m.parameters||{},y=e.document.createElement("script"),h=n(),f="?";if(!d)throw new Error("URL must be specified!");l[p]=h,d.indexOf("?")>=0&&(f="&"),d+=f+a(l,!0),e[h]=function(e){"undefined"==typeof e?s(m.error,"Invalid JSON data returned"):"post"===m.httpMethod?(e=e.query.results,e&&e.postresult?(e=e.postresult.json?e.postresult.json:e.postresult,c(m.success,e)):s(m.error,"Invalid JSON data returned")):i(m.success,e),o(h,y),u(m.complete)},t.log("Getting JSONP data"),y.setAttribute("src",d),y.setAttribute("charset","utf-8"),e.document.getElementsByTagName("head")[0].appendChild(y),r(y,"error",function(){o(h,y),u(m.complete),s(m.error,"Error while trying to access the URL")})},t.post=function(e){e=e||{};var r,o,n=e.url,s=e.parameters||{},i={};if(!n)throw new Error("URL must be specified!");r=encodeURIComponent('select * from jsonpost where url="'+n+'" and postdata="'+a(s,!1)+'"'),o="http://query.yahooapis.com/v1/public/yql?q="+r+"&format=json&env="+encodeURIComponent("store://datatables.org/alltableswithkeys"),i.url=o,i.httpMethod="post","undefined"!=typeof e.success&&(i.success=e.success),"undefined"!=typeof e.error&&(i.error=e.error),"undefined"!=typeof e.complete&&(i.complete=e.complete),t.get(i)},t}(window),t=function(){function e(){f=1}function t(){f=0}function o(e){e&&r.count(e)>0&&(e.erroStatus&&0===e.erroStatus.erroNo?(p=0,e.searchInfo&&(l=e.searchInfo,e.searchInfo.facets&&(y=e.searchInfo.facets)),e.blockData&&(d=e.blockData)):p=e.erroStatus.erroNo)}function a(e){e&&r.count(e)>0&&(0===e.error?(p=0,h=e):p=6)}function n(){var e=[];if(0===p&&d.length>0)for(var t=0;t<d.length;t++)e[t]={},e[t].title=d[t].title?d[t].title:"",0===f&&(e[t].title=e[t].title.replace(/<em>/g,"").replace(/<em>/g,""),e[t].title=e[t].title.replace(/<\/em>/g,"").replace(/<\/em>/g,"")),e[t].linkUrl=d[t].linkurl?d[t].linkurl:"",e[t]["abstract"]=d[t]["abstract"]?d[t]["abstract"]:"",e[t].image=d[t].image?d[t].image:"",e[t].dispUrl=d[t].dispurl?d[t].dispurl:"",e[t].dispTime=d[t].timeshow?d[t].timeshow:"",d[t].summarywords&&r.count(d[t].summarywords)>0&&(5===l.tplId?(e[t].forumName=d[t].summarywords.forumName?d[t].summarywords.forumName:"",e[t].author=d[t].summarywords.author?d[t].summarywords.author:"",e[t].createdTime=d[t].summarywords.createdTime?d[t].summarywords.createdTime:"",e[t].lastReplyTime=d[t].summarywords.lastReplyTime?d[t].summarywords.lastReplyTime:"",e[t].replyCount=d[t].summarywords.replyCount?d[t].summarywords.replyCount:"",e[t].viewCount=d[t].summarywords.viewCount?d[t].summarywords.viewCount:"",e[t].threadClassify=d[t].summarywords.threadClassify?d[t].summarywords.threadClassify:""):3===l.tplId?(e[t].genre=d[t].summarywords.genre?d[t].summarywords.genre:"",e[t].downloadCount=d[t].su
|