Skip to content

Commit 42edac1

Browse files
author
lucifer
committed
fix: eslint
1 parent e8e014c commit 42edac1

File tree

2 files changed

+12406
-11183
lines changed

2 files changed

+12406
-11183
lines changed

‎src/contentScript.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -134,12 +134,13 @@ function insertButton() {
134134
// d: "<a href="/problems/remove-max-number-of-edges-to-keep-graph-fully-traversable/">1579. 保证图可完全遍历</a>"
135135
const d = document.querySelector(`[data-cypress="QuestionTitle"]`)
136136
.innerHTML;
137-
const title = d.match(/(\d+\. .+)(?=\<)/)[1];
138-
const link = d.match(/href="(.*?)"/)[1];
137+
const title = d.match(/(\d+\. .+)(?=<)/)[1];
138+
const link = "https://leetcode-cn.com" + d.match(/href="(.*?)"/)[1];
139139
window.open(
140140
`https://leetcode-pp.github.io/leetcode-cheat/?link=${link}&title=${title}`
141141
);
142142
};
143+
console.log(writeSolutionButton);
143144
buttons[i].parentElement.prepend(writeSolutionButton);
144145
return true;
145146
}

0 commit comments

Comments
 (0)