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

Function dm5_insertE

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

Source from the content-addressed store, hash-verified

1534 }
1535 // [动漫屋] 插入数据
1536 function dm5_insertE(pageE, type) {
1537 if (pageE) {
1538 if (type === 'Next') { // 下一页
1539 let imgArr = eval(pageE),
1540 _img = '';
1541 for (let now of imgArr) {_img += `<img src="${now}">`;}
1542 if (_img) {
1543 getOne(curSite.pager.insertP[0]).insertAdjacentHTML(getAddTo(curSite.pager.insertP[1]), _img); // 将 img 标签插入到网页中
1544 DM5_PAGE += imgArr.length;
1545 addHistory(pageE, document.title, location.origin + DM5_CURL.substring(0, DM5_CURL.length - 1) + '-p' + DM5_PAGE + '/');
1546 }
1547 } else { // 下一话
1548 // 插入 <script> 标签
1549 insScript('html:not([dir])>head>script:not([src])', pageE);
1550 addHistory(pageE);
1551 pageNumIncrement()
1552 replaceElems(pageE)
1553 DM5_PAGE = 0;
1554 dm5_nextL();
1555 }
1556 }
1557 }
1558
1559
1560 // [Xmanhua 漫画] 获取下一页地址

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
dm5_nextLFunction · 0.85

Tested by

no test coverage detected