mirror of
https://github.com/MatMoul/quickdial-webext.git
synced 2025-12-16 17:03:12 +00:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5bc78f7da6 | |||
| 67fea9aa9c | |||
| c68d2d4cfb | |||
| f07e530446 | |||
| 8abd79bc5f | |||
| 723724f50b | |||
| ddd081672f | |||
| e03e684fb7 | |||
| 14ed1f4dd6 |
1
makebeta
1
makebeta
@@ -31,6 +31,7 @@ git checkout beta
|
|||||||
version=$1
|
version=$1
|
||||||
|
|
||||||
sed -i "/\"version\":/c\ \ \"version\": \"$version\"," src/manifest.json
|
sed -i "/\"version\":/c\ \ \"version\": \"$version\"," src/manifest.json
|
||||||
|
sed -i 's/quickdial@matmoul.com/quickdialtest@matmoul.com/' src/manifest.json
|
||||||
|
|
||||||
git commit -a -m "Beta Version $version"
|
git commit -a -m "Beta Version $version"
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,18 @@ app.init = function(){ // Init module
|
|||||||
app.Bookmarks.initListener();
|
app.Bookmarks.initListener();
|
||||||
app.ContextMenus.initMenu();
|
app.ContextMenus.initMenu();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Start page workaround :
|
||||||
|
setTimeout(function(){
|
||||||
|
browser.tabs.query({}).then( function(tabs) {
|
||||||
|
tabs.forEach(function(itm){
|
||||||
|
if(itm.url=='about:blank'){
|
||||||
|
browser.tabs.update(itm.id, {url: browser.extension.getURL('dial')});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}, 500);
|
||||||
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -102,7 +114,7 @@ app.Messages.init = function(){ // Init Messages Listeners
|
|||||||
app.Settings = {}; // Settings helper object
|
app.Settings = {}; // Settings helper object
|
||||||
app.Settings.init = function(callback){ // Load settings and nodes
|
app.Settings.init = function(callback){ // Load settings and nodes
|
||||||
browser.storage.local.get().then(function(data){
|
browser.storage.local.get().then(function(data){
|
||||||
if(Object.keys(data).length == 0) {
|
if(Object.keys(data).length == 0 || ! data.settings) {
|
||||||
data = {
|
data = {
|
||||||
version: 3,
|
version: 3,
|
||||||
settings: {
|
settings: {
|
||||||
@@ -239,6 +251,7 @@ app.Settings.update = function(settings, callback){ // Save new settings
|
|||||||
app.Settings.save(callback);
|
app.Settings.save(callback);
|
||||||
};
|
};
|
||||||
app.Settings.save = function(callback){ // Save settings
|
app.Settings.save = function(callback){ // Save settings
|
||||||
|
if(! app.settings) return;
|
||||||
var data = { version: 4 };
|
var data = { version: 4 };
|
||||||
data.settings = app.settings;
|
data.settings = app.settings;
|
||||||
data.node = app.node;
|
data.node = app.node;
|
||||||
|
|||||||
@@ -10,6 +10,9 @@ document.addEventListener("DOMContentLoaded", function(event) {
|
|||||||
document.body.style.backgroundColor = utils.getBackgroundColor();
|
document.body.style.backgroundColor = utils.getBackgroundColor();
|
||||||
app.init();
|
app.init();
|
||||||
dial.init();
|
dial.init();
|
||||||
|
window.setTimeout(function(){
|
||||||
|
if(! app.settings) app.init();
|
||||||
|
}, 500);
|
||||||
});
|
});
|
||||||
|
|
||||||
window.addEventListener('resize', function(){
|
window.addEventListener('resize', function(){
|
||||||
@@ -102,7 +105,7 @@ app.Messages.getSettings = function(callback){
|
|||||||
} else {
|
} else {
|
||||||
browser.runtime.sendMessage({ cmd: app.Messages.Commands.getSettings }).then(callback, callback);
|
browser.runtime.sendMessage({ cmd: app.Messages.Commands.getSettings }).then(callback, callback);
|
||||||
}
|
}
|
||||||
});
|
}, callback);
|
||||||
};
|
};
|
||||||
app.Messages.getNode = function(path, callback){
|
app.Messages.getNode = function(path, callback){
|
||||||
browser.runtime.getBackgroundPage().then(function(page){
|
browser.runtime.getBackgroundPage().then(function(page){
|
||||||
@@ -343,6 +346,7 @@ dial.initGrid = function(){
|
|||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if(dial.page == 0) dial.page = 1;
|
||||||
var index = (dial.page - 1) * (app.settings.grid.rows * app.settings.grid.columns) + +(ev.target.parentElement.getAttribute('gridindex'));
|
var index = (dial.page - 1) * (app.settings.grid.rows * app.settings.grid.columns) + +(ev.target.parentElement.getAttribute('gridindex'));
|
||||||
if(app.settings.grid.backNode && dial.path != '/') index -= dial.page;
|
if(app.settings.grid.backNode && dial.path != '/') index -= dial.page;
|
||||||
ev.dataTransfer.setData("text/plain", JSON.stringify({parentId: app.node.id, index: index}));
|
ev.dataTransfer.setData("text/plain", JSON.stringify({parentId: app.node.id, index: index}));
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
"manifest_version": 2,
|
"manifest_version": 2,
|
||||||
"name": "Quick Dial",
|
"name": "Quick Dial",
|
||||||
"version": "0.1.13",
|
"version": "0.1.17",
|
||||||
"author": "MatMoul",
|
"author": "MatMoul",
|
||||||
"homepage_url": "https://github.com/MatMoul/quickdial-webext",
|
"homepage_url": "https://github.com/MatMoul/quickdial-webext",
|
||||||
"developer": {
|
"developer": {
|
||||||
|
|||||||
Reference in New Issue
Block a user