Extract contentType from safari

This fixes issues where we'd incorrectly identify a PDF as HTML.
Safari will use our preprocess javascript file even if the
file is PDF, so we rely on JS to detect the content type here.
This commit is contained in:
Jackson Harper
2022-05-24 21:01:01 -07:00
parent ad91c41f0f
commit a02bb2f5c9
2 changed files with 13 additions and 4 deletions

View File

@ -5,6 +5,7 @@ ShareExtension.prototype = {
arguments.completionFunction({
'url': window.location.href,
'title': document.title.toString(),
'contentType': document.contentType,
'documentHTML': new XMLSerializer().serializeToString(document),
});
}