├── .gitignore ├── README.md ├── cms ├── cms.js └── cms.png ├── cyc ├── cyc.ebg.jsc └── cyc.png ├── eslint.config.mjs ├── extension_repo.jsonl ├── gugu ├── gugu.ebg.jsc └── gugu.png ├── heimuer ├── heimuer.ebg.jsc └── heimuer.png ├── mwcy ├── mwcy.ebg.jsc └── mwcy.png ├── nya ├── nya.ebg.jsc └── nya.png ├── olevod ├── olevod.ebg.jsc └── olevod.png ├── uvod ├── uvod.ebg.jsc └── uvod.png ├── xgkt ├── xgkt.ebg.jsc └── xgkt.png └── yfsp ├── yfsp.ebg.jsc └── yfsp.png /.gitignore: -------------------------------------------------------------------------------- 1 | **/src 2 | node_modules 3 | package.json 4 | package-lock.json -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # easybangumi-ext 2 | 纯纯看番插件 3 | -------------------------------------------------------------------------------- /cms/cms.js: -------------------------------------------------------------------------------- 1 | // @key refgd.cms 2 | // @label 资源站通用 3 | // @versionName 1.1 4 | // @versionCode 2 5 | // @libVersion 11 6 | // @cover https://raw.githubusercontent.com/refgd/easybangumi-ext/refs/heads/main/cms/cms.png 7 | 8 | /* eslint-disable no-unused-vars */ 9 | 10 | // Inject 11 | var networkHelper = Inject_NetworkHelper; 12 | var preferenceHelper = Inject_PreferenceHelper; 13 | 14 | // Hook PreferenceComponent ======================================== 15 | function PreferenceComponent_getPreference() { 16 | var res = new ArrayList(); 17 | var BaseUrl = new SourcePreference.Edit("JSON采集接口", "BaseUrl", "https://json.heimuer.xyz/api.php/provide/vod/?ac=list"); 18 | var AdUrl = new SourcePreference.Edit("去广告接口", "AdUrl", ""); 19 | res.add(BaseUrl); 20 | res.add(AdUrl); 21 | return res; 22 | } 23 | 24 | // Hook PageComment ======================================== 25 | function PageComponent_getMainTabs() { 26 | var res = new ArrayList(); 27 | res.add(new MainTab("首页", MainTab.MAIN_TAB_WITH_COVER)); 28 | var arr = MainUtil.getMainTabs(); 29 | arr.forEach(function(e) { 30 | res.add(new MainTab(e.name, MainTab.MAIN_TAB_GROUP, e.id)); 31 | }); 32 | 33 | return res; 34 | } 35 | 36 | function PageComponent_getSubTabs(mainTab) { 37 | var res = new ArrayList(); 38 | var tab = MainUtil.getMainTab(mainTab.ext); 39 | if (tab) { 40 | if(tab.subs && tab.subs.length > 0){ 41 | tab.subs.forEach(function(e) { 42 | res.add(new SubTab(e.name, true, e.id)); 43 | }); 44 | }else{ 45 | res.add(new SubTab('全部', true, tab.id)); 46 | } 47 | } 48 | return res; 49 | } 50 | 51 | function PageComponent_getContent(mainTab, subTab, key) { 52 | var res = new ArrayList(); 53 | var nextKey = null; 54 | 55 | var path = "?ac=detail&sort_direction=desc" 56 | if (subTab && subTab.ext) { 57 | path += "&t="+subTab.ext; 58 | } 59 | if(key > 0){ 60 | path += "&pg=" + key 61 | } 62 | 63 | var resp = MainUtil.getContent(path); 64 | if(resp && resp.list){ 65 | resp.list.forEach(function(it) { 66 | res.add(makeCartoonCover({ 67 | id: it.vod_id, 68 | url: it.vod_id, 69 | title: it.vod_name, 70 | cover: it.vod_pic, 71 | intro: Jsoup.parse(it.vod_remarks).text() 72 | })); 73 | }); 74 | 75 | var curPage = resp.page ? resp.page: 0 76 | var pageCount = resp.pagecount ? resp.pagecount: 0 77 | if (curPage < pageCount){ 78 | nextKey = new Packages.java.lang.Integer(parseInt(curPage) + 1); 79 | } 80 | } 81 | 82 | return new Pair(nextKey, res); 83 | } 84 | 85 | // Hook DetailedComponent ======================================== 86 | 87 | function DetailedComponent_getDetailed(summary) { 88 | var resp = MainUtil.getContent("?ac=detail&ids=" + summary.id); 89 | if(resp.list && resp.list.length > 0){ 90 | var it = resp.list[0]; 91 | 92 | var status = Cartoon.STATUS_UNKNOWN; 93 | var updateStrategy = Cartoon.UPDATE_STRATEGY_ALWAYS; 94 | var genreList = new ArrayList();//标签 95 | if(it.vod_area){ 96 | genreList.add(it.vod_area); 97 | } 98 | if(it.vod_lang){ 99 | genreList.add(it.vod_lang); 100 | } 101 | 102 | var cartoon = makeCartoon( 103 | { 104 | id: summary.id, 105 | url: 'detail/'+summary.id, 106 | title: it.vod_name, 107 | genreList: genreList, 108 | cover: it.vod_pic, 109 | intro: Jsoup.parse(it.vod_blurb).text(), 110 | description: Jsoup.parse(it.vod_content).text(), 111 | updateStrategy: updateStrategy, 112 | isUpdate: false, 113 | status: status, 114 | } 115 | ) 116 | 117 | var playLineList = new ArrayList(); 118 | var playlistNames = it.vod_play_from ? it.vod_play_from.split("$$$") : []; 119 | if(playlistNames.length < 2){ 120 | playlistNames = ["播放列表"]; 121 | } 122 | 123 | it.vod_play_url 124 | .split("$$$") 125 | .forEach(function(list, ind) { 126 | if (ind >= playlistNames.length) { 127 | return 128 | } 129 | 130 | var playLine = new PlayLine('p'+ind, playlistNames[ind], new ArrayList()); 131 | list.split("#").forEach(function(part, order) { 132 | var names = part.split('$'); 133 | playLine.episode.add(new Episode(names[1], names[0], order)); 134 | }); 135 | 136 | playLineList.add(playLine); 137 | }); 138 | 139 | return new Pair(cartoon, playLineList); 140 | } 141 | return new Pair(null, null); 142 | } 143 | 144 | // Hook SearchComponent ======================================== 145 | function SearchComponent_search(page, keyword) { 146 | var path = "?ac=detail&sort_direction=desc&wd="+keyword; 147 | if(page > 0){ 148 | path += "&pg=" + page 149 | } 150 | 151 | var nextPage = null; 152 | var res = new ArrayList(); 153 | var resp = MainUtil.getContent(path); 154 | 155 | if(resp.list){ 156 | resp.list.forEach(function(it) { 157 | res.add(makeCartoonCover({ 158 | id: it.vod_id, 159 | url: it.vod_id, 160 | title: it.vod_name, 161 | cover: it.vod_pic, 162 | intro: Jsoup.parse(it.vod_remarks).text() 163 | })); 164 | }); 165 | 166 | var curPage = resp.page ? resp.page: 0 167 | var pageCount = resp.pagecount ? resp.pagecount: 0 168 | if (curPage < pageCount){ 169 | nextPage = new Packages.java.lang.Integer(parseInt(curPage) + 1); 170 | } 171 | } 172 | 173 | return new Pair(nextPage, res); 174 | } 175 | 176 | // Hook PlayComponent ======================================== 177 | function PlayComponent_getPlayInfo(summary, playLine, episode) { 178 | var uri = new String(episode.id); 179 | 180 | var type = PlayerInfo.DECODE_TYPE_HLS; 181 | if (uri.indexOf(".mp4") > 0) { 182 | type = PlayerInfo.DECODE_TYPE_OTHER; 183 | }else{ 184 | uri = MainUtil.removeAd(uri); 185 | } 186 | 187 | return new PlayerInfo(type, uri); 188 | } 189 | 190 | 191 | // main 192 | function MainClass(){ 193 | this._baseUrl = "https://cjhwba.com/api.php/provide/vod/?ac=list"; 194 | this._adUrl = ""; 195 | this._adUa = "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Mobile Safari/537.36"; 196 | this.cates = null; 197 | } 198 | 199 | MainClass.prototype.getBaseUrl = function() { 200 | var baseUrl = new String(preferenceHelper.get("BaseUrl", this._baseUrl)); 201 | var index = baseUrl.indexOf('?'); 202 | if(index > 0){ 203 | baseUrl = baseUrl.substring(0, index); 204 | } 205 | var lastChr = baseUrl.substring(baseUrl.length - 1, baseUrl.length); 206 | if(lastChr != '/'){ 207 | baseUrl += '/'; 208 | } 209 | return baseUrl; 210 | }; 211 | 212 | MainClass.prototype.removeAd = function(url) { 213 | var adUrl = new String(preferenceHelper.get("AdUrl", this._adUrl)); 214 | if(adUrl){ 215 | if(adUrl.indexOf('?url=') > 0){ 216 | var resp = this.getContent(adUrl+url, this._adUa); 217 | if(resp && resp.url){ 218 | url = resp.url; 219 | } 220 | } 221 | } 222 | return url; 223 | }; 224 | MainClass.prototype.getAllCategories = function() { 225 | if(this.cates) return this.cates; 226 | 227 | var _cates = new String(preferenceHelper.get("AllCates", "")); 228 | if(_cates == "" || _cates.substring(0, 1) != '['){ 229 | var resp = this.getContent("?ac=list"); 230 | if(resp){ 231 | if(resp.class){ 232 | var _t = this; 233 | _t.cates = []; 234 | 235 | var _tcates = {} 236 | resp.class.forEach(function(e) { 237 | if(e.type_pid == 0){ 238 | if(!_tcates[e.type_id]){ 239 | _tcates[e.type_id] = { 240 | id: e.type_id, 241 | name: e.type_name, 242 | subs: [] 243 | } 244 | _t.cates.push(_tcates[e.type_id]); 245 | }else{ 246 | _tcates[e.type_id].name = e.type_name; 247 | } 248 | }else{ 249 | if(!_tcates[e.type_pid]){ 250 | _tcates[e.type_pid] = { 251 | id: e.type_pid, 252 | name: '', 253 | subs: [] 254 | } 255 | _t.cates.push(_tcates[e.type_pid]); 256 | } 257 | _tcates[e.type_pid].subs.push({ 258 | id: e.type_id, 259 | name: e.type_name, 260 | }); 261 | } 262 | }); 263 | 264 | preferenceHelper.put("AllCates", JSON.stringify(_t.cates)); 265 | return _t.cates; 266 | } 267 | } 268 | 269 | return [] 270 | } 271 | 272 | this.cates = JSON.parse(_cates); 273 | return this.cates; 274 | } 275 | MainClass.prototype.getMainTabs = function() { 276 | var arr = []; 277 | 278 | var cates = this.getAllCategories(); 279 | if(cates){ 280 | cates.forEach(function(c, k){ 281 | arr.push({ 282 | id: k + 1, 283 | name: c.name, 284 | }); 285 | }); 286 | } 287 | 288 | return arr; 289 | } 290 | MainClass.prototype.getMainTab = function(ind) { 291 | ind = parseInt(ind); 292 | 293 | if(ind > 0){ 294 | var cates = this.getAllCategories(); 295 | if(cates && ind <= cates.length){ 296 | return cates[ind - 1]; 297 | } 298 | } 299 | 300 | return null; 301 | } 302 | 303 | MainClass.prototype.getContent = function(path, ua) { 304 | var url = (path.substring(0, 4) == 'http' ? path : this.getBaseUrl() + path); 305 | if(!ua){ 306 | ua = networkHelper.randomUA; 307 | } 308 | 309 | var ret = new String(Jsoup.connect(url).userAgent(ua).ignoreContentType(true).execute().body()); 310 | 311 | if(ret.substring(0, 1) == '{'){ 312 | return JSON.parse(ret); 313 | } 314 | 315 | return null; 316 | }; 317 | 318 | var MainUtil = new MainClass(); 319 | -------------------------------------------------------------------------------- /cms/cms.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/refgd/easybangumi-ext/46f8f355593d70b69dbd73a5d33c07c9829909f2/cms/cms.png -------------------------------------------------------------------------------- /cyc/cyc.ebg.jsc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/refgd/easybangumi-ext/46f8f355593d70b69dbd73a5d33c07c9829909f2/cyc/cyc.ebg.jsc -------------------------------------------------------------------------------- /cyc/cyc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/refgd/easybangumi-ext/46f8f355593d70b69dbd73a5d33c07c9829909f2/cyc/cyc.png -------------------------------------------------------------------------------- /eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import globals from "globals"; 2 | import pluginJs from "@eslint/js"; 3 | 4 | 5 | /** @type {import('eslint').Linter.Config[]} */ 6 | export default [ 7 | { 8 | files: ["**/*.js"], 9 | languageOptions: { 10 | sourceType: "commonjs" 11 | }, 12 | }, 13 | { 14 | languageOptions: { 15 | globals: { 16 | ...globals.browser, 17 | Packages: 'readonly', 18 | Cartoon: 'readonly', 19 | Inject_NetworkHelper: 'readonly', 20 | Inject_PreferenceHelper: 'readonly', 21 | Inject_WebViewHelperV2: 'readonly', 22 | Inject_WebViewHelper: 'readonly', 23 | Inject_OkhttpHelper: 'readonly', 24 | JSSourceUtils: 'readonly', 25 | WebViewHelperV2: 'readonly', 26 | ParserException: 'readonly', 27 | ArrayList: 'readonly', 28 | JSLogUtils: 'readonly', 29 | SourcePreference: 'readonly', 30 | MainTab: 'readonly', 31 | SubTab: 'readonly', 32 | Pair: 'readonly', 33 | PlayerInfo: 'readonly', 34 | Jsoup: 'readonly', 35 | makeCartoonCover: 'readonly', 36 | makeCartoon: 'readonly', 37 | makeTextDanmaku: 'readonly', 38 | PlayLine: 'readonly', 39 | Episode: 'readonly', 40 | Base64: 'readonly', 41 | HashSet: 'readonly', 42 | Thread: 'readonly', 43 | Log: 'readonly', 44 | HashMap: 'readonly', 45 | } 46 | } 47 | }, 48 | pluginJs.configs.recommended, 49 | ]; -------------------------------------------------------------------------------- /extension_repo.jsonl: -------------------------------------------------------------------------------- 1 | {"key":"refgd.hmr","url":"https://raw.githubusercontent.com/refgd/easybangumi-ext/refs/heads/main/heimuer/heimuer.ebg.jsc"} 2 | {"key":"refgd.olevod","url":"https://raw.githubusercontent.com/refgd/easybangumi-ext/refs/heads/main/olevod/olevod.ebg.jsc"} 3 | {"key":"refgd.yfsp","url":"https://raw.githubusercontent.com/refgd/easybangumi-ext/refs/heads/main/yfsp/yfsp.ebg.jsc"} 4 | {"key":"refgd.gugu","url":"https://raw.githubusercontent.com/refgd/easybangumi-ext/refs/heads/main/gugu/gugu.ebg.jsc"} 5 | {"key":"refgd.mwcy","url":"https://raw.githubusercontent.com/refgd/easybangumi-ext/refs/heads/main/mwcy/mwcy.ebg.jsc"} 6 | {"key":"refgd.xgct","url":"https://raw.githubusercontent.com/refgd/easybangumi-ext/refs/heads/main/xgkt/xgkt.ebg.jsc"} 7 | {"key":"refgd.cyc","url":"https://raw.githubusercontent.com/refgd/easybangumi-ext/refs/heads/main/cyc/cyc.ebg.jsc"} 8 | {"key":"refgd.nya","url":"https://raw.githubusercontent.com/refgd/easybangumi-ext/refs/heads/main/nya/nya.ebg.jsc"} -------------------------------------------------------------------------------- /gugu/gugu.ebg.jsc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/refgd/easybangumi-ext/46f8f355593d70b69dbd73a5d33c07c9829909f2/gugu/gugu.ebg.jsc -------------------------------------------------------------------------------- /gugu/gugu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/refgd/easybangumi-ext/46f8f355593d70b69dbd73a5d33c07c9829909f2/gugu/gugu.png -------------------------------------------------------------------------------- /heimuer/heimuer.ebg.jsc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/refgd/easybangumi-ext/46f8f355593d70b69dbd73a5d33c07c9829909f2/heimuer/heimuer.ebg.jsc -------------------------------------------------------------------------------- /heimuer/heimuer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/refgd/easybangumi-ext/46f8f355593d70b69dbd73a5d33c07c9829909f2/heimuer/heimuer.png -------------------------------------------------------------------------------- /mwcy/mwcy.ebg.jsc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/refgd/easybangumi-ext/46f8f355593d70b69dbd73a5d33c07c9829909f2/mwcy/mwcy.ebg.jsc -------------------------------------------------------------------------------- /mwcy/mwcy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/refgd/easybangumi-ext/46f8f355593d70b69dbd73a5d33c07c9829909f2/mwcy/mwcy.png -------------------------------------------------------------------------------- /nya/nya.ebg.jsc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/refgd/easybangumi-ext/46f8f355593d70b69dbd73a5d33c07c9829909f2/nya/nya.ebg.jsc -------------------------------------------------------------------------------- /nya/nya.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/refgd/easybangumi-ext/46f8f355593d70b69dbd73a5d33c07c9829909f2/nya/nya.png -------------------------------------------------------------------------------- /olevod/olevod.ebg.jsc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/refgd/easybangumi-ext/46f8f355593d70b69dbd73a5d33c07c9829909f2/olevod/olevod.ebg.jsc -------------------------------------------------------------------------------- /olevod/olevod.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/refgd/easybangumi-ext/46f8f355593d70b69dbd73a5d33c07c9829909f2/olevod/olevod.png -------------------------------------------------------------------------------- /uvod/uvod.ebg.jsc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/refgd/easybangumi-ext/46f8f355593d70b69dbd73a5d33c07c9829909f2/uvod/uvod.ebg.jsc -------------------------------------------------------------------------------- /uvod/uvod.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/refgd/easybangumi-ext/46f8f355593d70b69dbd73a5d33c07c9829909f2/uvod/uvod.png -------------------------------------------------------------------------------- /xgkt/xgkt.ebg.jsc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/refgd/easybangumi-ext/46f8f355593d70b69dbd73a5d33c07c9829909f2/xgkt/xgkt.ebg.jsc -------------------------------------------------------------------------------- /xgkt/xgkt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/refgd/easybangumi-ext/46f8f355593d70b69dbd73a5d33c07c9829909f2/xgkt/xgkt.png -------------------------------------------------------------------------------- /yfsp/yfsp.ebg.jsc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/refgd/easybangumi-ext/46f8f355593d70b69dbd73a5d33c07c9829909f2/yfsp/yfsp.ebg.jsc -------------------------------------------------------------------------------- /yfsp/yfsp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/refgd/easybangumi-ext/46f8f355593d70b69dbd73a5d33c07c9829909f2/yfsp/yfsp.png --------------------------------------------------------------------------------