Last active
November 4, 2020 10:17
-
-
Save lilywang711/fc06b13712e932b483bda86eb093d55b to your computer and use it in GitHub Desktop.
生成 NEI 上所有已选择接口的交付格式
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function queryAllSelectedAPI() { | |
const selectedList = document.querySelectorAll('.list-bd .list-group-wrap .list-row.js-selected'); | |
return Array.from({ length: selectedList.length }).map((_, index) => { | |
const node = selectedList[index] | |
const title = node.querySelector('div.list-col.col-name > a').innerText | |
const link = node.querySelector('div.list-col.col-name > a').getAttribute('href') | |
const name = node.querySelector('div.list-col.col-creator-realname').innerText | |
return `${index+1}、 ${title}(${name}): ${location.origin}${link}` | |
}).join('\n') | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment