mirror of
https://github.com/gapmiss/substack-clipper.git
synced 2026-07-22 07:48:24 +00:00
fix: add eslint-disable for prefer-create-el false positive on DOMParser document
This commit is contained in:
parent
abd4235867
commit
ce476bb678
1 changed files with 2 additions and 0 deletions
|
|
@ -17,10 +17,12 @@ function replaceVideoDivs(html: string, downloadedUrls: Set<string>): string {
|
|||
if (id.length !== 42) continue;
|
||||
const videoId = id.replace('media-', '');
|
||||
const videoUrl = `https://substack.com/api/v1/video/upload/${videoId}/src`;
|
||||
// eslint-disable-next-line obsidianmd/prefer-create-el -- DOMParser document, not Obsidian DOM
|
||||
const p = doc.createElement('p');
|
||||
if (downloadedUrls.has(videoUrl)) {
|
||||
p.textContent = `VIDEOEMBED${videoId}ENDVIDEO`;
|
||||
} else {
|
||||
// eslint-disable-next-line obsidianmd/prefer-create-el -- DOMParser document, not Obsidian DOM
|
||||
const a = doc.createElement('a');
|
||||
a.href = videoUrl;
|
||||
a.textContent = 'Video';
|
||||
|
|
|
|||
Loading…
Reference in a new issue