mirror of
https://github.com/MatMoul/quickdial-webext.git
synced 2025-12-16 08:53:13 +00:00
Compare commits
17 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 75a6649b6c | |||
| 941772844a | |||
| cc1006042d | |||
| f992b75f45 | |||
|
|
3a3337b19c | ||
|
|
ab3072cc21 | ||
| 5bc78f7da6 | |||
| 67fea9aa9c | |||
| c68d2d4cfb | |||
| f07e530446 | |||
| 8abd79bc5f | |||
| 723724f50b | |||
| ddd081672f | |||
| e03e684fb7 | |||
| 14ed1f4dd6 | |||
| 7ccd9be787 | |||
|
|
67d950bfea |
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"
|
||||||
|
|
||||||
|
|||||||
67
src/_locales/es/messages.json
Normal file
67
src/_locales/es/messages.json
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
{
|
||||||
|
"menuAddToQuickDial": {
|
||||||
|
"message": "Agregar a Quick Dial",
|
||||||
|
"description": "Text of add bookmark menu item."
|
||||||
|
},
|
||||||
|
|
||||||
|
"menuNew": {
|
||||||
|
"message": "Nuevo",
|
||||||
|
"description": "Text of new menu item."
|
||||||
|
},
|
||||||
|
|
||||||
|
"menuNewBookmark": {
|
||||||
|
"message": "Marcador",
|
||||||
|
"description": "Text of add bookmark menu item."
|
||||||
|
},
|
||||||
|
|
||||||
|
"AddBookmarkPrompt": {
|
||||||
|
"message": "Dirección del nuevo marcador:",
|
||||||
|
"description": "Text of the add bookmark prompt."
|
||||||
|
},
|
||||||
|
|
||||||
|
"menuNewFolder": {
|
||||||
|
"message": "Carpeta",
|
||||||
|
"description": "Text of add folder menu item."
|
||||||
|
},
|
||||||
|
|
||||||
|
"AddFolderPrompt": {
|
||||||
|
"message": "Nombre de la nueva carpeta:",
|
||||||
|
"description": "Text of the add folder prompt."
|
||||||
|
},
|
||||||
|
|
||||||
|
"menuProperties": {
|
||||||
|
"message": "Propiedades",
|
||||||
|
"description": "Text of properties menu item."
|
||||||
|
},
|
||||||
|
|
||||||
|
"menuRefreshItem": {
|
||||||
|
"message": "Actualizar",
|
||||||
|
"description": "Text of refresh menu item."
|
||||||
|
},
|
||||||
|
|
||||||
|
"menuCaptureHere": {
|
||||||
|
"message": "Capturar aquí",
|
||||||
|
"description": "Text of capture here menu item."
|
||||||
|
},
|
||||||
|
|
||||||
|
"menuCapturePage": {
|
||||||
|
"message": "Capturar en una nueva pestaña",
|
||||||
|
"description": "Text of capture menu item."
|
||||||
|
},
|
||||||
|
|
||||||
|
"menuDeleteItem": {
|
||||||
|
"message": "Eliminar",
|
||||||
|
"description": "Text of delete menu item."
|
||||||
|
},
|
||||||
|
|
||||||
|
"deleteItemConfimation": {
|
||||||
|
"message": "¿Eliminar $1 ?",
|
||||||
|
"description": "Text of delete confirmation."
|
||||||
|
},
|
||||||
|
|
||||||
|
"menuSettings": {
|
||||||
|
"message": "Propiedades de Quick Dial",
|
||||||
|
"description": "Text of settings menu item."
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
67
src/_locales/uk/messages.json
Normal file
67
src/_locales/uk/messages.json
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
{
|
||||||
|
"menuAddToQuickDial": {
|
||||||
|
"message": "Додати до Quick Dial",
|
||||||
|
"description": "Text of add bookmark menu item."
|
||||||
|
},
|
||||||
|
|
||||||
|
"menuNew": {
|
||||||
|
"message": "Додати",
|
||||||
|
"description": "Text of new menu item."
|
||||||
|
},
|
||||||
|
|
||||||
|
"menuNewBookmark": {
|
||||||
|
"message": "Закладку",
|
||||||
|
"description": "Text of add bookmark menu item."
|
||||||
|
},
|
||||||
|
|
||||||
|
"AddBookmarkPrompt": {
|
||||||
|
"message": "Введіть URL-адресу нової закладки:",
|
||||||
|
"description": "Text of the add bookmark prompt."
|
||||||
|
},
|
||||||
|
|
||||||
|
"menuNewFolder": {
|
||||||
|
"message": "Папку",
|
||||||
|
"description": "Text of add folder menu item."
|
||||||
|
},
|
||||||
|
|
||||||
|
"AddFolderPrompt": {
|
||||||
|
"message": "Введіть им'я нової папки:",
|
||||||
|
"description": "Text of the add folder prompt."
|
||||||
|
},
|
||||||
|
|
||||||
|
"menuProperties": {
|
||||||
|
"message": "Властивості",
|
||||||
|
"description": "Text of properties menu item."
|
||||||
|
},
|
||||||
|
|
||||||
|
"menuRefreshItem": {
|
||||||
|
"message": "Оновити",
|
||||||
|
"description": "Text of refresh menu item."
|
||||||
|
},
|
||||||
|
|
||||||
|
"menuCaptureHere": {
|
||||||
|
"message": "Захватити тут",
|
||||||
|
"description": "Text of capture here menu item."
|
||||||
|
},
|
||||||
|
|
||||||
|
"menuCapturePage": {
|
||||||
|
"message": "Захватити на новій вкладці",
|
||||||
|
"description": "Text of capture menu item."
|
||||||
|
},
|
||||||
|
|
||||||
|
"menuDeleteItem": {
|
||||||
|
"message": "Видалити",
|
||||||
|
"description": "Text of delete menu item."
|
||||||
|
},
|
||||||
|
|
||||||
|
"deleteItemConfimation": {
|
||||||
|
"message": "Видалити $1?",
|
||||||
|
"description": "Text of delete confirmation."
|
||||||
|
},
|
||||||
|
|
||||||
|
"menuSettings": {
|
||||||
|
"message": "Налаштування Quick Dial",
|
||||||
|
"description": "Text of settings menu item."
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -68,6 +68,10 @@
|
|||||||
<td><input id="ButtonOpenInNewPage" type="checkbox"></td>
|
<td><input id="ButtonOpenInNewPage" type="checkbox"></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>Startpage timeout :</td>
|
||||||
|
<td><input id="StartupTimeout" type="number"></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@@ -8,11 +8,27 @@ app.init = function(){ // Init module
|
|||||||
if(app.settings.openQuickDialInNewPage) browser.tabs.create({});
|
if(app.settings.openQuickDialInNewPage) browser.tabs.create({});
|
||||||
else browser.tabs.update(e.id, {url: '/dial'}).then();
|
else browser.tabs.update(e.id, {url: '/dial'}).then();
|
||||||
});
|
});
|
||||||
app.GridNodes.sync(app.node, app.settings.grid.root, function(){
|
|
||||||
browser.runtime.sendMessage({ cmd: app.Messages.Commands.gridNodesLoaded });
|
browser.runtime.sendMessage({ cmd: app.Messages.Commands.gridNodesLoaded });
|
||||||
app.Bookmarks.initListener();
|
|
||||||
app.ContextMenus.initMenu();
|
app.ContextMenus.initMenu();
|
||||||
|
window.setTimeout(function(){
|
||||||
|
app.GridNodes.sync(app.node, app.settings.grid.root, function(){
|
||||||
|
app.Bookmarks.initListener();
|
||||||
});
|
});
|
||||||
|
}, 500);
|
||||||
|
|
||||||
|
// Start page workaround :
|
||||||
|
if(app.settings.startpageTimeout>0){
|
||||||
|
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')});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}, app.settings.startpageTimeout);
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -102,7 +118,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: {
|
||||||
@@ -226,6 +242,9 @@ app.Settings.init = function(callback){ // Load settings and nodes
|
|||||||
}
|
}
|
||||||
if(!data.settings.openQuickDialInNewPage && data.settings.openQuickDialInNewPage != false){
|
if(!data.settings.openQuickDialInNewPage && data.settings.openQuickDialInNewPage != false){
|
||||||
data.settings.openQuickDialInNewPage = true;
|
data.settings.openQuickDialInNewPage = true;
|
||||||
|
}
|
||||||
|
if(!data.settings.startpageTimeout){
|
||||||
|
data.settings.startpageTimeout = 500;
|
||||||
}
|
}
|
||||||
//app.Settings.save();
|
//app.Settings.save();
|
||||||
}
|
}
|
||||||
@@ -239,6 +258,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){
|
||||||
@@ -289,7 +292,7 @@ dial.initStyles = function(){
|
|||||||
dial.styles.grid.linkPanelHover = dial.Style.sheet.cssRules[dial.Style.sheet.insertRule('.Grid td>a:hover>div:first-child { }')].style;
|
dial.styles.grid.linkPanelHover = dial.Style.sheet.cssRules[dial.Style.sheet.insertRule('.Grid td>a:hover>div:first-child { }')].style;
|
||||||
if(app.settings.grid.cells.backgroundColorHover) dial.styles.grid.linkPanelHover.backgroundColor = app.settings.grid.cells.backgroundColorHover;
|
if(app.settings.grid.cells.backgroundColorHover) dial.styles.grid.linkPanelHover.backgroundColor = app.settings.grid.cells.backgroundColorHover;
|
||||||
else dial.styles.grid.linkPanelHover.backgroundColor = 'transparent';
|
else dial.styles.grid.linkPanelHover.backgroundColor = 'transparent';
|
||||||
dial.styles.grid.linkTitle = dial.Style.sheet.cssRules[dial.Style.sheet.insertRule('.Grid td>a>div:last-child { height: ' + app.settings.grid.cells.titleHeight + 'px; font-size: ' + app.settings.grid.cells.titleFontSize + 'pt; font-family: ' + app.settings.grid.cells.titleFont + 'pt; text-align: center; overflow: hidden; color: ' + app.settings.grid.cells.titleColor + '; border-top: ' + app.settings.grid.cells.titleBorderSize + 'px solid ' + app.settings.grid.cells.borderColor + '; }')].style;
|
dial.styles.grid.linkTitle = dial.Style.sheet.cssRules[dial.Style.sheet.insertRule('.Grid td>a>div:last-child { height: ' + app.settings.grid.cells.titleHeight + 'px; font-size: ' + app.settings.grid.cells.titleFontSize + 'pt; font-family: ' + app.settings.grid.cells.titleFont + '; text-align: center; overflow: hidden; color: ' + app.settings.grid.cells.titleColor + '; border-top: ' + app.settings.grid.cells.titleBorderSize + 'px solid ' + app.settings.grid.cells.borderColor + '; }')].style;
|
||||||
if(app.settings.grid.cells.titleBackgroundColor) dial.styles.grid.linkTitle.backgroundColor = app.settings.grid.cells.titleBackgroundColor;
|
if(app.settings.grid.cells.titleBackgroundColor) dial.styles.grid.linkTitle.backgroundColor = app.settings.grid.cells.titleBackgroundColor;
|
||||||
else dial.styles.grid.linkTitle.backgroundColor = 'transparent';
|
else dial.styles.grid.linkTitle.backgroundColor = 'transparent';
|
||||||
dial.styles.grid.linkTitleHover = dial.Style.sheet.cssRules[dial.Style.sheet.insertRule('.Grid td>a:hover>div:last-child { font-size: ' + app.settings.grid.cells.titleFontSizeHover + 'pt; color: ' + app.settings.grid.cells.titleColorHover + '; border-top-width: ' + app.settings.grid.cells.titleBorderSizeHover + 'px; border-top-color: ' + app.settings.grid.cells.borderColorHover + ' }')].style;
|
dial.styles.grid.linkTitleHover = dial.Style.sheet.cssRules[dial.Style.sheet.insertRule('.Grid td>a:hover>div:last-child { font-size: ' + app.settings.grid.cells.titleFontSizeHover + 'pt; color: ' + app.settings.grid.cells.titleColorHover + '; border-top-width: ' + app.settings.grid.cells.titleBorderSizeHover + 'px; border-top-color: ' + app.settings.grid.cells.borderColorHover + ' }')].style;
|
||||||
@@ -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}));
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ app.init = function(){
|
|||||||
BackgroundPreview.style.backgroundRepeat = 'no-repeat';
|
BackgroundPreview.style.backgroundRepeat = 'no-repeat';
|
||||||
BackgroundPreview.style.backgroundSize = '100% 100%';
|
BackgroundPreview.style.backgroundSize = '100% 100%';
|
||||||
ButtonOpenInNewPage.checked = app.settings.openQuickDialInNewPage;
|
ButtonOpenInNewPage.checked = app.settings.openQuickDialInNewPage;
|
||||||
|
StartupTimeout.value = app.settings.startpageTimeout;
|
||||||
GridRoot.value = app.settings.grid.root;
|
GridRoot.value = app.settings.grid.root;
|
||||||
GridRows.value = app.settings.grid.rows;
|
GridRows.value = app.settings.grid.rows;
|
||||||
GridRatioX.value = app.settings.grid.ratioX;
|
GridRatioX.value = app.settings.grid.ratioX;
|
||||||
@@ -88,6 +89,7 @@ app.init = function(){
|
|||||||
app.settings.backgroundImage = BackgroundImage;
|
app.settings.backgroundImage = BackgroundImage;
|
||||||
app.settings.backgroundMode = +(BackgroundMode.value);
|
app.settings.backgroundMode = +(BackgroundMode.value);
|
||||||
app.settings.openQuickDialInNewPage = ButtonOpenInNewPage.checked;
|
app.settings.openQuickDialInNewPage = ButtonOpenInNewPage.checked;
|
||||||
|
app.settings.startpageTimeout = StartupTimeout.value;
|
||||||
app.settings.grid.rows = +(GridRows.value);
|
app.settings.grid.rows = +(GridRows.value);
|
||||||
app.settings.grid.margin = +(GridMargins.value);
|
app.settings.grid.margin = +(GridMargins.value);
|
||||||
app.settings.grid.columns = +(GridColumns.value);
|
app.settings.grid.columns = +(GridColumns.value);
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
"manifest_version": 2,
|
"manifest_version": 2,
|
||||||
"name": "Quick Dial",
|
"name": "Quick Dial",
|
||||||
"version": "0.1.13",
|
"version": "0.1.18",
|
||||||
"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