| 1843 | }); |
| 1844 | } |
| 1845 | function addItem(item) { |
| 1846 | let has=false; |
| 1847 | for(var j=0;j<processEles.length;j++){ |
| 1848 | if(processEles[j].href==item.href){ |
| 1849 | processEles.splice(j,1); |
| 1850 | processEles.push(item); |
| 1851 | has=true; |
| 1852 | break; |
| 1853 | } |
| 1854 | } |
| 1855 | if((!item.href || item.href.indexOf("javascript")!=-1) && item.dataset.href){ |
| 1856 | item.href=item.dataset.href; |
| 1857 | } |
| 1858 | if(!has && item.href && /^http/i.test(item.href)){ |
| 1859 | processEles.push(item.cloneNode(1)); |
| 1860 | } |
| 1861 | } |
| 1862 | [].forEach.call(eles,function(item){ |
| 1863 | if(urlSel[1]){ |
| 1864 | item=Function("item",urlSel[1])(item); |