Skip to content

Commit

Permalink
推荐增加更多按钮跳转至 vDaily
Browse files Browse the repository at this point in the history
  • Loading branch information
T authored and T committed Mar 23, 2023
1 parent f985015 commit e6e17bd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
4 changes: 4 additions & 0 deletions inject/topicList/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,8 @@

#my-recent-topics {
display: none;
}

.vdaily {
float: right;
}
9 changes: 9 additions & 0 deletions inject/topicList/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,15 @@ chrome.storage.sync.get("options", async (data) => {
topicTitle.innerText = 'vDaily 推荐主题'
topicBox.append(topicTitle)


let more = document.createElement('a')
more.innerText = '更多'
more.classList.add('vdaily')
more.target = '_blank'
more.href = 'https://vdaily.huguotao.com'
replyTitle.append(more)
topicTitle.append(more.cloneNode(1))

let topicList = await fetch('https://vdaily.huguotao.com/api/topic/recommend')
topicList = await topicList.json()
topicList.map(i => {
Expand Down

0 comments on commit e6e17bd

Please sign in to comment.