|
@@ -73,31 +73,37 @@ chrome.action.onClicked.addListener(function (tab) {
|
|
chrome.tabs.onActivated.addListener(function (activeInfo) {
|
|
chrome.tabs.onActivated.addListener(function (activeInfo) {
|
|
setPopupConfig(activeInfo);
|
|
setPopupConfig(activeInfo);
|
|
})
|
|
})
|
|
-
|
|
|
|
function onInstalledMethod() {
|
|
function onInstalledMethod() {
|
|
- onInstalledCreateTab()
|
|
+ try {
|
|
- onInstalledMid()
|
|
+ onInstalledCreateTab()
|
|
- onInstalledUserSet()
|
|
+ onInstalledMid()
|
|
-
|
|
+ onInstalledUserSet()
|
|
-
|
|
+
|
|
- chrome.alarms.create('PingPong', {
|
|
+ chrome.alarms.create('PingPong', {
|
|
-
|
|
+
|
|
- delayInMinutes: 2,
|
|
+ delayInMinutes: 2,
|
|
-
|
|
+
|
|
- periodInMinutes: 4
|
|
+ periodInMinutes: 4
|
|
- });
|
|
+ });
|
|
- chrome.alarms.create('LuckMessage', {
|
|
+ chrome.alarms.create('LuckMessage', {
|
|
-
|
|
+
|
|
- delayInMinutes: 1,
|
|
+ delayInMinutes: 1,
|
|
-
|
|
+
|
|
- periodInMinutes: 1
|
|
+ periodInMinutes: 1
|
|
- });
|
|
+ });
|
|
- setTimeout(() => {
|
|
+ setTimeout(() => {
|
|
-
|
|
+
|
|
|
|
+ Report.reportLog({
|
|
|
|
+ objectType: Report.objectType.chrome_extension_installed
|
|
|
|
+ });
|
|
|
|
+ }, 5000);
|
|
|
|
+ } catch (error) {
|
|
|
|
+
|
|
Report.reportLog({
|
|
Report.reportLog({
|
|
- objectType: Report.objectType.chrome_extension_installed
|
|
+ objectType: Report.objectType.background_installed_catch_error,
|
|
|
|
+ errMsg: error.message
|
|
});
|
|
});
|
|
- }, 5000);
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
function onMessageMethod(req, sender, sendResponse) {
|
|
function onMessageMethod(req, sender, sendResponse) {
|