1
0
mirror of https://github.com/MatMoul/quickdial-webext.git synced 2025-04-05 12:51:45 +00:00

Compare commits

..

No commits in common. "develop" and "v0.1.19" have entirely different histories.

4 changed files with 7 additions and 206 deletions

View File

@ -1,67 +0,0 @@
{
"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."
}
}

View File

@ -276,143 +276,15 @@ app.ContextMenus.menuItemClicked = function(info, tab){
}); });
}; };
app.ContextMenus.initMenu = function(){ // (Called from app.init) Init context menu in all pages app.ContextMenus.initMenu = function(){ // (Called from app.init) Init context menu in all pages
// Create Add Context menu for all pages
if(app.settings.menuShowAdd){ if(app.settings.menuShowAdd){
browser.contextMenus.create({ browser.contextMenus.create({ // Create Context menu
id: 'AddToQuickDial', id: 'AddToQuickDial',
title: browser.i18n.getMessage("menuAddToQuickDial"), title: browser.i18n.getMessage("menuAddToQuickDial"),
contexts: ["all"], contexts: ["all"],
documentUrlPatterns: [ 'http://*/*', 'https://*/*', 'file://*/*', 'ftp://*/*' ], documentUrlPatterns: [ 'http://*/*', 'https://*/*', 'file://*/*', 'ftp://*/*' ]
onclick(info, tab) { app.ContextMenus.menuItemClicked(info, tab) } }, function(){});
}); browser.contextMenus.onClicked.addListener(app.ContextMenus.menuItemClicked);
} }
// Create WebExt Page Context menu
browser.contextMenus.create({
id: "pagemenu",
title: "Quick Dial",
documentUrlPatterns: [ 'moz-extension://*/dial', 'moz-extension://*/dial?*' ],
contexts: ["page"]
});
browser.contextMenus.create({
id: "pagemenunew",
parentId: "pagemenu",
title: browser.i18n.getMessage("menuNew")
});
browser.contextMenus.create({
parentId: "pagemenunew",
title: browser.i18n.getMessage("menuNewBookmark"),
onclick(info, tab) {
browser.tabs.executeScript(tab.id, {
code: "window.dial.createBookmark();"
});
}
});
browser.contextMenus.create({
parentId: "pagemenunew",
title: browser.i18n.getMessage("menuNewFolder"),
onclick(info, tab) {
browser.tabs.executeScript(tab.id, {
code: "window.dial.createFolder();"
});
}
});
browser.contextMenus.create({ parentId: "pagemenu", type: "separator" });
browser.contextMenus.create({
parentId: "pagemenu",
title: browser.i18n.getMessage("menuSettings"),
onclick(info, tab) {
browser.tabs.executeScript(tab.id, {
code: "window.dial.editSettings();"
});
}
});
// Create WebExt Link Context menu
browser.contextMenus.create({
id: "itemmenu",
title: "Quick Dial",
documentUrlPatterns: [ 'moz-extension://*/dial', 'moz-extension://*/dial?*' ],
contexts: ["link"]
});
browser.contextMenus.create({
id: "itemmenunew",
parentId: "itemmenu",
title: browser.i18n.getMessage("menuNew")
});
browser.contextMenus.create({
parentId: "itemmenunew",
title: browser.i18n.getMessage("menuNewBookmark"),
onclick(info, tab) {
browser.tabs.executeScript(tab.id, {
code: "window.dial.createBookmark();"
});
}
});
browser.contextMenus.create({
parentId: "itemmenunew",
title: browser.i18n.getMessage("menuNewFolder"),
onclick(info, tab) {
browser.tabs.executeScript(tab.id, {
code: "window.dial.createFolder();"
});
}
});
browser.contextMenus.create({ parentId: "itemmenu", type: "separator" });
browser.contextMenus.create({
parentId: "itemmenu",
title: browser.i18n.getMessage("menuProperties"),
onclick(info, tab) {
browser.tabs.executeScript(tab.id, {
code: "window.dial.editProperties(window.dial._selectedItem);"
});
}
});
browser.contextMenus.create({
parentId: "itemmenu",
title: browser.i18n.getMessage("menuRefreshItem"),
onclick(info, tab) {
browser.tabs.executeScript(tab.id, {
code: "window.dial.refreshNode(window.dial._selectedItem);"
});
}
});
browser.contextMenus.create({
parentId: "itemmenu",
title: browser.i18n.getMessage("menuCaptureHere"),
visible: false,
onclick(info, tab) {
browser.tabs.executeScript(tab.id, {
code: "window.dial.captureHere(window.dial._selectedItem);"
});
}
});
browser.contextMenus.create({
parentId: "itemmenu",
title: browser.i18n.getMessage("menuCapturePage"),
onclick(info, tab) {
browser.tabs.executeScript(tab.id, {
code: "window.dial.capturePage(window.dial._selectedItem);"
});
}
});
browser.contextMenus.create({
parentId: "itemmenu",
title: browser.i18n.getMessage("menuDeleteItem"),
onclick(info, tab) {
browser.tabs.executeScript(tab.id, {
code: "window.dial.deleteNode();"
});
}
});
browser.contextMenus.create({ parentId: "itemmenu", type: "separator" });
browser.contextMenus.create({
parentId: "itemmenu",
title: browser.i18n.getMessage("menuSettings"),
onclick(info, tab) {
browser.tabs.executeScript(tab.id, {
code: "window.dial.editSettings();"
});
}
});
}; };
app.ContextMenus.updateMenu = function(){ app.ContextMenus.updateMenu = function(){
browser.contextMenus.onClicked.removeListener(app.ContextMenus.menuItemClicked); browser.contextMenus.onClicked.removeListener(app.ContextMenus.menuItemClicked);

View File

@ -163,11 +163,10 @@ app.GridNodes._changed = function(node){
dial.init = function(){ dial.init = function(){
//dial.initMenus(); dial.initMenus();
dial.Title = document.createElement('title'); dial.Title = document.createElement('title');
document.head.appendChild(dial.Title); document.head.appendChild(dial.Title);
}; };
/*
dial.initMenus = function(){ dial.initMenus = function(){
document.body.setAttribute('contextmenu', 'page'); document.body.setAttribute('contextmenu', 'page');
dial.PageMenu = document.createElement('menu'); dial.PageMenu = document.createElement('menu');
@ -251,7 +250,6 @@ dial.initMenus = function(){
dial.ItemMenu.appendChild(dial.ItemMenuSettings); dial.ItemMenu.appendChild(dial.ItemMenuSettings);
document.body.appendChild(dial.ItemMenu); document.body.appendChild(dial.ItemMenu);
} }
*/
dial.initStyles = function(){ dial.initStyles = function(){
function applyImageMode(imageMode, target){ function applyImageMode(imageMode, target){
switch(imageMode){ switch(imageMode){
@ -330,7 +328,6 @@ dial.initGrid = function(){
link.appendChild(document.createElement('div')); link.appendChild(document.createElement('div'));
link.onmousedown = function(){ link.onmousedown = function(){
dial._selectedItem = this; dial._selectedItem = this;
/*
if(dial._selectedItem.Node){ if(dial._selectedItem.Node){
switch(dial._selectedItem.Node.type){ switch(dial._selectedItem.Node.type){
case app.GridNodes.GridNodeType.folder: case app.GridNodes.GridNodeType.folder:
@ -342,7 +339,6 @@ dial.initGrid = function(){
break; break;
} }
} }
*/
}; };
function dragstart_handler(ev) { function dragstart_handler(ev) {

View File

@ -2,7 +2,7 @@
"manifest_version": 2, "manifest_version": 2,
"name": "Quick Dial", "name": "Quick Dial",
"version": "0.1.20", "version": "0.1.19",
"author": "MatMoul", "author": "MatMoul",
"homepage_url": "https://github.com/MatMoul/quickdial-webext", "homepage_url": "https://github.com/MatMoul/quickdial-webext",
"developer": { "developer": {
@ -43,7 +43,7 @@
"applications": { "applications": {
"gecko": { "gecko": {
"id": "quickdial@matmoul.com", "id": "quickdial@matmoul.com",
"strict_min_version": "70.0" "strict_min_version": "52.0"
} }
}, },