Cleanup
Remove unused variables.
This commit is contained in:
parent
3d3a276dd5
commit
d1ed7befbc
@ -2,18 +2,7 @@ let backgroundPage = browser.extension.getBackgroundPage();
|
||||
|
||||
var data;
|
||||
let i=0;
|
||||
/*
|
||||
data = readUrl()
|
||||
.then(function(data){
|
||||
browser.browserAction.onClicked.addListener(function(event1){
|
||||
browser.tabs.create({"url": "home.html"},function(tab){
|
||||
browser.runtime.onMessage.addListener(function(request,sender,sendResponse){
|
||||
handleMessages(request,sender,sendResponse,tab,data);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
*/
|
||||
|
||||
browser.browserAction.onClicked.addListener(function(event1){
|
||||
browser.tabs.create({"url": "home.html"},function(tab){
|
||||
browser.runtime.onMessage.addListener(function(request,sender,sendResponse){
|
||||
@ -22,7 +11,6 @@ data = readUrl()
|
||||
});
|
||||
});
|
||||
function handleMessages(message,sender,sendResponse,tab){
|
||||
|
||||
if(message === "Button_clicked")
|
||||
{
|
||||
browser.tabs.executeScript(tab.id,{
|
||||
@ -34,7 +22,6 @@ function handleMessages(message,sender,sendResponse,tab){
|
||||
else if(message === "Content_Loaded")
|
||||
{
|
||||
console.log("Background: Received Content_Loaded");
|
||||
// nextUrl(data,tab,i);
|
||||
if(i===0)
|
||||
{
|
||||
browser.tabs.sendMessage(tab.id,"Init");
|
||||
@ -73,7 +60,7 @@ function handleMessages(message,sender,sendResponse,tab){
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//----depreacted -vv
|
||||
function readUrl()
|
||||
{
|
||||
let data;
|
||||
@ -88,7 +75,7 @@ function readUrl()
|
||||
return res.json();
|
||||
})
|
||||
.then((data) => {
|
||||
for(let i=0;i<i;i++) //i in data.subscriptions)
|
||||
for(let i=0;i<i;i++) //wtf why does this work?
|
||||
{
|
||||
let open=null;
|
||||
console.log(data.subscriptions[i].url);
|
||||
|
Loading…
Reference in New Issue
Block a user