Преглед на файлове

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);

Зареждане…
Отказ
Запис