markdownload
markdownload copied to clipboard
Make sure the document processed in background.js has a title element.
This addresses issue #310: which describes a download failure for a specific website, because pageTitle
is empty.
The proposed fix here makes sure that the HTML document processed in background.js
has a proper <title>
tag, so that pageTitle
can be populated.
Note: Despite a missing <title>
tag browsers manage to provide a useful window title. Hence the best place to fix this issue seems to be contentScript.js
because it is run in the context of the original HTML page
I think this PR can be adapted in the obsidian feature too.