(eles)
| 7315 | } |
| 7316 | |
| 7317 | openInNewTab(eles) { |
| 7318 | if (openInNewTab) { |
| 7319 | [].forEach.call(eles, ele => { |
| 7320 | if (compareNodeName(ele, ["a"]) && ele.href && !/^(mailto:|javascript:)|#/.test(ele.href)) { |
| 7321 | ele.setAttribute('target', openInNewTab == 1 ? '_blank' : '_self'); |
| 7322 | } else { |
| 7323 | [].forEach.call(ele.querySelectorAll('a[href]:not([href^="mailto:"]):not([href^="javascript:"]):not([href^="#"])'), a => { |
| 7324 | if (openInNewTab == 1) { |
| 7325 | a.setAttribute('target', '_blank'); |
| 7326 | if (a.getAttribute('onclick') == 'atarget(this)') { |
| 7327 | a.removeAttribute('onclick'); |
| 7328 | } |
| 7329 | } else a.setAttribute('target', '_self'); |
| 7330 | }); |
| 7331 | } |
| 7332 | }); |
| 7333 | } |
| 7334 | } |
| 7335 | |
| 7336 | lazyImgAction(eles, doc) { |
| 7337 | if (!eles || eles.length == 0) return; |
no test coverage detected