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.
15 lines
418 B
JavaScript
15 lines
418 B
JavaScript
var ShareExtension = function() {};
|
|
|
|
ShareExtension.prototype = {
|
|
run: function(arguments) {
|
|
arguments.completionFunction({
|
|
'url': window.location.href,
|
|
'title': document.title.toString(),
|
|
'contentType': document.contentType,
|
|
'documentHTML': new XMLSerializer().serializeToString(document),
|
|
});
|
|
}
|
|
};
|
|
|
|
var ExtensionPreprocessingJS = new ShareExtension();
|