mirror of
https://github.com/MatMoul/quickdial-webext.git
synced 2024-12-23 07:26:11 +00:00
Feature: Add snapshot delay setting
This commit is contained in:
parent
a9a4212299
commit
b2bb50d95e
@ -194,6 +194,10 @@
|
||||
<td><input id="GridCellsTitleBackgroundColor" type="color"></td>
|
||||
<td><input id="GridCellsTitleBackgroundColorHover" type="color"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span>Snapshot Delay :</span></td>
|
||||
<td colspan="2"><input id="GridCellsSnapshotDelay" type="number" min="300" max="10000"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -144,7 +144,8 @@ app.Settings.init = function(callback){ // Load settings and nodes
|
||||
titleBorderSize: 1,
|
||||
titleBorderSizeHover: 1,
|
||||
previewWidth: 1200,
|
||||
previewHeight: 710
|
||||
previewHeight: 710,
|
||||
snapshotDelay: 2000
|
||||
},
|
||||
root: 'Quick Dial',
|
||||
}
|
||||
@ -197,6 +198,10 @@ app.Settings.init = function(callback){ // Load settings and nodes
|
||||
data.settings.grid.cells.titleBorderSizeHover = data.settings.grid.cells.titleBorderSize;
|
||||
app.Settings.save();
|
||||
}
|
||||
if(data.version == 4){ // Upgrade Data Version
|
||||
if(!data.settings.grid.cells.snapshotDelay) data.settings.grid.cells.snapshotDelay = 2000;
|
||||
//app.Settings.save();
|
||||
}
|
||||
app.settings = data.settings;
|
||||
app.node = data.node;
|
||||
if(callback) callback();
|
||||
@ -326,7 +331,7 @@ app.SiteInfos.fromNewTab = function(url, callback){ // Retrieve infos from a ne
|
||||
browser.tabs.remove(tab.id);
|
||||
if(callback) callback();
|
||||
});
|
||||
}, 500);
|
||||
}, app.settings.grid.cells.snapshotDelay);
|
||||
}, function(){ if(callback) callback(); });
|
||||
}
|
||||
}, function(){ if(callback) callback(); });
|
||||
|
@ -69,6 +69,7 @@ app.init = function(){
|
||||
GridCellsTitleBackgroundColor.value = app.settings.grid.cells.titleBackgroundColor;
|
||||
GridCellsTitleBackgroundColorHover.value = app.settings.grid.cells.titleBackgroundColorHover;
|
||||
GridCellsTitleBackgroundTransparentHover.checked = (app.settings.grid.cells.titleBackgroundColorHover == null);
|
||||
GridCellsSnapshotDelay.value = app.settings.grid.cells.snapshotDelay;
|
||||
});
|
||||
|
||||
BtnOk.onclick = function(){
|
||||
@ -115,6 +116,7 @@ app.init = function(){
|
||||
else app.settings.grid.cells.titleBackgroundColor = GridCellsTitleBackgroundColor.value;
|
||||
if(GridCellsTitleBackgroundTransparentHover.checked == true) app.settings.grid.cells.titleBackgroundColorHover = null;
|
||||
else app.settings.grid.cells.titleBackgroundColorHover = GridCellsTitleBackgroundColorHover.value;
|
||||
app.settings.grid.cells.snapshotDelay = GridCellsSnapshotDelay.value;
|
||||
app.settings.grid.root = GridRoot.value;
|
||||
browser.runtime.sendMessage( { cmd: app.Messages.Commands.setSettings, settings: app.settings } );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user