소스 검색

Merge branch 'master' of github.com:10sr/dotfiles

Conflicts:
	_keysnail.js
pull/1/head
10sr 12 년 전
부모
커밋
23c85477c0
1개의 변경된 파일40개의 추가작업 그리고 20개의 파일을 삭제
  1. +40
    -20
      _keysnail.js

+ 40
- 20
_keysnail.js 파일 보기

@@ -142,7 +142,7 @@ local["http://(www|tw|es|de|)\.nicovideo\.jp\/(watch|playlist)/*"] = [
local["^http://www.tumblr.com/dashboard"] = [
// ["C-<left>", function (ev, arg) {gBrowser.mTabContainer.advanceSelectedTab(-1, true); }],
// ["C-<right>", function (ev, arg) {gBrowser.mTabContainer.advanceSelectedTab(1, true); }],
["<left>", function (ev, arg) {window.content.location.href = "http://www.tumblr.com/dashboard"; }],
["<left>", function (ev, arg) { window.content.location.href = "http://www.tumblr.com/dashboard"; }],
// ["<right>", null],
["J", function (ev, arg) {
if (window.loadURI) {
@@ -151,17 +151,6 @@ local["^http://www.tumblr.com/dashboard"] = [
}],
];

///////////////////////////////////
//tanythhing用
plugins.options["tanything_opt.keymap"] = {
"\\" : "prompt-cancel",
"j" : "prompt-next-completion",
"k" : "prompt-previous-completion",
"o" : "localOpen",
":" : "localClose",
"L" : "localMovetoend"
};

//////////////////////////////////////////
// yatc
style.register("#keysnail-twitter-client-container{ display:none !important; }");
@@ -400,12 +389,6 @@ ext.add("keysnail-setting-menu",function(){
});
},"open keysnail setting menu");

// //////////////////////////
// //プラグイン一括アップデート
// ext.add("check-for-plugins-update", function () {
// [p for (p in plugins.context)].forEach(function (p) { try { userscript.updatePlugin(p); } catch(e) {} });
// }, "Check for all plugin's update");

////////////////////////
//マルチプルタブハンドラ
ext.add("multiple-tab-handler-close-selected-and-current-tabs", function () {
@@ -470,6 +453,40 @@ ext.add("echo-closed-tabs", function () {

}, "List closed tabs");

///////////////////////////////
ext.add("list-tab-history", function () {
const fav = "chrome://mozapps/skin/places/defaultFavicon.png";
var tabHistory = [];
var sessionHistory = gBrowser.webNavigation.sessionHistory;
if (sessionHistory.count < 1)
return void display.echoStatusBar("Tab history not exist", 2000);
var curIdx = sessionHistory.index;
for (var i = 0; i < sessionHistory.count; i++) {
var entry = sessionHistory.getEntryAtIndex(i, false);
if (!entry)
continue;
try {
var iconURL = Cc["@mozilla.org/browser/favicon-service;1"]
.getService(Ci.nsIFaviconService)
.getFaviconForPage(entry.URI).spec;
} catch (ex) {}
tabHistory.push([iconURL || fav, entry.title, entry.URI.spec, i]);
}
for (var thIdx = 0; thIdx < tabHistory.length; thIdx++) {
if (tabHistory[thIdx][3] == curIdx) break;
}

prompt.selector(
{
message : "select history in tab",
collection : tabHistory,
flags : [ICON | IGNORE, 0, 0, IGNORE | HIDDEN],
header : ["Title", "URL"],
initialIndex : thIdx,
callback : function(i) { if (i >= 0) gBrowser.webNavigation.gotoIndex(tabHistory[i][3]); }
});
}, 'List tab history');

//}}%PRESERVE%
// ========================================================================= //

@@ -691,8 +708,7 @@ key.setViewKey([['<prior>'], ['<next>']], function (ev, arg) {
}, 'ignore');

key.setViewKey(':', function (ev, arg) {
return !document.getElementById("keysnail-prompt").hidden &&
document.getElementById("keysnail-prompt-textbox").focus();
return !document.getElementById("keysnail-prompt").hidden && document.getElementById("keysnail-prompt-textbox").focus();
}, 'KeySnail のプロンプトへフォーカス', true);

key.setViewKey('H', function (ev, arg) {
@@ -718,3 +734,7 @@ key.setEditKey('C-<tab>', function (ev) {
key.setViewKey('I', function (ev, arg) {
ext.exec('instapaper-post-page-with-comment', arg, ev);
}, 'post page and comment', true);

key.setViewKey('C-<backspace>', function (ev, arg) {
ext.exec('list-tab-history', arg, ev);
}, 'List tab history', true);

불러오는 중...
취소
저장