jq 磁力下載

apuyuseng發表於2024-05-14

jq 磁力下載

function get_all_magnet(elment){ 
  function copyTextToClipboard(text) {
    var copyFrom = document.createElement("textarea");
    copyFrom.textContent = text;
    document.body.appendChild(copyFrom);
    copyFrom.select();
    document.execCommand("copy");
    copyFrom.blur();
    document.body.removeChild(copyFrom);
  }
  let l=[];
  elment.map((el,index)=>{
      let link = index.value;
      if (link.indexOf('magnet:?xt=')>-1){
          l.push(link)
      }
  });
  copyTextToClipboard(l.join('\n'))
  console.log(l)
}

相關文章