mirror of
https://github.com/MatMoul/quickdial-webext.git
synced 2024-12-23 23:46:11 +00:00
Bug correction : load page is white when firefox start
This commit is contained in:
parent
e1c12b02f2
commit
2ea5d7fdc8
@ -6,11 +6,23 @@ var dial = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
window.onload = function(){
|
window.onload = function(){
|
||||||
|
function initPage(){
|
||||||
browser.runtime.getBackgroundPage().then(function(page){
|
browser.runtime.getBackgroundPage().then(function(page){
|
||||||
|
if(page.app.settings){
|
||||||
app = page.app;
|
app = page.app;
|
||||||
dial.initUI();
|
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(){});
|
}, function(){});
|
||||||
}
|
}
|
||||||
|
initPage();
|
||||||
|
}
|
||||||
window.onresize = function(){
|
window.onresize = function(){
|
||||||
if(app && app.settings) dial.updateGridLayout(dial.Grid, app.settings.grid, dial.styles.grid);
|
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(){
|
dial.initUI = function(){
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
"manifest_version": 2,
|
"manifest_version": 2,
|
||||||
"name": "__MSG_extensionName__",
|
"name": "__MSG_extensionName__",
|
||||||
"version": "0.0.3",
|
"version": "0.0.4",
|
||||||
|
|
||||||
"description": "__MSG_extensionDescription__",
|
"description": "__MSG_extensionDescription__",
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user