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
4b6977d14b
commit
e1c12b02f2
@ -41,7 +41,6 @@ core.Settings.load = function(){ // Load settings and call core.init
|
|||||||
}).then(function(obj){
|
}).then(function(obj){
|
||||||
app.settings = obj;
|
app.settings = obj;
|
||||||
core._init();
|
core._init();
|
||||||
browser.runtime.sendMessage({ command: 'appReady'}).then(function(){}, function(){});
|
|
||||||
},function(){});
|
},function(){});
|
||||||
}
|
}
|
||||||
core.Settings.save = function(){ // Save settings
|
core.Settings.save = function(){ // Save settings
|
||||||
|
@ -5,13 +5,17 @@ var dial = {
|
|||||||
maxpage: 1
|
maxpage: 1
|
||||||
};
|
};
|
||||||
|
|
||||||
browser.runtime.getBackgroundPage().then(function(page){ app = page.app; }, function(){});
|
window.onload = function(){
|
||||||
window.onload = function(){ if(app.settings) dial.initUI(); }
|
browser.runtime.getBackgroundPage().then(function(page){
|
||||||
|
app = page.app;
|
||||||
|
dial.initUI();
|
||||||
|
}, function(){});
|
||||||
|
}
|
||||||
window.onresize = function(){
|
window.onresize = function(){
|
||||||
if(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);
|
||||||
}
|
}
|
||||||
window.onwheel = function(ev){
|
window.onwheel = function(ev){
|
||||||
if(app.settings){
|
if(app && app.settings){
|
||||||
if(ev.deltaY > 0){
|
if(ev.deltaY > 0){
|
||||||
if(dial.page < dial.maxpage){
|
if(dial.page < dial.maxpage){
|
||||||
dial.page += 1;
|
dial.page += 1;
|
||||||
@ -30,10 +34,6 @@ browser.runtime.onMessage.addListener(function(request, sender, sendResponse){
|
|||||||
case 'gridNodesSynced':
|
case 'gridNodesSynced':
|
||||||
if(app.settings) dial.populateGrid(dial.Grid, app.settings.grid, dial.Node);
|
if(app.settings) dial.populateGrid(dial.Grid, app.settings.grid, dial.Node);
|
||||||
break;
|
break;
|
||||||
case 'appReady':
|
|
||||||
browser.runtime.getBackgroundPage().then(function(page){ app = page.app; }, function(){});
|
|
||||||
dial.initUI();
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -48,10 +48,6 @@ dial.initUI = function(){
|
|||||||
dial.Grid = dial.initGrid('Grid', app.settings.grid, dial.Body);
|
dial.Grid = dial.initGrid('Grid', app.settings.grid, dial.Body);
|
||||||
var url = new URL(window.location);
|
var url = new URL(window.location);
|
||||||
dial.path = url.searchParams.get('path');
|
dial.path = url.searchParams.get('path');
|
||||||
/*
|
|
||||||
if(url.searchParams.get('path')) dial.Node = app.getNode(app.settings.grid.node, dial.path + '/');
|
|
||||||
else dial.Node = app.getNode(app.settings.grid.node, '/');
|
|
||||||
*/
|
|
||||||
if(url.searchParams.get('path')) {
|
if(url.searchParams.get('path')) {
|
||||||
dial.Node = app.getNode(app.settings.grid.node, dial.path + '/');
|
dial.Node = app.getNode(app.settings.grid.node, dial.path + '/');
|
||||||
} else {
|
} else {
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
"manifest_version": 2,
|
"manifest_version": 2,
|
||||||
"name": "__MSG_extensionName__",
|
"name": "__MSG_extensionName__",
|
||||||
"version": "0.0.2",
|
"version": "0.0.3",
|
||||||
|
|
||||||
"description": "__MSG_extensionDescription__",
|
"description": "__MSG_extensionDescription__",
|
||||||
|
|
||||||
@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
"applications": {
|
"applications": {
|
||||||
"gecko": {
|
"gecko": {
|
||||||
"id": "mat@matmoul.com_quickdial_test_3",
|
"id": "quickdial@matmoul.com",
|
||||||
"strict_min_version": "52.0"
|
"strict_min_version": "52.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user