提交修改
This commit is contained in:
parent
d160e6d94d
commit
1ec7ab7d65
|
@ -12,36 +12,36 @@ const manifest = browser.runtime.getManifest();
|
|||
// Open new tab on uninstall extension to get survey
|
||||
browser.runtime.setUninstallURL(uninstallURL, () => { })
|
||||
|
||||
// Open new tab on installation to show demo about Ruto
|
||||
const installedListener = (details) => {
|
||||
if (details.reason == 'install') {
|
||||
installNotification();
|
||||
browser.tabs.create({
|
||||
url: installURL
|
||||
})
|
||||
} else if (details.reason == 'update') {
|
||||
updateNotification();
|
||||
browser.notifications.onClicked.addListener(onClickNoti);
|
||||
}
|
||||
}
|
||||
function onClickNoti() { browser.tabs.create({ url: updateURL }) }
|
||||
const updateNotification = () => {
|
||||
browser.notifications.create({
|
||||
title: `Ruto`,
|
||||
message: `Click here to see the changelog of version ${manifest.version}`,
|
||||
type: 'basic',
|
||||
iconUrl: 'logo/128.png'
|
||||
});
|
||||
}
|
||||
const installNotification = () => {
|
||||
browser.notifications.create('onInstalled', {
|
||||
title: `Ruto`,
|
||||
message: `Please restart your browser to use Ruto`,
|
||||
type: 'basic',
|
||||
iconUrl: 'logo/128.png'
|
||||
});
|
||||
}
|
||||
browser.runtime.onInstalled.addListener(installedListener);
|
||||
// // Open new tab on installation to show demo about Ruto
|
||||
// const installedListener = (details) => {
|
||||
// if (details.reason == 'install') {
|
||||
// installNotification();
|
||||
// browser.tabs.create({
|
||||
// url: installURL
|
||||
// })
|
||||
// } else if (details.reason == 'update') {
|
||||
// updateNotification();
|
||||
// browser.notifications.onClicked.addListener(onClickNoti);
|
||||
// }
|
||||
// }
|
||||
// function onClickNoti() { browser.tabs.create({ url: updateURL }) }
|
||||
// const updateNotification = () => {
|
||||
// browser.notifications.create({
|
||||
// title: `Ruto`,
|
||||
// message: `Click here to see the changelog of version ${manifest.version}`,
|
||||
// type: 'basic',
|
||||
// iconUrl: 'logo/128.png'
|
||||
// });
|
||||
// }
|
||||
// const installNotification = () => {
|
||||
// browser.notifications.create('onInstalled', {
|
||||
// title: `Ruto`,
|
||||
// message: `Please restart your browser to use Ruto`,
|
||||
// type: 'basic',
|
||||
// iconUrl: 'logo/128.png'
|
||||
// });
|
||||
// }
|
||||
// browser.runtime.onInstalled.addListener(installedListener);
|
||||
//- Required
|
||||
|
||||
// To toggle SRC and TGT context menu option
|
||||
|
|
|
@ -3,12 +3,12 @@ function stopRecord() {
|
|||
document.removeEventListener("mouseover", mouseOver, true);
|
||||
document.removeEventListener("mouseout", mouseOut, true);
|
||||
let values = {
|
||||
xpath: recordArray,
|
||||
xpath: recordArray || [],
|
||||
xpathPOM: recordArrayPOM,
|
||||
title: document.title,
|
||||
URL: document.URL
|
||||
}
|
||||
if (recordArray.length > 0)
|
||||
if (values.xpath && values.xpath.length > 0)
|
||||
browser.storage.local.set({ 'downloadData': values });
|
||||
// browser.runtime.sendMessage({ from: 'download', values });
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue