Skip to content

Commit 5d9be40

Browse files
author
lucifer
committed
chore: 自动伞寻址
1 parent 130363c commit 5d9be40

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

‎src/contentScript.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ function insertButton() {
135135
const d = document.querySelector(`[data-cypress="QuestionTitle"]`)
136136
.innerHTML;
137137
const title = d.match(/(\d+\. .+)(?=<)/)[1];
138-
const link = "https://leetcode-cn.com" + d.match(/href="(.*?)"/)[1];
138+
const link = window.location.origin + d.match(/href="(.*?)"/)[1];
139139
const language = document.querySelector("#lang-select").innerText;
140140
// let code = document.querySelector(
141141
// ".monaco-scrollable-element,.editor-scrollable"

‎src/solutionTemplate/index.jsx

+1
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ export default function SolutionTemplate() {
206206
传参限制,题目信息和代码暂时不会自动带过来,后续考虑使用服务器转存实现自动带入的功能。
207207
</li>
208208
<li>目前公式无法预览,原因暂时不明,不过后期会支持。</li>
209+
<li>后续考虑提供更多题解模板。</li>
209210
<li>后续考虑支持更多主题,以及用户自定义主题。</li>
210211
</ul>
211212
<div className="line">

0 commit comments

Comments
 (0)