Skip to content

Commit c9733b9

Browse files
committed
Fix small error
1 parent 6d29993 commit c9733b9

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

Chrome/utils/inject.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -805,6 +805,12 @@ class ScriptInjector {
805805
}
806806

807807
async injectInWorld(tabId, config, world) {
808+
// Prevent injection into chrome:// URLs
809+
if (config.url && config.url.startsWith('chrome://')) {
810+
console.log('CodeTweak: Skipping injection into chrome:// URL:', config.url);
811+
return false;
812+
}
813+
808814
// Ensure core GM classes are available in the target execution world first
809815
await chrome.scripting.executeScript({
810816
target: { tabId },

0 commit comments

Comments
 (0)