Skip to content

Commit

Permalink
fix: listCource
Browse files Browse the repository at this point in the history
  • Loading branch information
SIY1121 committed Jul 9, 2020
1 parent 86832c9 commit bd6b7b0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion public/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Manaba Report Integration by Twin:te",
"version": "1.0.2",
"version": "1.0.3",
"manifest_version": 2,
"description": "Manabaのレポート提出状況を外部サービスに同期します",
"permissions": [
Expand Down
3 changes: 1 addition & 2 deletions src/content-scripts/manabaMain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ function createElementFromHTML(htmlString: string): HTMLElement {
async function listCource(): Promise<{ link: string; title: string }[]> {
const raw = await (await fetch('https://manaba.tsukuba.ac.jp/ct/home')).text()
const dom = createElementFromHTML(raw)

let list = [
...dom.querySelectorAll<HTMLLinkElement>(
'table.stdlist.courselist .courselist-title > a'
Expand All @@ -27,7 +26,7 @@ async function listCource(): Promise<{ link: string; title: string }[]> {

if (list.length === 0)
list = [
...document.querySelectorAll<HTMLLinkElement>(
...dom.querySelectorAll<HTMLLinkElement>(
'.mycourses-body .course-card-title a'
),
]
Expand Down

0 comments on commit bd6b7b0

Please sign in to comment.