MCPcopy Index your code
hub / github.com/XIU2/UserScript / mangabz_insertE

Function mangabz_insertE

Autopage.user.js:1497–1518  ·  view source on GitHub ↗
(pageE, type)

Source from the content-addressed store, hash-verified

1495 }
1496 // [Mangabz 漫画] 插入数据
1497 function mangabz_insertE(pageE, type) {
1498 if (pageE) {
1499 if (type === 'Next') { // 下一页
1500 let imgArr = eval(pageE),
1501 _img = '';
1502 for (let now of imgArr) {_img += `<img src="${now}">`;}
1503 if (_img) {
1504 getOne(curSite.pager.insertP[0]).insertAdjacentHTML(getAddTo(curSite.pager.insertP[1]), _img); // 将 img 标签插入到网页中
1505 MANGABZ_PAGE += imgArr.length;
1506 addHistory(pageE, document.title, location.origin + MANGABZ_CURL.substring(0, MANGABZ_CURL.length - 1) + '-p' + MANGABZ_PAGE + '/');
1507 }
1508 } else { // 下一话
1509 // 插入 <script> 标签
1510 insScript('html:not([dir]) > head > script:not([src])', pageE);
1511 addHistory(pageE);
1512 pageNumIncrement()
1513 replaceElems(pageE)
1514 MANGABZ_PAGE = 0;
1515 mangabz_nextL();
1516 }
1517 }
1518 }
1519
1520
1521 // [动漫屋] 获取下一页地址

Callers

nothing calls this directly

Calls 7

getOneFunction · 0.85
getAddToFunction · 0.85
addHistoryFunction · 0.85
insScriptFunction · 0.85
pageNumIncrementFunction · 0.85
replaceElemsFunction · 0.85
mangabz_nextLFunction · 0.85

Tested by

no test coverage detected