I have a custom browser and I try to make it pass the headless test but it only fails with the PluginArray /MimeTypeArray prototype aren't consistent. this is the test page https://infosimples.github.io/detect-headless/.
My code is old and I need to be updated in a way that can pass the test. Here is my window.navigator.plugins:
"window.navigator.plugins":{"0":{"0":{"type":"application/x-google-chrome-pdf","suffixes":"pdf","description":"Portable Document Format","enabledPlugin":[{}]},"name":"Chrome PDF Plugin","filename":"internal-pdf-viewer","description":"Portable Document Format","length":1,"item":[""],"namedItem":[""],toString: function () {return "[object Plugin]";}},"1":{"0":{"type":"application/pdf","suffixes":"pdf","description":"","enabledPlugin":[{}]},"name":"Chrome PDF Viewer","filename":"mhjfbmdgcfjbbpaeojofohoefgiehjai","description":"","length":1,"item":[""],"namedItem":[""],toString: function () {return "[object Plugin]";}},"2":{"0":{"type":"application/x-nacl","suffixes":"","description":"Native Client Executable","enabledPlugin":[{}]},"1":{"type":"application/x-pnacl","suffixes":"","description":"Portable Native Client Executable","enabledPlugin":[{}]},"name":"Native Client","filename":"internal-nacl-plugin","description":"","length":2,"item":[""],"namedItem":[""],toString: function () {return "[object Plugin]";}},"length":3,"item":{ toString : function () { return "function item() { [native code] }";}},"namedItem":{ toString : function () { return "function namedItem() { [native code] }";}},"refresh":{ toString : function () { return "function refresh() { [native code] }";}}},
and for the MimeType:
"window.navigator.mimeTypes":{"0":{"type":"application/pdf","suffixes":"pdf","description":"","enabledPlugin":{"0":[{}],"name":"Chrome PDF Viewer","filename":"mhjfbmdgcfjbbpaeojofohoefgiehjai","description":"","length":1,"item":"","namedItem":""},toString: function () {return "[object MimeType]";}},"1":{"type":"application/x-google-chrome-pdf","suffixes":"pdf","description":"Portable Document Format","enabledPlugin":{"0":[{}],"name":"Chrome PDF Plugin","filename":"internal-pdf-viewer","description":"Portable Document Format","length":1,"item":"","namedItem":""},toString: function () {return "[object MimeType]";}},"2":{"type":"application/x-nacl","suffixes":"","description":"Native Client Executable","enabledPlugin":{"0":[{}],"1":[{}],"name":"Native Client","filename":"internal-nacl-plugin","description":"","length":2,"item":"","namedItem":""},toString: function () {return "[object MimeType]";}},"3":{"type":"application/x-pnacl","suffixes":"","description":"Portable Native Client Executable","enabledPlugin":{"0":[{}],"1":[{}],"name":"Native Client","filename":"internal-nacl-plugin","description":"","length":2,"item":"","namedItem":""},toString: function () {return "[object MimeType]";}},"length":4,"item":{ toString : function () { return "function item() { [native code] }";}},"namedItem":{ toString : function () { return "function namedItem() { [native code] }";}}},
From my research I know the current ones is something like this:
navigator.plugins:
PDF Viewer
Chrome PDF Viewer
Chromium PDF Viewer
Microsoft Edge PDF Viewer
WebKit built-in PDF
navigator.mimetypes:
application/pdf
text/pdf