|
@@ -160,7 +160,7 @@ local["^https?://(www\.|cloud\.|)feedly\.com/"] = [ |
|
|
// }], |
|
|
// }], |
|
|
['l', function(ev, arg){ |
|
|
['l', function(ev, arg){ |
|
|
var host = window.content.location.host; |
|
|
var host = window.content.location.host; |
|
|
if (host === "cloud.feedly.com") { |
|
|
|
|
|
|
|
|
if (host === "cloud.feedly.com" || host === "feedly.com") { |
|
|
window.content.location.href = "http://" + host + "/#latest"; |
|
|
window.content.location.href = "http://" + host + "/#latest"; |
|
|
} else if (host === "www.feedly.com") { |
|
|
} else if (host === "www.feedly.com") { |
|
|
window.content.location.href = "http://" + host + "/home#latest"; |
|
|
window.content.location.href = "http://" + host + "/home#latest"; |
|
@@ -296,8 +296,8 @@ ext.add("my-index-html", function(ev, arg){ |
|
|
}, "open my index.html"); |
|
|
}, "open my index.html"); |
|
|
|
|
|
|
|
|
ext.add("echo-tab-info", function(){ |
|
|
ext.add("echo-tab-info", function(){ |
|
|
var all = gBrowser.tabs.length; |
|
|
|
|
|
var ix = gBrowser.mCurrentTab._tPos; |
|
|
|
|
|
|
|
|
var all = getBrowser().tabs.length; |
|
|
|
|
|
var ix = getBrowser().mCurrentTab._tPos; |
|
|
var title = window.document.title; |
|
|
var title = window.document.title; |
|
|
var url = window.content.location.href; |
|
|
var url = window.content.location.href; |
|
|
display.echoStatusBar((ix + 1).toString() + " / " + |
|
|
display.echoStatusBar((ix + 1).toString() + " / " + |
|
@@ -465,10 +465,10 @@ ext.add('auto-install-plugins', function(ev, arg){ |
|
|
}, 'Install plugins automatically if not installed yet.'); |
|
|
}, 'Install plugins automatically if not installed yet.'); |
|
|
|
|
|
|
|
|
ext.add('put-aside-this-page', function (ev, arg) { |
|
|
ext.add('put-aside-this-page', function (ev, arg) { |
|
|
var n = gBrowser.mCurrentTab._tPos; |
|
|
|
|
|
gBrowser.moveTabTo(gBrowser.mCurrentTab, 0); |
|
|
|
|
|
|
|
|
var n = getBrowser().mCurrentTab._tPos; |
|
|
|
|
|
getBrowser().moveTabTo(getBrowser().mCurrentTab, 0); |
|
|
if (n != 0) { |
|
|
if (n != 0) { |
|
|
gBrowser.selectedTab = gBrowser.mTabs[n]; |
|
|
|
|
|
|
|
|
getBrowser().selectedTab = getBrowser().mTabs[n]; |
|
|
} |
|
|
} |
|
|
}, 'put aside this page'); |
|
|
}, 'put aside this page'); |
|
|
|
|
|
|
|
@@ -495,9 +495,9 @@ ext.add("hide-sidebar", function(){ |
|
|
}, "hide-sidebar"); |
|
|
}, "hide-sidebar"); |
|
|
|
|
|
|
|
|
ext.add("close-and-next-tab", function (ev, arg) { |
|
|
ext.add("close-and-next-tab", function (ev, arg) { |
|
|
var n = gBrowser.mCurrentTab._tPos; |
|
|
|
|
|
gBrowser.removeCurrentTab(); |
|
|
|
|
|
gBrowser.selectedTab = gBrowser.mTabs[n]; |
|
|
|
|
|
|
|
|
var n = getBrowser().mCurrentTab._tPos; |
|
|
|
|
|
getBrowser().removeCurrentTab(); |
|
|
|
|
|
getBrowser().selectedTab = getBrowser().mTabs[n]; |
|
|
}, "close and focus to next tab"); |
|
|
}, "close and focus to next tab"); |
|
|
|
|
|
|
|
|
////////////////////////////////////// |
|
|
////////////////////////////////////// |
|
@@ -693,7 +693,7 @@ ext.add("list-closed-tabs", function () { |
|
|
ext.add("list-tab-history", function () { |
|
|
ext.add("list-tab-history", function () { |
|
|
const fav = "chrome://mozapps/skin/places/defaultFavicon.png"; |
|
|
const fav = "chrome://mozapps/skin/places/defaultFavicon.png"; |
|
|
var tabHistory = []; |
|
|
var tabHistory = []; |
|
|
var sessionHistory = gBrowser.webNavigation.sessionHistory; |
|
|
|
|
|
|
|
|
var sessionHistory = getBrowser().webNavigation.sessionHistory; |
|
|
if (sessionHistory.count < 1) |
|
|
if (sessionHistory.count < 1) |
|
|
return void display.echoStatusBar("Tab history not exist", 2000); |
|
|
return void display.echoStatusBar("Tab history not exist", 2000); |
|
|
var curIdx = sessionHistory.index; |
|
|
var curIdx = sessionHistory.index; |
|
@@ -720,7 +720,8 @@ ext.add("list-tab-history", function () { |
|
|
header : ["Title", "URL"], |
|
|
header : ["Title", "URL"], |
|
|
initialIndex : thIdx, |
|
|
initialIndex : thIdx, |
|
|
callback : function(i) { |
|
|
callback : function(i) { |
|
|
if (i >= 0) gBrowser.webNavigation.gotoIndex(tabHistory[i][3]); |
|
|
|
|
|
|
|
|
if (i >= 0) |
|
|
|
|
|
getBrowser().webNavigation.gotoIndex(tabHistory[i][3]); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
}, 'List tab history'); |
|
|
}, 'List tab history'); |
|
@@ -743,11 +744,10 @@ key.suspendKey = "Not defined"; |
|
|
|
|
|
|
|
|
// ================================= Hooks ================================= // |
|
|
// ================================= Hooks ================================= // |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
hook.setHook('KeyBoardQuit', function (aEvent) { |
|
|
hook.setHook('KeyBoardQuit', function (aEvent) { |
|
|
// ext.exec("hide-sidebar"); |
|
|
// ext.exec("hide-sidebar"); |
|
|
let(elem = document.commandDispatcher.focusedElement) elem && elem.blur(); |
|
|
let(elem = document.commandDispatcher.focusedElement) elem && elem.blur(); |
|
|
gBrowser.focus(); |
|
|
|
|
|
|
|
|
getBrowser().focus(); |
|
|
content.focus(); |
|
|
content.focus(); |
|
|
command.closeFindBar(); |
|
|
command.closeFindBar(); |
|
|
if (util.isCaretEnabled()) { |
|
|
if (util.isCaretEnabled()) { |
|
@@ -774,14 +774,6 @@ hook.setHook('Unload', function () { |
|
|
|
|
|
|
|
|
// ============================= Key bindings ============================== // |
|
|
// ============================= Key bindings ============================== // |
|
|
|
|
|
|
|
|
key.setGlobalKey('C-<right>', function () { |
|
|
|
|
|
gBrowser.mTabContainer.advanceSelectedTab(1, true); |
|
|
|
|
|
}, 'ひとつ右のタブへ'); |
|
|
|
|
|
|
|
|
|
|
|
key.setGlobalKey('C-<left>', function () { |
|
|
|
|
|
gBrowser.mTabContainer.advanceSelectedTab(-1, true); |
|
|
|
|
|
}, 'ひとつ左のタブへ'); |
|
|
|
|
|
|
|
|
|
|
|
key.setGlobalKey('C-<up>', function () { |
|
|
key.setGlobalKey('C-<up>', function () { |
|
|
var browser = getBrowser(); |
|
|
var browser = getBrowser(); |
|
|
if (browser.mCurrentTab.previousSibling) { |
|
|
if (browser.mCurrentTab.previousSibling) { |
|
@@ -803,7 +795,7 @@ key.setGlobalKey('C-<down>', function () { |
|
|
|
|
|
|
|
|
key.setGlobalKey('<delete>', function (ev, arg) { |
|
|
key.setGlobalKey('<delete>', function (ev, arg) { |
|
|
let (elem = document.commandDispatcher.focusedElement) elem && elem.blur(); |
|
|
let (elem = document.commandDispatcher.focusedElement) elem && elem.blur(); |
|
|
gBrowser.focus(); |
|
|
|
|
|
|
|
|
getBrowser().focus(); |
|
|
content.focus(); |
|
|
content.focus(); |
|
|
}, 'コンテンツへフォーカス', true); |
|
|
}, 'コンテンツへフォーカス', true); |
|
|
|
|
|
|
|
@@ -847,7 +839,7 @@ key.setViewKey(['t', 'p'], function (ev, arg) { |
|
|
ext.exec("twitter-client-tweet-this-page", arg, ev); |
|
|
ext.exec("twitter-client-tweet-this-page", arg, ev); |
|
|
}, 'このページのタイトルと URL を使ってつぶやく', true); |
|
|
}, 'このページのタイトルと URL を使ってつぶやく', true); |
|
|
|
|
|
|
|
|
key.setViewKey('u', function (ev) { |
|
|
|
|
|
|
|
|
key.setViewKey([['u'], ['S-SPC']], function (ev) { |
|
|
goDoCommand("cmd_scrollPageUp"); |
|
|
goDoCommand("cmd_scrollPageUp"); |
|
|
}, '一画面分スクロールアップ'); |
|
|
}, '一画面分スクロールアップ'); |
|
|
|
|
|
|
|
@@ -913,7 +905,7 @@ key.setViewKey('a', function (ev, arg) { |
|
|
allTabs.open(); |
|
|
allTabs.open(); |
|
|
}, 'alltabs.open'); |
|
|
}, 'alltabs.open'); |
|
|
|
|
|
|
|
|
key.setViewKey('d', function (ev) { |
|
|
|
|
|
|
|
|
key.setViewKey([['d'], ['SPC']], function (ev) { |
|
|
goDoCommand("cmd_scrollPageDown"); |
|
|
goDoCommand("cmd_scrollPageDown"); |
|
|
}, '一画面スクロールダウン'); |
|
|
}, '一画面スクロールダウン'); |
|
|
|
|
|
|
|
@@ -1029,10 +1021,10 @@ key.setEditKey('C-o', function (ev) { |
|
|
command.openLine(ev); |
|
|
command.openLine(ev); |
|
|
}, '行を開く (Open line)'); |
|
|
}, '行を開く (Open line)'); |
|
|
|
|
|
|
|
|
key.setViewKey('S-SPC', function (ev) { |
|
|
|
|
|
goDoCommand("cmd_scrollPageUp"); |
|
|
|
|
|
}, '一画面分スクロールアップ'); |
|
|
|
|
|
|
|
|
key.setGlobalKey('C-<right>', function (ev) { |
|
|
|
|
|
getBrowser().mTabContainer.advanceSelectedTab(1, true); |
|
|
|
|
|
}, 'ひとつ右のタブへ'); |
|
|
|
|
|
|
|
|
key.setViewKey('SPC', function (ev) { |
|
|
|
|
|
goDoCommand("cmd_scrollPageDown"); |
|
|
|
|
|
}, '一画面スクロールダウン'); |
|
|
|
|
|
|
|
|
key.setGlobalKey('C-<left>', function (ev) { |
|
|
|
|
|
getBrowser().mTabContainer.advanceSelectedTab(-1, true); |
|
|
|
|
|
}, 'ひとつ左のタブへ'); |