[{"_conflux_version":"0.0.4","bookSourceName":"Conflux","bookSourceUrl":"https:\/\/conflux.de5.net\/api\/v1\/bookstore\/conflux","customButton":true,"enabled":true,"enabledExplore":true,"eventListener":true,"exploreUrl":"@js:\nvar s=null;try{s=this.source||source}catch(e){}\nvar v={};try{v=JSON.parse(s.getVariable()||'{}')}catch(e){}\nvar cfg=v.__cfg||{},mode=(cfg.mode||'novel'),base='';\ntry{base=String(s.bookSourceUrl).replace(\/\\\/$\/,'')}catch(e){}\nvar srcs=[],tabs=[],out=[],modes=[],loaded=false;\ntry{var j=JSON.parse(java.ajax(base+'\/explore-tabs,'+JSON.stringify({method:'GET',headers:cfx.headers.call(this)})));if(j&&j.code===0&&j.data){loaded=true;modes=j.data.modes||[];srcs=j.data.sources||[];tabs=j.data.tabs||[];var cur=j.data.current||{};mode=cur.mode||'';cfg.source=cur.source||'';cfg.mode=mode;v.__cfg=cfg;v.__csrc=cfg.source;}}catch(e){}\ntry{s.setVariable(JSON.stringify(v))}catch(e){}\nif(srcs.length){var names=[],map={};for(var i=0;i<srcs.length;i++){names.push(srcs[i].name);map[srcs[i].name]=srcs[i].code;}\nv.__srcmap=map;try{s.setVariable(JSON.stringify(v))}catch(e){}\nvar cur='全部平台',cs=cfg.source||'';for(var n in map){if(map[n]===cs)cur=n;}\nvar ALL={novel:'小说',audio:'听书',comic:'漫画',video:'短剧'},ML={};for(var i=0;i<modes.length;i++){if(ALL[modes[i]])ML[modes[i]]=ALL[modes[i]];}\nout.push({title:'源站',type:'select',chars:names,default:cur,action:\"(function(){cfx.setSourceByName.call(this,infoMap['源站']||'')})()\",style:{layout_flexGrow:1,layout_flexBasisPercent:0.55}});\nout.push({title:'模式',type:'select',chars:(function(){var a=[];for(var k in ML)a.push(ML[k]);return a})(),default:ML[mode],action:\"(function(){var m={};for(var k in ML)m[ML[k]]=k;cfx.setMode.call(this,m[infoMap['模式']]||'novel')})()\",style:{layout_flexGrow:1,layout_flexBasisPercent:0.45}});}\n\nfor(var t=0;t<tabs.length;t++){out.push(tabs[t]);}\nJSON.stringify(out);","header":"@js:\nJSON.stringify(cfx.headers.call(this))","jsLib":"var cfx={ver:'0.0.4',site:'https:\/\/conflux.de5.net',d:function(raw){return cfx.chk.call(this,cfx.decrypt.call(this,raw))},src:function(){var s=null;try{s=this&&this.source}catch(e){}if(!s){try{s=source}catch(e){}}if(!s){try{if(this&&this.bookSourceUrl)s=this}catch(e){}}return s||null},base:function(){var s=cfx.src.call(this),u='';try{u=String(s&&s.bookSourceUrl||'')}catch(e){}return u.replace(\/\\\/$\/,'')},lb:function(){return cfx.base.call(this)},getv:function(){var s=cfx.src.call(this);try{return s?String(s.getVariable()||''):''}catch(e){return ''}},setv:function(v){var s=cfx.src.call(this);try{if(s)s.setVariable(v)}catch(e){}},lh:function(){var s=cfx.src.call(this);try{return s?String(s.getLoginHeader()||''):''}catch(e){return ''}},did:function(){var i='';try{i=java.deviceID()||''}catch(e){}if(i)return String(i);var o={};try{o=JSON.parse(cfx.getv.call(this)||'{}')}catch(e){}if(!o.__did){o.__did='d'+Math.random().toString(36).slice(2,10);cfx.setv.call(this,JSON.stringify(o))}return o.__did||''},ua:function(){try{return java.getWebViewUA()}catch(e){return 'Mozilla\/5.0'}},chk:function(j){if(j&&j.code&&j.code!==0)throw (j.msg||j.error||('错误'+j.code));return j},books:function(raw){var j=cfx.d.call(this,raw),a=(j&&j.data&&j.data.bookList)||[],l=new Packages.java.util.ArrayList();for(var i=0;i<a.length;i++){var b=a[i],m=cfx.jm.call(this,b,['name','author','kind','intro','coverUrl','lastChapter','bookUrl']);l.add(m)}return l},chapters:function(raw){var j=cfx.d.call(this,raw),a=(j&&j.data&&j.data.chapterList)||[],l=new Packages.java.util.ArrayList();for(var i=0;i<a.length;i++){var c=a[i]||{},m=cfx.jm.call(this,c,['title','url','updateTime']);m.put('isVolume',c.isVolume||false);l.add(m)}return l},info:function(raw,bk){var j=cfx.d.call(this,raw),b=(j&&j.data)||{},m=cfx.jm.call(this,b,['name','author','coverUrl','intro','kind','lastChapter','tocUrl']);try{if(bk&&b.bookType)bk.type={audio:32,comic:64,video:4}[b.bookType]||bk.type}catch(e){}return m},text:function(raw){try{return cfx.d.call(this,raw).data.content||''}catch(e){return ''}},next:function(raw){try{return cfx.d.call(this,raw).data.nextUrl||''}catch(e){return ''}},jm:function(o,k){var m=new Packages.java.util.HashMap();for(var i=0;i<k.length;i++){var x=o&&o[k[i]];m.put(k[i],x==null?'':x)}return m},k:function(v,n,hk){var o={};try{o=JSON.parse(cfx.getv.call(this)||'{}')}catch(e){}if(v===undefined){try{var h=(JSON.parse(cfx.lh.call(this)||'{}')||{})[hk];if(h)return h}catch(e){}return o[n]||''}o[n]=v;cfx.setv.call(this,JSON.stringify(o))},rk:function(v){return cfx.k.call(this,v,'__rk','X-Resp-Key')},kid:function(v){return cfx.k.call(this,v,'__kid','X-Session-Key')},headers:function(){var h={'User-Agent':cfx.ua.call(this),'X-Source-Version':cfx.ver};try{var l=JSON.parse(cfx.lh.call(this)||'{}')||{};delete l['X-Resp-Key'];for(var k in l)h[k]=l[k]}catch(e){}var k=cfx.kid.call(this);if(k)h['X-Session-Key']=k;return h},aes:function(b64,key,iv){try{var r=Packages.android.util.Base64.decode(b64,0),ks=new Packages.javax.crypto.spec.SecretKeySpec(new Packages.java.lang.String(key).getBytes('UTF-8'),'AES'),is=new Packages.javax.crypto.spec.IvParameterSpec(new Packages.java.lang.String(iv).getBytes('UTF-8')),c=Packages.javax.crypto.Cipher.getInstance('AES\/CBC\/PKCS5Padding');c.init(2,ks,is);return String(new Packages.java.lang.String(c.doFinal(r),'UTF-8'))}catch(e){return ''}},decrypt:function(raw){try{var j=JSON.parse(raw);if(!j||!j.enc)return j;var rk=cfx.rk.call(this);if(!rk)throw '未登录';var p=cfx.aes.call(this,j.data,rk.substring(0,32),rk.substring(32,48));if(!p)throw 'AES';return JSON.parse(p)}catch(e){return {code:-1,msg:'解密失败'+e}}},unpack:function(u){var m=String(u||'').match(\/[?&]p=([^&]+)\/);if(!m)return {};try{return JSON.parse(java.base64Decode(decodeURIComponent(m[1]).replace(\/-\/g,'+').replace(\/_\/g,'\/')))}catch(e){return {}}},onEvent:function(event,book,chapter){if(event!=='clickCustomButton'&&event!=='clickBookName')return false;var c=cfx.unpack.call(this,(chapter&&chapter.url)||(book&&book.tocUrl)||'');if(!c.bookId&&!c.bookUrl){java.toast('目录加载中，请稍后再试');return true}var p={source:c.source||'',bookId:c.bookId||c.bookUrl||'',chapterId:c.chapterId||'',title:(chapter&&chapter.title)||''};showCmt(cfx.lb.call(this)+'\/comment?p='+encodeURIComponent(java.base64Encode(JSON.stringify(p))));return true},url:function(p){return cfx.lb.call(this)+p},cfg:function(k,v,clear){var o={};try{o=JSON.parse(cfx.getv.call(this)||'{}')}catch(e){}var c=o.__cfg||{};if(clear)c.source='';c[k]=v||'';o.__cfg=c;cfx.setv.call(this,JSON.stringify(o));var b={source:c.source||'',mode:c.mode||'novel'};if(k.indexOf('filter_')===0){b.settings={};b.settings[k.substring(7)]=v||''}try{java.ajax(cfx.lb.call(this)+'\/prefs,'+JSON.stringify({method:'POST',body:JSON.stringify(b),headers:cfx.headers.call(this)}))}catch(e){}try{java.refreshExplore()}catch(e){}}};cfx.setSource=function(v){cfx.cfg.call(this,'source',v)};cfx.setMode=function(v){cfx.cfg.call(this,'mode',v,true)};cfx.setFilter=function(k,v){cfx.cfg.call(this,'filter_'+k,v)};cfx.setSourceByName=function(n){var o={};try{o=JSON.parse(cfx.getv.call(this)||'{}')}catch(e){}var m=o.__srcmap||{},c=m[n];if(c===undefined)c=n;cfx.setSource.call(this,c)};function showCmt(u){var o='{\"heightPercentage\":0.8,\"dismissOnTouchOutside\":true}';try{java.showBrowser(u,null,'',o)}catch(e){try{java.startBrowserAwait(u,'段评')}catch(x){try{java.startBrowser(u,'段评')}catch(y){}}}}","loginUi":"[{\"name\":\"邮箱\",\"type\":\"text\"},{\"name\":\"密码\",\"type\":\"password\"},{\"name\":\"🔓账号登录\",\"type\":\"button\",\"action\":\"login(true)\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.45}},{\"name\":\"🔑注册\",\"type\":\"button\",\"action\":\"register()\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.45}},{\"name\":\"🔅用户中心\",\"type\":\"button\",\"action\":\"user()\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.45}},{\"name\":\"❌退出\",\"type\":\"button\",\"action\":\"logout()\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.45}},{\"name\":\"源站\",\"type\":\"button\",\"action\":\"settings()\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.45}},{\"name\":\"源状态\",\"type\":\"button\",\"action\":\"status()\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.45}},{\"name\":\"气泡\",\"type\":\"button\",\"action\":\"icons()\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.45}},{\"name\":\"更新\",\"type\":\"button\",\"action\":\"upd()\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.45}},{\"name\":\"🌐网页\",\"type\":\"button\",\"action\":\"web()\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":1}}]","loginUrl":"function ua(){try{return cfx.ua.call(this)}catch(x){return 'Mozilla\/5.0'}}\nfunction op(u,t){try{java.startBrowserAwait(u,t)}catch(x){try{java.startBrowser(u,t)}catch(y){}}}\nfunction bs(){try{return cfx.lb.call(this)}catch(x){return ''}}\nfunction tq(){try{return String((JSON.parse(source.getLoginHeader()||'{}')||{}).Authorization||'').replace('Bearer ','')}catch(x){return ''}}\nfunction login(f){var e='',p='';try{if(f===true){e=result.get('邮箱')||'';p=result.get('密码')||''}else{var m=source.getLoginInfoMap();e=m.get('邮箱')||'';p=m.get('密码')||''}}catch(x){}if(!e||!p){java.toast('请填写邮箱密码');return}try{var j=JSON.parse(java.ajax(bs()+'\/login,'+JSON.stringify({method:'POST',body:JSON.stringify({email:e,password:p}),headers:{'User-Agent':ua(),'X-Device-Id':cfx.did.call(this),'Content-Type':'application\/json'}})));if(!(j.data&&j.data.token)){java.toast('登录失败：'+j.msg);return}source.putLoginHeader(JSON.stringify({Authorization:'Bearer '+j.data.token,'X-Session-Key':j.data.kid||'','X-Resp-Key':j.data.respKey||''}));var v={};try{v=JSON.parse(source.getVariable()||'{}')}catch(x){}v.__rk=j.data.respKey||'';v.__kid=j.data.kid||'';source.setVariable(JSON.stringify(v));try{java.upLoginData()}catch(x){}java.toast('已登录')}catch(x){java.toast('失败：'+x)}}\nfunction logout(){try{java.ajax(bs()+'\/logout,'+JSON.stringify({method:'POST',headers:cfx.headers.call(this)}))}catch(x){}try{source.removeLoginHeader()}catch(x){}java.toast('已退出登录')}\nfunction upd(){op(bs()+'\/update?v='+cfx.ver,'更新')}\nfunction pg(p,t){var s=tq();op(bs()+p+(s?'?t='+encodeURIComponent(s):''),t)}\nfunction settings(){pg('\/settings','源站与段评')}\nfunction register(){op(bs()+'\/register','注册账号')}\nfunction user(){pg('\/u','用户中心')}\nfunction icons(){pg('\/icons-page','气泡样式')}\nfunction status(){pg('\/status','源状态')}\nfunction web(){op(cfx.site,'网页端')}\n","ruleBookInfo":{"author":"$.author","coverUrl":"$.coverUrl","init":"@js:cfx.info.call(this,result,book)","intro":"$.intro","kind":"$.kind","lastChapter":"$.lastChapter","name":"$.name","tocUrl":"$.tocUrl","wordCount":"$.wordCount"},"ruleContent":{"callBackJs":"cfx.onEvent.call(this, event, book, chapter);","content":"@js:cfx.text.call(this,result)","nextContentUrl":"@js:cfx.next.call(this,result)"},"ruleExplore":{"author":"$.author","bookList":"@js:cfx.books.call(this,result)","bookUrl":"$.bookUrl","coverUrl":"$.coverUrl","intro":"$.intro","kind":"$.kind","lastChapter":"$.lastChapter","name":"$.name","wordCount":"$.wordCount"},"ruleSearch":{"author":"$.author","bookList":"@js:cfx.books.call(this,result)","bookUrl":"$.bookUrl","coverUrl":"$.coverUrl","intro":"$.intro","kind":"$.kind","lastChapter":"$.lastChapter","name":"$.name","wordCount":"$.wordCount"},"ruleToc":{"chapterList":"@js:cfx.chapters.call(this,result)","chapterName":"$.title","chapterUrl":"$.url","isVolume":"$.isVolume","updateTime":"$.updateTime"},"searchUrl":"<js>\nresult = cfx.url.call(this, '\/search?key=' + encodeURIComponent(key) + '&page=' + page);\n<\/js>","lastUpdateTime":"1796135317185"}]