Activity Recorder
unread,Nov 28, 2022, 6:07:31 AM11/28/22Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Chromium Extensions, rguil...@meditech.com, Chromium Extensions, Activity Recorder
Adding the following line to manifest.json didn't helped in resolving the issue.
"content_security_policy": {
"extension_pages": "default-src 'self' 'wasm-unsafe-eval'"
}
Extension will be activated by clicking on the extension icon. The line is:
chrome.action.onClicked.addListener(onActionClicked);
onActionClicked() will call the method onActionClick()
chrome.storage.local.get({
debugWinKey: false
}, function (items) {
var debugWinKey = items.debugWinKey;
if (null != debugWinKey) {
debugWin = debugWinKey;
}
onActionClick();
});
onActionClick() has the code
if (debugWin && !isDebugWinAlreadyLauched) {
isDebugWinAlreadyLauched = true;
tabStartRecordingDebugWin(tab);
} else {
chrome.scripting.executeScript({
target: {tabId:
tab.id},
files: ['script.js']
});
/*document.write('<script src="cookieManagement.js"></script>');
document.write('<script src="events.js"></script>');
document.write('<script src="contentScript.js"></script>');
document.write('<script src="jszip.min.js" type="text/javascript"></script>');
document.write('<script src="filesaver.min.js"></script>');*/
resetForNewRecording();
tabStartRecording(tab);
}
Commented(/* */) code is being used earlier and moved to 'script.js' to load the files.
Snap of manifest.json:

On investigating deeply found that these files are getting added to background script itself in MV2 based on a condition. The idea is to achieve the same using service workers.