Removed alarm code
This commit is contained in:
parent
94f761ede5
commit
3c97dd814c
2 changed files with 1 additions and 16 deletions
|
|
@ -3,7 +3,7 @@
|
|||
"name": "Vytal",
|
||||
"version": "2.0.0",
|
||||
"description": "Spoof your location data and user agent.",
|
||||
"permissions": ["storage", "debugger", "activeTab", "alarms"],
|
||||
"permissions": ["storage", "debugger", "activeTab"],
|
||||
"background": { "service_worker": "background.bundle.js" },
|
||||
"action": {
|
||||
"default_popup": "popup.html",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import attachDebugger from '../../utils/attachDebugger'
|
||||
import userAgents from '../../utils/userAgents'
|
||||
|
||||
const attachTab = (tabId) => {
|
||||
chrome.debugger.getTargets((tabs) => {
|
||||
|
|
@ -21,17 +20,3 @@ chrome.tabs.onActivated.addListener((tab) => {
|
|||
chrome.tabs.onUpdated.addListener((tabId) => {
|
||||
attachTab(tabId)
|
||||
})
|
||||
|
||||
chrome.alarms.onAlarm.addListener((alarm) => {
|
||||
if (alarm.name === 'userAgentAlarm') {
|
||||
chrome.storage.sync.get(['randomUA'], (result) => {
|
||||
if (result.randomUA) {
|
||||
const randomUserAgent =
|
||||
userAgents[Math.floor(Math.random() * userAgents.length)]
|
||||
chrome.storage.sync.set({
|
||||
userAgent: randomUserAgent,
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue