Skip to content

Commit 29cceb0

Browse files
authored
Ignore hash in window location (#2)
1 parent e5e0c3a commit 29cceb0

File tree

3 files changed

+82
-190
lines changed

3 files changed

+82
-190
lines changed

content_scripts/to-markdown.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ const titleElement = document.createElement('h1');
1414
newDoc.appendChild(titleElement);
1515

1616
const link = document.createElement('a');
17-
link.href = window.location.href;
18-
link.innerText = window.location.href;
17+
const href = window.location.origin + window.location.pathname
18+
link.href = href;
19+
link.innerText = href;
1920
newDoc.appendChild(link);
2021

2122
const descriptionHeader = document.createElement('h2');

0 commit comments

Comments
 (0)