From 6ad9c25cb226207ab4ffb8ce264baebdcaf15d3a Mon Sep 17 00:00:00 2001 From: Kevin Payravi Date: Fri, 23 Feb 2024 02:27:53 -0500 Subject: [PATCH] Fix for custom BreezeWiki host script registration Need to use absolute paths, and run at document_idle to capture elements that are injected after initial page load --- pages/settings/settings.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/settings/settings.js b/pages/settings/settings.js index 10f21d1..7e29542 100644 --- a/pages/settings/settings.js +++ b/pages/settings/settings.js @@ -572,8 +572,8 @@ document.addEventListener('DOMContentLoaded', () => { chrome.scripting.registerContentScripts([{ id: 'content-banners', matches: [breezewikiCustomDomain + '/*'], - js: ['scripts/content-banners.js'], - runAt: "document_start" + js: ['/scripts/common-functions.js', '/scripts/content-banners.js', '/scripts/content-breezewiki.js'], + runAt: "document_idle" }]); chrome.storage.sync.set({ 'breezewikiCustomHost': breezewikiCustomDomain }); document.getElementById('breezewikiCustomHostStatus').innerText = 'Successfully added';