Fix XML formatting (#2287)

Fix XML formatting
This commit is contained in:
Sami Vänttinen 2024-07-26 07:53:53 +03:00 committed by GitHub
parent a7661f8cd3
commit 97b60dcc70
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 17 additions and 1 deletions

View file

@ -38,6 +38,10 @@
"matches": [
"<all_urls>"
],
"exclude_matches": [
"*://*/*.xml*",
"file:///*.xml*"
],
"js": [
"common/browser-polyfill.min.js",
"common/global.js",

View file

@ -51,6 +51,10 @@
"matches": [
"<all_urls>"
],
"exclude_matches": [
"*://*/*.xml*",
"file:///*.xml*"
],
"js": [
"common/browser-polyfill.min.js",
"common/global.js",

View file

@ -845,7 +845,7 @@ kpxc.updateTOTPList = async function() {
// Apply a script to the page for intercepting Passkeys (WebAuthn) requests
kpxc.enablePasskeys = function() {
if (document?.documentElement?.ownerDocument?.contentType === 'text/xml') {
if (document?.documentElement?.ownerDocument?.contentType !== 'text/html') {
return;
}
@ -925,6 +925,10 @@ kpxc.enablePasskeys = function() {
*/
const initContentScript = async function() {
try {
if (document?.documentElement?.ownerDocument?.contentType !== 'text/html') {
return;
}
const settings = await sendMessage('load_settings');
if (!settings) {
logError('Error: Cannot load extension settings');

View file

@ -52,6 +52,10 @@
"matches": [
"<all_urls>"
],
"exclude_matches": [
"*://*/*.xml*",
"file:///*.xml*"
],
"js": [
"common/browser-polyfill.min.js",
"common/global.js",