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

Function xmanhua_insertE

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

Source from the content-addressed store, hash-verified

1573 }
1574 // [Xmanhua 漫画] 插入数据
1575 function xmanhua_insertE(pageE, type) {
1576 if (pageE) {
1577 if (type === 'Next') { // 下一页
1578 let imgArr = eval(pageE),
1579 _img = '';
1580 for (let now of imgArr) {_img += `<img src="${now}">`;}
1581 if (_img) {
1582 getOne(curSite.pager.insertP[0]).insertAdjacentHTML(getAddTo(curSite.pager.insertP[1]), _img); // 将 img 标签插入到网页中
1583 unsafeWindow[unsafeWindow.MH_PREFIX23+'PAGE'] += imgArr.length;
1584 addHistory(pageE, document.title, location.origin + unsafeWindow[unsafeWindow.MH_PREFIX23+'CURL'].substring(0, unsafeWindow[unsafeWindow.MH_PREFIX23+'CURL'].length - 1) + '-p' + unsafeWindow[unsafeWindow.MH_PREFIX23+'PAGE'] + '/');
1585 }
1586 } else { // 下一话
1587 // 插入 <script> 标签
1588 insScript('html:not([dir]) > head > script:not([src])', pageE);
1589 addHistory(pageE);
1590 pageNumIncrement()
1591 replaceElems(pageE)
1592 unsafeWindow[unsafeWindow.MH_PREFIX23+'PAGE'] = 0;
1593 xmanhua_nextL();
1594 }
1595 }
1596 }
1597
1598
1599 // --------------------------------------------------------

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

Tested by

no test coverage detected