mirror of
https://github.com/MatMoul/quickdial-webext.git
synced 2025-12-16 08:53:13 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ff0eebed69 | |||
| 9fdcc91ec6 | |||
| 39ab845d58 | |||
| 6815551c8c |
@@ -1,9 +1,4 @@
|
|||||||
{
|
{
|
||||||
"extensionDescription": {
|
|
||||||
"message": "Quick Dial, eine Schnellwahl-Seite inspiriert von Fast Dial.",
|
|
||||||
"description": "Description of the extension."
|
|
||||||
},
|
|
||||||
|
|
||||||
"menuAddToQuickDial": {
|
"menuAddToQuickDial": {
|
||||||
"message": "Zu Quick Dial hinzufügen",
|
"message": "Zu Quick Dial hinzufügen",
|
||||||
"description": "Text of add bookmark menu item."
|
"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": {
|
"menuAddToQuickDial": {
|
||||||
"message": "Add to Quick Dial",
|
"message": "Add to Quick Dial",
|
||||||
"description": "Text of add bookmark menu item."
|
"description": "Text of add bookmark menu item."
|
||||||
|
|||||||
@@ -1,9 +1,4 @@
|
|||||||
{
|
{
|
||||||
"extensionDescription": {
|
|
||||||
"message": "Quick Dial, page dial inspirée de fast dial.",
|
|
||||||
"description": "Description of the extension."
|
|
||||||
},
|
|
||||||
|
|
||||||
"menuAddToQuickDial": {
|
"menuAddToQuickDial": {
|
||||||
"message": "Ajouter à Quick Dial",
|
"message": "Ajouter à Quick Dial",
|
||||||
"description": "Text of add bookmark menu item."
|
"description": "Text of add bookmark menu item."
|
||||||
|
|||||||
@@ -1,9 +1,4 @@
|
|||||||
{
|
{
|
||||||
"extensionDescription": {
|
|
||||||
"message": "Quick Dial, una dial page inspirata a fast dial.",
|
|
||||||
"description": "Description of the extension."
|
|
||||||
},
|
|
||||||
|
|
||||||
"menuAddToQuickDial": {
|
"menuAddToQuickDial": {
|
||||||
"message": "Aggiungi a Quick Dial",
|
"message": "Aggiungi a Quick Dial",
|
||||||
"description": "Text of add bookmark menu item."
|
"description": "Text of add bookmark menu item."
|
||||||
|
|||||||
@@ -1,9 +1,4 @@
|
|||||||
{
|
{
|
||||||
"extensionDescription": {
|
|
||||||
"message": "Quick Dial, uma página de discagem inspirada no Fast Dial.",
|
|
||||||
"description": "Descrição da extensão."
|
|
||||||
},
|
|
||||||
|
|
||||||
"menuAddToQuickDial": {
|
"menuAddToQuickDial": {
|
||||||
"message": "Adicionar ao Quick Dial",
|
"message": "Adicionar ao Quick Dial",
|
||||||
"description": "Texto do iten de menu adicionar ao Quick Dial."
|
"description": "Texto do iten de menu adicionar ao Quick Dial."
|
||||||
|
|||||||
@@ -1,9 +1,4 @@
|
|||||||
{
|
{
|
||||||
"extensionDescription": {
|
|
||||||
"message": "Quick Dial, вдохновление умершим расширением Fast Dial.",
|
|
||||||
"description": "Description of the extension."
|
|
||||||
},
|
|
||||||
|
|
||||||
"menuAddToQuickDial": {
|
"menuAddToQuickDial": {
|
||||||
"message": "Добавить в Quick Dial",
|
"message": "Добавить в Quick Dial",
|
||||||
"description": "Text of add bookmark menu item."
|
"description": "Text of add bookmark menu item."
|
||||||
|
|||||||
@@ -1,9 +1,4 @@
|
|||||||
{
|
{
|
||||||
"extensionDescription": {
|
|
||||||
"message": "Quick Dial, страница брзог бирања коју инспириса fast dial.",
|
|
||||||
"description": "Description of the extension."
|
|
||||||
},
|
|
||||||
|
|
||||||
"menuAddToQuickDial": {
|
"menuAddToQuickDial": {
|
||||||
"message": "Додај у брзо бирање",
|
"message": "Додај у брзо бирање",
|
||||||
"description": "Text of add bookmark menu item."
|
"description": "Text of add bookmark menu item."
|
||||||
|
|||||||
@@ -62,6 +62,14 @@
|
|||||||
<td>Show "Add to ..." :</td>
|
<td>Show "Add to ..." :</td>
|
||||||
<td><input id="MenuShowAdd" type="checkbox"></td>
|
<td><input id="MenuShowAdd" type="checkbox"></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>Open QD in new page :</td>
|
||||||
|
<td><input id="ButtonOpenInNewPage" type="checkbox"></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div class="hidden">
|
<div class="hidden">
|
||||||
@@ -84,6 +92,24 @@
|
|||||||
<td><span>Margins :</span></td>
|
<td><span>Margins :</span></td>
|
||||||
<td><input id="GridMargins" type="number" min="0"></td>
|
<td><input id="GridMargins" type="number" min="0"></td>
|
||||||
</tr>
|
</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>
|
<tr>
|
||||||
<td><span>Back Button :</span></td>
|
<td><span>Back Button :</span></td>
|
||||||
<td><input id="GridBackNode" type="checkbox"></td>
|
<td><input id="GridBackNode" type="checkbox"></td>
|
||||||
|
|||||||
@@ -4,8 +4,9 @@ app.init = function(){ // Init module
|
|||||||
app.Settings.init(function(){
|
app.Settings.init(function(){
|
||||||
app.Messages.init();
|
app.Messages.init();
|
||||||
browser.runtime.sendMessage({ cmd: app.Messages.Commands.settingsChanged });
|
browser.runtime.sendMessage({ cmd: app.Messages.Commands.settingsChanged });
|
||||||
browser.browserAction.onClicked.addListener(function(){
|
browser.browserAction.onClicked.addListener(function(e){
|
||||||
browser.tabs.create({});
|
if(app.settings.openQuickDialInNewPage) browser.tabs.create({});
|
||||||
|
else browser.tabs.update(e.id, {url: '/dial'}).then();
|
||||||
});
|
});
|
||||||
app.GridNodes.sync(app.node, app.settings.grid.root, function(){
|
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 });
|
||||||
@@ -109,6 +110,7 @@ app.Settings.init = function(callback){ // Load settings and nodes
|
|||||||
backgroundImage: null,
|
backgroundImage: null,
|
||||||
backgroundMode: 0,
|
backgroundMode: 0,
|
||||||
menuShowAdd: true,
|
menuShowAdd: true,
|
||||||
|
openQuickDialInNewPage: true,
|
||||||
grid: {
|
grid: {
|
||||||
margin: 10,
|
margin: 10,
|
||||||
rows: 4,
|
rows: 4,
|
||||||
@@ -121,6 +123,8 @@ app.Settings.init = function(callback){ // Load settings and nodes
|
|||||||
folderIcon: 'url(/img/folder.png)',
|
folderIcon: 'url(/img/folder.png)',
|
||||||
folderIconMode: 0,
|
folderIconMode: 0,
|
||||||
loadingIcon: 'url(/img/throbber.gif)',
|
loadingIcon: 'url(/img/throbber.gif)',
|
||||||
|
openBookmarkMethod: 0,
|
||||||
|
openFolderMethod: 0,
|
||||||
cells: {
|
cells: {
|
||||||
margin: 4,
|
margin: 4,
|
||||||
marginHover: 4,
|
marginHover: 4,
|
||||||
@@ -216,6 +220,13 @@ app.Settings.init = function(callback){ // Load settings and nodes
|
|||||||
if(!(data.settings.menuShowAdd == true) && !(data.settings.menuShowAdd == false)){
|
if(!(data.settings.menuShowAdd == true) && !(data.settings.menuShowAdd == false)){
|
||||||
data.settings.menuShowAdd = true;
|
data.settings.menuShowAdd = true;
|
||||||
}
|
}
|
||||||
|
if(!data.settings.grid.openBookmarkMethod && data.settings.grid.openBookmarkMethod != 0){
|
||||||
|
data.settings.grid.openBookmarkMethod = 0;
|
||||||
|
data.settings.grid.openFolderMethod = 0;
|
||||||
|
}
|
||||||
|
if(!data.settings.openQuickDialInNewPage && data.settings.openQuickDialInNewPage != false){
|
||||||
|
data.settings.openQuickDialInNewPage = true;
|
||||||
|
}
|
||||||
//app.Settings.save();
|
//app.Settings.save();
|
||||||
}
|
}
|
||||||
app.settings = data.settings;
|
app.settings = data.settings;
|
||||||
|
|||||||
@@ -477,6 +477,7 @@ dial.populateGrid = function(){
|
|||||||
link.Node = null;
|
link.Node = null;
|
||||||
link.className = 'Empty';
|
link.className = 'Empty';
|
||||||
link.childNodes[0].style.backgroundImage = '';
|
link.childNodes[0].style.backgroundImage = '';
|
||||||
|
if(link.target) delete link.target;
|
||||||
link.href = null;
|
link.href = null;
|
||||||
link.onclick = null;
|
link.onclick = null;
|
||||||
link.removeAttribute('contextmenu');
|
link.removeAttribute('contextmenu');
|
||||||
@@ -486,6 +487,7 @@ dial.populateGrid = function(){
|
|||||||
link.className = 'Back';
|
link.className = 'Back';
|
||||||
link.childNodes[0].style.backgroundImage = '';
|
link.childNodes[0].style.backgroundImage = '';
|
||||||
link.childNodes[1].innerText = 'Back';
|
link.childNodes[1].innerText = 'Back';
|
||||||
|
if(link.target) delete link.target;
|
||||||
link.href = '#';
|
link.href = '#';
|
||||||
link.onclick = function(){ window.history.back(); }
|
link.onclick = function(){ window.history.back(); }
|
||||||
link.removeAttribute('contextmenu');
|
link.removeAttribute('contextmenu');
|
||||||
@@ -500,6 +502,14 @@ dial.populateGrid = function(){
|
|||||||
else link.childNodes[0].style.backgroundImage = 'url(' + node.image + ')';
|
else link.childNodes[0].style.backgroundImage = 'url(' + node.image + ')';
|
||||||
} else link.childNodes[0].style.backgroundImage = '';
|
} else link.childNodes[0].style.backgroundImage = '';
|
||||||
link.childNodes[1].innerText = node.title;
|
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);
|
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);
|
else link.href = '?' + 'bg=' + encodeURIComponent(app.settings.backgroundColor) + '&path=' + encodeURIComponent(node.title);
|
||||||
link.onclick = null;
|
link.onclick = null;
|
||||||
@@ -519,6 +529,14 @@ dial.populateGrid = function(){
|
|||||||
dial.refreshNode(link);
|
dial.refreshNode(link);
|
||||||
}
|
}
|
||||||
link.childNodes[1].innerText = node.title;
|
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.href = node.url;
|
||||||
link.onclick = null;
|
link.onclick = null;
|
||||||
link.setAttribute('contextmenu', 'item');
|
link.setAttribute('contextmenu', 'item');
|
||||||
|
|||||||
@@ -27,12 +27,15 @@ app.init = function(){
|
|||||||
BackgroundPreview.style.backgroundImage = app.settings.backgroundImage;
|
BackgroundPreview.style.backgroundImage = app.settings.backgroundImage;
|
||||||
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;
|
||||||
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;
|
||||||
GridRatioY.value = app.settings.grid.ratioY;
|
GridRatioY.value = app.settings.grid.ratioY;
|
||||||
GridMargins.value = app.settings.grid.margin;
|
GridMargins.value = app.settings.grid.margin;
|
||||||
GridColumns.value = app.settings.grid.columns;
|
GridColumns.value = app.settings.grid.columns;
|
||||||
|
GridOpenBookmarksIn.value = app.settings.grid.openBookmarkMethod;
|
||||||
|
GridOpenFoldersIn.value = app.settings.grid.openFolderMethod;
|
||||||
GridBackNode.checked = app.settings.grid.backNode;
|
GridBackNode.checked = app.settings.grid.backNode;
|
||||||
GridBackMode.value = app.settings.grid.backIconMode;
|
GridBackMode.value = app.settings.grid.backIconMode;
|
||||||
GridBackImage = app.settings.grid.backIcon;
|
GridBackImage = app.settings.grid.backIcon;
|
||||||
@@ -84,11 +87,14 @@ app.init = function(){
|
|||||||
app.settings.backgroundColor = BackgroundColor.value;
|
app.settings.backgroundColor = BackgroundColor.value;
|
||||||
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.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);
|
||||||
app.settings.grid.ratioX = GridRatioX.value;
|
app.settings.grid.ratioX = GridRatioX.value;
|
||||||
app.settings.grid.ratioY = GridRatioY.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.backNode = GridBackNode.checked;
|
||||||
app.settings.grid.backIconMode = +(GridBackMode.value);
|
app.settings.grid.backIconMode = +(GridBackMode.value);
|
||||||
app.settings.grid.backIcon = GridBackImage;
|
app.settings.grid.backIcon = GridBackImage;
|
||||||
|
|||||||
@@ -2,14 +2,13 @@
|
|||||||
|
|
||||||
"manifest_version": 2,
|
"manifest_version": 2,
|
||||||
"name": "Quick Dial",
|
"name": "Quick Dial",
|
||||||
"version": "0.1.12",
|
"version": "0.1.13",
|
||||||
"author": "MatMoul",
|
"author": "MatMoul",
|
||||||
"homepage_url": "https://github.com/MatMoul/quickdial-webext",
|
"homepage_url": "https://github.com/MatMoul/quickdial-webext",
|
||||||
"developer": {
|
"developer": {
|
||||||
"name": "MatMoul",
|
"name": "MatMoul",
|
||||||
"url": "https://github.com/MatMoul/quickdial-webext"
|
"url": "https://github.com/MatMoul/quickdial-webext"
|
||||||
},
|
},
|
||||||
"description": "__MSG_extensionDescription__",
|
|
||||||
|
|
||||||
"icons": {
|
"icons": {
|
||||||
"24": "img/24.png",
|
"24": "img/24.png",
|
||||||
|
|||||||
Reference in New Issue
Block a user