fix: restore working injector.js + add missing get:decrypted-config handler
Restored injector.js from v2.0.14 (commit 9a11896) which:
- Requests decrypted config from background via get:decrypted-config
message instead of passing empty arrays when data is encrypted
- Handles the identity.profiles merge correctly for background responses
- Passes ss_settings directly (not checking _ssLocalEncrypted which
caused settings loss)
Added missing get:decrypted-config message handler to service-worker.js
which returns decrypted mappings, identity, and settings via Storage
module.
https://claude.ai/code/session_01KF4i7Ra7zCEDskxDBaNtcT
This commit is contained in:
@@ -163,6 +163,17 @@ api.runtime.onMessage.addListener((message, sender, sendResponse) => {
|
||||
});
|
||||
|
||||
const messageHandlers = {
|
||||
async 'get:decrypted-config'(_message, _sender, sendResponse) {
|
||||
try {
|
||||
const mappings = await Storage.getMappings();
|
||||
const identity = await Storage.getIdentity();
|
||||
const settings = await Storage.getSettings();
|
||||
sendResponse({ mappings, identity, settings });
|
||||
} catch {
|
||||
sendResponse(null);
|
||||
}
|
||||
},
|
||||
|
||||
async 'substitution:performed'(message, sender) {
|
||||
const tabId = sender.tab?.id;
|
||||
if (tabId == null) return;
|
||||
|
||||
Reference in New Issue
Block a user