mirror of
https://github.com/MatMoul/quickdial-webext.git
synced 2025-04-04 20:41:44 +00:00
Compare commits
49 Commits
Author | SHA1 | Date | |
---|---|---|---|
806e134b52 | |||
633c5756a1 | |||
![]() |
d2ea81d2ca | ||
![]() |
86f8063b11 | ||
![]() |
95a1ca420d | ||
41fc29660f | |||
725ad53d92 | |||
![]() |
929431e66f | ||
75a6649b6c | |||
941772844a | |||
cc1006042d | |||
f992b75f45 | |||
![]() |
3a3337b19c | ||
![]() |
ab3072cc21 | ||
5bc78f7da6 | |||
67fea9aa9c | |||
c68d2d4cfb | |||
f07e530446 | |||
8abd79bc5f | |||
723724f50b | |||
ddd081672f | |||
e03e684fb7 | |||
14ed1f4dd6 | |||
7ccd9be787 | |||
![]() |
67d950bfea | ||
ff0eebed69 | |||
9fdcc91ec6 | |||
39ab845d58 | |||
6815551c8c | |||
ce82a4c67e | |||
72ab3e5f6b | |||
beb52273a2 | |||
2e5bbce72f | |||
ddbd2f40c8 | |||
63569851d8 | |||
88b6a8d45d | |||
![]() |
7b6e112038 | ||
ee310a9546 | |||
![]() |
e400d07f01 | ||
d8620464a3 | |||
1a71f96a91 | |||
45f7e60fb8 | |||
190d54a0f1 | |||
05a78e2d63 | |||
1ba60232f2 | |||
eaf451c957 | |||
b2bb50d95e | |||
a9a4212299 | |||
7b0ac506d8 |
5
TODO
5
TODO
@ -1,5 +0,0 @@
|
||||
Create style for popup
|
||||
Add a visual hint for multipage
|
||||
Need a best solution to update folder and bookmark when it are updated from Firefox
|
||||
Improve screenshot result
|
||||
Add favicon support
|
1
makebeta
1
makebeta
@ -31,6 +31,7 @@ git checkout beta
|
||||
version=$1
|
||||
|
||||
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"
|
||||
|
||||
|
@ -1,9 +1,4 @@
|
||||
{
|
||||
"extensionDescription": {
|
||||
"message": "Quick Dial, eine Schnellwahl-Seite inspiriert von Fast Dial.",
|
||||
"description": "Description of the extension."
|
||||
},
|
||||
|
||||
"menuAddToQuickDial": {
|
||||
"message": "Zu Quick Dial hinzufügen",
|
||||
"description": "Text of add bookmark menu item."
|
||||
|
@ -1,9 +1,4 @@
|
||||
{
|
||||
"extensionDescription": {
|
||||
"message": "Quick Dial, a dial page inspired from fast dial.",
|
||||
"description": "Description of the extension."
|
||||
},
|
||||
|
||||
"menuAddToQuickDial": {
|
||||
"message": "Add to Quick Dial",
|
||||
"description": "Text of add bookmark menu item."
|
||||
|
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."
|
||||
}
|
||||
|
||||
}
|
@ -1,9 +1,4 @@
|
||||
{
|
||||
"extensionDescription": {
|
||||
"message": "Quick Dial, page dial inspirée de fast dial.",
|
||||
"description": "Description of the extension."
|
||||
},
|
||||
|
||||
"menuAddToQuickDial": {
|
||||
"message": "Ajouter à Quick Dial",
|
||||
"description": "Text of add bookmark menu item."
|
||||
|
67
src/_locales/he_IL/messages.json
Normal file
67
src/_locales/he_IL/messages.json
Normal file
@ -0,0 +1,67 @@
|
||||
{
|
||||
"menuAddToQuickDial": {
|
||||
"message": "הוסף לחיוג מהיר",
|
||||
"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": "הכנס קישור חדש למועדף :",
|
||||
"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": "הגדרות חיוג מהיר",
|
||||
"description": "Text of settings menu item."
|
||||
}
|
||||
|
||||
}
|
@ -1,9 +1,4 @@
|
||||
{
|
||||
"extensionDescription": {
|
||||
"message": "Quick Dial, una dial page inspirata a fast dial.",
|
||||
"description": "Description of the extension."
|
||||
},
|
||||
|
||||
"menuAddToQuickDial": {
|
||||
"message": "Aggiungi a Quick Dial",
|
||||
"description": "Text of add bookmark menu item."
|
||||
|
67
src/_locales/pl/messages.json
Normal file
67
src/_locales/pl/messages.json
Normal file
@ -0,0 +1,67 @@
|
||||
{
|
||||
"menuAddToQuickDial": {
|
||||
"message": "Dodaj do Quick Dial",
|
||||
"description": "Text of add bookmark menu item."
|
||||
},
|
||||
|
||||
"menuNew": {
|
||||
"message": "Nowy",
|
||||
"description": "Text of new menu item."
|
||||
},
|
||||
|
||||
"menuNewBookmark": {
|
||||
"message": "Zakładka",
|
||||
"description": "Text of add bookmark menu item."
|
||||
},
|
||||
|
||||
"AddBookmarkPrompt": {
|
||||
"message": "Wprowadź nowy adres URL zakładki:",
|
||||
"description": "Text of the add bookmark prompt."
|
||||
},
|
||||
|
||||
"menuNewFolder": {
|
||||
"message": "Folder",
|
||||
"description": "Text of add folder menu item."
|
||||
},
|
||||
|
||||
"AddFolderPrompt": {
|
||||
"message": "Wprowadź nazwę nowego folderu:",
|
||||
"description": "Text of the add folder prompt."
|
||||
},
|
||||
|
||||
"menuProperties": {
|
||||
"message": "Właściwości",
|
||||
"description": "Text of properties menu item."
|
||||
},
|
||||
|
||||
"menuRefreshItem": {
|
||||
"message": "Odśwież",
|
||||
"description": "Text of refresh menu item."
|
||||
},
|
||||
|
||||
"menuCaptureHere": {
|
||||
"message": "Zdjęcie tutaj",
|
||||
"description": "Text of capture here menu item."
|
||||
},
|
||||
|
||||
"menuCapturePage": {
|
||||
"message": "Zdjęcie na nowej karcie",
|
||||
"description": "Text of capture menu item."
|
||||
},
|
||||
|
||||
"menuDeleteItem": {
|
||||
"message": "Usuń",
|
||||
"description": "Text of delete menu item."
|
||||
},
|
||||
|
||||
"deleteItemConfimation": {
|
||||
"message": "Usuń $1 ?",
|
||||
"description": "Text of delete confirmation."
|
||||
},
|
||||
|
||||
"menuSettings": {
|
||||
"message": "Ustawienia Quick Dial",
|
||||
"description": "Text of settings menu item."
|
||||
}
|
||||
|
||||
}
|
67
src/_locales/pt_BR/messages.json
Normal file
67
src/_locales/pt_BR/messages.json
Normal file
@ -0,0 +1,67 @@
|
||||
{
|
||||
"menuAddToQuickDial": {
|
||||
"message": "Adicionar ao Quick Dial",
|
||||
"description": "Texto do iten de menu adicionar ao Quick Dial."
|
||||
},
|
||||
|
||||
"menuNew": {
|
||||
"message": "Novo",
|
||||
"description": "Texto do item de menu novo."
|
||||
},
|
||||
|
||||
"menuNewBookmark": {
|
||||
"message": "Favorito",
|
||||
"description": "Texto do iten de menu adicionar favorito."
|
||||
},
|
||||
|
||||
"AddBookmarkPrompt": {
|
||||
"message": "Entre com a url do novo favorito :",
|
||||
"description": "Texto do rótulo adicionar favorito."
|
||||
},
|
||||
|
||||
"menuNewFolder": {
|
||||
"message": "Pasta",
|
||||
"description": "Texto do item de menu adicionar pasta."
|
||||
},
|
||||
|
||||
"AddFolderPrompt": {
|
||||
"message": "Entre com o nome da nova pasta :",
|
||||
"description": "Texto do rótulo adicionar pasta."
|
||||
},
|
||||
|
||||
"menuProperties": {
|
||||
"message": "Propriedades",
|
||||
"description": "Texto do item de menu propriedades."
|
||||
},
|
||||
|
||||
"menuRefreshItem": {
|
||||
"message": "Atualizar",
|
||||
"description": "Texto do item de menu atualizar."
|
||||
},
|
||||
|
||||
"menuCaptureHere": {
|
||||
"message": "Capturar aqui",
|
||||
"description": "Texto do item de menu capturar aqui."
|
||||
},
|
||||
|
||||
"menuCapturePage": {
|
||||
"message": "Capturar em uma nova guia",
|
||||
"description": "Texto do item de menu capturar em uma nova guia."
|
||||
},
|
||||
|
||||
"menuDeleteItem": {
|
||||
"message": "Excluir",
|
||||
"description": "Texto do item de menu excluir."
|
||||
},
|
||||
|
||||
"deleteItemConfimation": {
|
||||
"message": "Excluir $1 ?",
|
||||
"description": "Texto de confirmação da exclusão."
|
||||
},
|
||||
|
||||
"menuSettings": {
|
||||
"message": " Configurações do Quick Dial",
|
||||
"description": "Texto do item de menu configurações."
|
||||
}
|
||||
|
||||
}
|
@ -1,9 +1,4 @@
|
||||
{
|
||||
"extensionDescription": {
|
||||
"message": "Quick Dial, вдохновление умершим расширением Fast Dial.",
|
||||
"description": "Description of the extension."
|
||||
},
|
||||
|
||||
"menuAddToQuickDial": {
|
||||
"message": "Добавить в Quick Dial",
|
||||
"description": "Text of add bookmark menu item."
|
||||
|
67
src/_locales/sr/messages.json
Normal file
67
src/_locales/sr/messages.json
Normal file
@ -0,0 +1,67 @@
|
||||
{
|
||||
"menuAddToQuickDial": {
|
||||
"message": "Додај у брзо бирање",
|
||||
"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": "Унесите УРЛ нове забелешке :",
|
||||
"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": "Подешавање брзог бирања",
|
||||
"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."
|
||||
}
|
||||
|
||||
}
|
@ -43,7 +43,7 @@
|
||||
|
||||
<tr>
|
||||
<td><span>Image :</span></td>
|
||||
<td colspan="2">
|
||||
<td>
|
||||
<select id="ImageMode">
|
||||
<option value="-1">Default</option>
|
||||
<option value="0">Stretch</option>
|
||||
@ -57,6 +57,7 @@
|
||||
<button class="hidden" id="ImageCapture">Capture</button>
|
||||
<input id="ImageFile" type="file" style="width:180px;">
|
||||
</td>
|
||||
<td style="width:20px"><input id="ImageLocked" type="checkbox" title="Lock image"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
|
@ -58,6 +58,22 @@
|
||||
<td>Preview :</td>
|
||||
<td><div id="BackgroundPreview" style="width: 300px; height: 180px;"></div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Show "Add to ..." :</td>
|
||||
<td><input id="MenuShowAdd" type="checkbox"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Open QD in new page :</td>
|
||||
<td><input id="ButtonOpenInNewPage" type="checkbox"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Startpage timeout :</td>
|
||||
<td><input id="StartupTimeout" type="number"></td>
|
||||
</tr>
|
||||
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<div class="hidden">
|
||||
@ -69,10 +85,35 @@
|
||||
<input id="GridColumns" type="number" min="1">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span>Ratio (X/Y) :</span></td>
|
||||
<td>
|
||||
<input id="GridRatioX" type="number" min="1">
|
||||
<input id="GridRatioY" type="number" min="1">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span>Margins :</span></td>
|
||||
<td><input id="GridMargins" type="number" min="0"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span>Open Bookmarks In :</span></td>
|
||||
<td>
|
||||
<select id="GridOpenBookmarksIn">
|
||||
<option value="0">Default</option>
|
||||
<option value="1">New Tab</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span>Open Folders In :</span></td>
|
||||
<td>
|
||||
<select id="GridOpenFoldersIn">
|
||||
<option value="0">Default</option>
|
||||
<option value="1">New Tab</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span>Back Button :</span></td>
|
||||
<td><input id="GridBackNode" type="checkbox"></td>
|
||||
@ -194,6 +235,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>
|
||||
@ -205,4 +250,4 @@
|
||||
<button id="BtnCancel">Cancel</button>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
1637
src/js/background.js
1637
src/js/background.js
File diff suppressed because it is too large
Load Diff
@ -7,9 +7,12 @@ var dial = {
|
||||
};
|
||||
|
||||
document.addEventListener("DOMContentLoaded", function(event) {
|
||||
document.body.style.backgroundColor = utils.getBackgroundColor();
|
||||
document.body.style.backgroundColor = utils.getBackgroundColor();
|
||||
app.init();
|
||||
dial.init();
|
||||
window.setTimeout(function(){
|
||||
if(! app.settings) app.init();
|
||||
}, 500);
|
||||
});
|
||||
|
||||
window.addEventListener('resize', function(){
|
||||
@ -102,7 +105,7 @@ app.Messages.getSettings = function(callback){
|
||||
} else {
|
||||
browser.runtime.sendMessage({ cmd: app.Messages.Commands.getSettings }).then(callback, callback);
|
||||
}
|
||||
});
|
||||
}, callback);
|
||||
};
|
||||
app.Messages.getNode = function(path, callback){
|
||||
browser.runtime.getBackgroundPage().then(function(page){
|
||||
@ -160,10 +163,11 @@ app.GridNodes._changed = function(node){
|
||||
|
||||
|
||||
dial.init = function(){
|
||||
dial.initMenus();
|
||||
//dial.initMenus();
|
||||
dial.Title = document.createElement('title');
|
||||
document.head.appendChild(dial.Title);
|
||||
};
|
||||
/*
|
||||
dial.initMenus = function(){
|
||||
document.body.setAttribute('contextmenu', 'page');
|
||||
dial.PageMenu = document.createElement('menu');
|
||||
@ -247,6 +251,7 @@ dial.initMenus = function(){
|
||||
dial.ItemMenu.appendChild(dial.ItemMenuSettings);
|
||||
document.body.appendChild(dial.ItemMenu);
|
||||
}
|
||||
*/
|
||||
dial.initStyles = function(){
|
||||
function applyImageMode(imageMode, target){
|
||||
switch(imageMode){
|
||||
@ -276,7 +281,7 @@ dial.initStyles = function(){
|
||||
document.head.appendChild(dial.Style);
|
||||
dial.styles = {};
|
||||
dial.styles.html = dial.Style.sheet.cssRules[dial.Style.sheet.insertRule('html { height: 100%; }')].style;
|
||||
dial.styles.body = dial.Style.sheet.cssRules[dial.Style.sheet.insertRule('body { user-select: none; -moz-user-select: none; display: flex; width: 100%; height: 100%; margin: 0px; padding: 0px; background-color: ' + app.settings.backgroundColor + '; background-image: ' + app.settings.backgroundImage + '; }')].style;
|
||||
dial.styles.body = dial.Style.sheet.cssRules[dial.Style.sheet.insertRule('body { user-select: none; -moz-user-select: none; display: flex; width: 100%; height: 100%; margin: 0px; padding: 0px; background-color: ' + app.settings.backgroundColor + '; background-image: ' + app.settings.backgroundImage + '; }')].style;
|
||||
applyImageMode(app.settings.backgroundMode, dial.styles.body);
|
||||
dial.styles.grid = {};
|
||||
dial.styles.grid.grid = dial.Style.sheet.cssRules[dial.Style.sheet.insertRule('.Grid { border-collapse: collapse; margin: auto; }')].style;
|
||||
@ -288,10 +293,13 @@ dial.initStyles = function(){
|
||||
if(app.settings.grid.cells.backgroundColor) dial.styles.grid.linkPanel.backgroundColor = app.settings.grid.cells.backgroundColor;
|
||||
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;
|
||||
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;
|
||||
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 + '; 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;
|
||||
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;
|
||||
if(app.settings.grid.cells.titleBackgroundColorHover) dial.styles.grid.linkTitleHover.backgroundColor = app.settings.grid.cells.titleBackgroundColorHover;
|
||||
else dial.styles.grid.linkTitleHover.backgroundColor = 'transparent';
|
||||
dial.styles.grid.linkEmpty = dial.Style.sheet.cssRules[dial.Style.sheet.insertRule('.Grid td>a.Empty { display: none; }')].style;
|
||||
dial.styles.grid.linkBack = dial.Style.sheet.cssRules[dial.Style.sheet.insertRule('.Grid td>a.Back :first-child { background-image: ' + app.settings.grid.backIcon + '; }')].style;
|
||||
applyImageMode(app.settings.grid.backIconMode, dial.styles.grid.linkBack);
|
||||
@ -322,6 +330,7 @@ dial.initGrid = function(){
|
||||
link.appendChild(document.createElement('div'));
|
||||
link.onmousedown = function(){
|
||||
dial._selectedItem = this;
|
||||
/*
|
||||
if(dial._selectedItem.Node){
|
||||
switch(dial._selectedItem.Node.type){
|
||||
case app.GridNodes.GridNodeType.folder:
|
||||
@ -333,6 +342,7 @@ dial.initGrid = function(){
|
||||
break;
|
||||
}
|
||||
}
|
||||
*/
|
||||
};
|
||||
|
||||
function dragstart_handler(ev) {
|
||||
@ -340,6 +350,7 @@ dial.initGrid = function(){
|
||||
ev.preventDefault();
|
||||
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'));
|
||||
if(app.settings.grid.backNode && dial.path != '/') index -= dial.page;
|
||||
ev.dataTransfer.setData("text/plain", JSON.stringify({parentId: app.node.id, index: index}));
|
||||
@ -412,8 +423,8 @@ dial.updateGridLayout = function(){
|
||||
var cellHeight = fullHeight / app.settings.grid.rows;
|
||||
var linkWidth = 0;
|
||||
var linkHeight = 0;
|
||||
if(cellWidth <= cellHeight * 4 / 3) cellHeight = cellWidth / 4 * 3;
|
||||
else cellWidth = cellHeight / 3 * 4;
|
||||
if(cellWidth <= cellHeight * app.settings.grid.ratioX / app.settings.grid.ratioY) cellHeight = cellWidth / app.settings.grid.ratioX * app.settings.grid.ratioY;
|
||||
else cellWidth = cellHeight / app.settings.grid.ratioY * app.settings.grid.ratioX;
|
||||
linkWidth = cellWidth - 2 * (cellsMargin + 1) - 2 * borderSize;
|
||||
linkHeight = cellHeight - 2 * (cellsMargin + 1) - 2 * borderSize - titleBorderSize;
|
||||
return {
|
||||
@ -474,6 +485,7 @@ dial.populateGrid = function(){
|
||||
link.Node = null;
|
||||
link.className = 'Empty';
|
||||
link.childNodes[0].style.backgroundImage = '';
|
||||
if(link.target) delete link.target;
|
||||
link.href = null;
|
||||
link.onclick = null;
|
||||
link.removeAttribute('contextmenu');
|
||||
@ -483,6 +495,7 @@ dial.populateGrid = function(){
|
||||
link.className = 'Back';
|
||||
link.childNodes[0].style.backgroundImage = '';
|
||||
link.childNodes[1].innerText = 'Back';
|
||||
if(link.target) delete link.target;
|
||||
link.href = '#';
|
||||
link.onclick = function(){ window.history.back(); }
|
||||
link.removeAttribute('contextmenu');
|
||||
@ -497,6 +510,14 @@ dial.populateGrid = function(){
|
||||
else link.childNodes[0].style.backgroundImage = 'url(' + node.image + ')';
|
||||
} else link.childNodes[0].style.backgroundImage = '';
|
||||
link.childNodes[1].innerText = node.title;
|
||||
switch(app.settings.grid.openFolderMethod){
|
||||
case 0:
|
||||
if(link.target) delete link.target;
|
||||
break;
|
||||
case 1:
|
||||
link.target = '_blank';
|
||||
break;
|
||||
}
|
||||
if(dial.path) link.href = '?' + 'bg=' + encodeURIComponent(app.settings.backgroundColor) + '&path=' + encodeURIComponent(dial.path + node.title);
|
||||
else link.href = '?' + 'bg=' + encodeURIComponent(app.settings.backgroundColor) + '&path=' + encodeURIComponent(node.title);
|
||||
link.onclick = null;
|
||||
@ -516,6 +537,14 @@ dial.populateGrid = function(){
|
||||
dial.refreshNode(link);
|
||||
}
|
||||
link.childNodes[1].innerText = node.title;
|
||||
switch(app.settings.grid.openBookmarkMethod){
|
||||
case 0:
|
||||
if(link.target) delete link.target;
|
||||
break;
|
||||
case 1:
|
||||
link.target = '_blank';
|
||||
break;
|
||||
}
|
||||
link.href = node.url;
|
||||
link.onclick = null;
|
||||
link.setAttribute('contextmenu', 'item');
|
||||
|
@ -26,6 +26,7 @@ app.init = function(){
|
||||
switch(node.type){
|
||||
case app.GridNodes.GridNodeType.folder:
|
||||
TitleLocked.parentNode.style.display = 'none';
|
||||
ImageLocked.parentNode.style.display = 'none';
|
||||
Url.parentNode.parentNode.style.display = 'none';
|
||||
if(node.image){
|
||||
if(node.image.indexOf('url(')>=0) Image = node.image;
|
||||
@ -36,6 +37,7 @@ app.init = function(){
|
||||
break;
|
||||
case app.GridNodes.GridNodeType.bookmark:
|
||||
TitleLocked.checked = (node.titleLocked==true);
|
||||
ImageLocked.checked = (node.imageLocked==true);
|
||||
ImageDefault.style.display = 'none';
|
||||
Url.value = node.url;
|
||||
if(node.image.indexOf('url(')>=0) Image = node.image;
|
||||
@ -102,7 +104,7 @@ app.init = function(){
|
||||
app.Messages.updateNode(app.node.id, { title: Title.value, image: Image, imageMode: +(ImageMode.value) })
|
||||
break;
|
||||
case app.GridNodes.GridNodeType.bookmark:
|
||||
app.Messages.updateNode(app.node.id, { title: Title.value, titleLocked: TitleLocked.checked, url: Url.value, image: Image, imageMode: +(ImageMode.value) })
|
||||
app.Messages.updateNode(app.node.id, { title: Title.value, titleLocked: TitleLocked.checked, imageLocked: ImageLocked.checked, url: Url.value, image: Image, imageMode: +(ImageMode.value) })
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -19,6 +19,7 @@ app.init = function(){
|
||||
});
|
||||
app.Messages.getSettings(function(settings){
|
||||
app.settings = settings;
|
||||
MenuShowAdd.checked = app.settings.menuShowAdd;
|
||||
BackgroundColor.value = app.settings.backgroundColor;
|
||||
BackgroundImage = app.settings.backgroundImage;
|
||||
BackgroundMode.value = app.settings.backgroundMode;
|
||||
@ -26,10 +27,16 @@ app.init = function(){
|
||||
BackgroundPreview.style.backgroundImage = app.settings.backgroundImage;
|
||||
BackgroundPreview.style.backgroundRepeat = 'no-repeat';
|
||||
BackgroundPreview.style.backgroundSize = '100% 100%';
|
||||
ButtonOpenInNewPage.checked = app.settings.openQuickDialInNewPage;
|
||||
StartupTimeout.value = app.settings.startpageTimeout;
|
||||
GridRoot.value = app.settings.grid.root;
|
||||
GridRows.value = app.settings.grid.rows;
|
||||
GridRatioX.value = app.settings.grid.ratioX;
|
||||
GridRatioY.value = app.settings.grid.ratioY;
|
||||
GridMargins.value = app.settings.grid.margin;
|
||||
GridColumns.value = app.settings.grid.columns;
|
||||
GridOpenBookmarksIn.value = app.settings.grid.openBookmarkMethod;
|
||||
GridOpenFoldersIn.value = app.settings.grid.openFolderMethod;
|
||||
GridBackNode.checked = app.settings.grid.backNode;
|
||||
GridBackMode.value = app.settings.grid.backIconMode;
|
||||
GridBackImage = app.settings.grid.backIcon;
|
||||
@ -69,6 +76,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(){
|
||||
@ -76,12 +84,19 @@ app.init = function(){
|
||||
window.frameElement.popup.close();
|
||||
}
|
||||
BtnApply.onclick = function(){
|
||||
app.settings.menuShowAdd = MenuShowAdd.checked;
|
||||
app.settings.backgroundColor = BackgroundColor.value;
|
||||
app.settings.backgroundImage = BackgroundImage;
|
||||
app.settings.backgroundMode = +(BackgroundMode.value);
|
||||
app.settings.openQuickDialInNewPage = ButtonOpenInNewPage.checked;
|
||||
app.settings.startpageTimeout = StartupTimeout.value;
|
||||
app.settings.grid.rows = +(GridRows.value);
|
||||
app.settings.grid.margin = +(GridMargins.value);
|
||||
app.settings.grid.columns = +(GridColumns.value);
|
||||
app.settings.grid.ratioX = GridRatioX.value;
|
||||
app.settings.grid.ratioY = GridRatioY.value;
|
||||
app.settings.grid.openBookmarkMethod = +(GridOpenBookmarksIn.value);
|
||||
app.settings.grid.openFolderMethod = +(GridOpenFoldersIn.value);
|
||||
app.settings.grid.backNode = GridBackNode.checked;
|
||||
app.settings.grid.backIconMode = +(GridBackMode.value);
|
||||
app.settings.grid.backIcon = GridBackImage;
|
||||
@ -115,6 +130,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 } );
|
||||
}
|
||||
@ -158,6 +174,19 @@ app.init = function(){
|
||||
fileReader.readAsDataURL(BackgroundImageFile.files[0]);
|
||||
}
|
||||
|
||||
GridRows.onchange = function(){
|
||||
if(GridRatioAuto.checked){
|
||||
GridRatioX.value = GridColumns.value;
|
||||
GridRatioY.value = GridRows.value;
|
||||
}
|
||||
}
|
||||
GridColumns.onchange = function(){
|
||||
if(GridRatioAuto.checked){
|
||||
GridRatioX.value = GridColumns.value;
|
||||
GridRatioY.value = GridRows.value;
|
||||
}
|
||||
}
|
||||
|
||||
GridBackImageReset.onclick = function(){
|
||||
GridBackImage = 'url(/img/back.png)';
|
||||
GridBackPreview.style.backgroundImage = GridBackImage;
|
||||
|
@ -2,14 +2,13 @@
|
||||
|
||||
"manifest_version": 2,
|
||||
"name": "Quick Dial",
|
||||
"version": "0.1.8",
|
||||
"version": "0.1.20",
|
||||
"author": "MatMoul",
|
||||
"homepage_url": "https://github.com/MatMoul/quickdial-webext",
|
||||
"developer": {
|
||||
"name": "MatMoul",
|
||||
"url": "https://github.com/MatMoul/quickdial-webext"
|
||||
},
|
||||
"description": "__MSG_extensionDescription__",
|
||||
|
||||
"icons": {
|
||||
"24": "img/24.png",
|
||||
@ -44,7 +43,7 @@
|
||||
"applications": {
|
||||
"gecko": {
|
||||
"id": "quickdial@matmoul.com",
|
||||
"strict_min_version": "52.0"
|
||||
"strict_min_version": "70.0"
|
||||
}
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user