mirror of
https://github.com/MatMoul/quickdial-webext.git
synced 2024-12-23 15:36:12 +00:00
Bug correction : load page is white when firefox start
This commit is contained in:
parent
e1c12b02f2
commit
2ea5d7fdc8
@ -6,10 +6,22 @@ var dial = {
|
||||
};
|
||||
|
||||
window.onload = function(){
|
||||
browser.runtime.getBackgroundPage().then(function(page){
|
||||
app = page.app;
|
||||
dial.initUI();
|
||||
}, function(){});
|
||||
function initPage(){
|
||||
browser.runtime.getBackgroundPage().then(function(page){
|
||||
if(page.app.settings){
|
||||
app = page.app;
|
||||
dial.initUI();
|
||||
browser.runtime.onMessage.addListener(function(request, sender, sendResponse){
|
||||
switch(request.command){
|
||||
case 'gridNodesSynced':
|
||||
if(app.settings) dial.populateGrid(dial.Grid, app.settings.grid, dial.Node);
|
||||
break;
|
||||
}
|
||||
});
|
||||
} else initPage();
|
||||
}, function(){});
|
||||
}
|
||||
initPage();
|
||||
}
|
||||
window.onresize = function(){
|
||||
if(app && app.settings) dial.updateGridLayout(dial.Grid, app.settings.grid, dial.styles.grid);
|
||||
@ -29,13 +41,6 @@ window.onwheel = function(ev){
|
||||
}
|
||||
}
|
||||
}
|
||||
browser.runtime.onMessage.addListener(function(request, sender, sendResponse){
|
||||
switch(request.command){
|
||||
case 'gridNodesSynced':
|
||||
if(app.settings) dial.populateGrid(dial.Grid, app.settings.grid, dial.Node);
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
dial.initUI = function(){
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
"manifest_version": 2,
|
||||
"name": "__MSG_extensionName__",
|
||||
"version": "0.0.3",
|
||||
"version": "0.0.4",
|
||||
|
||||
"description": "__MSG_extensionDescription__",
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user