Skip to content

Instantly share code, notes, and snippets.

@958
958 / gist:1068696
Created July 7, 2011 00:53
[keysnail]サムネイル付きタブ一覧を表示する & XULMigemoる
// http://www.lifehacker.jp/2011/06/110622_listalltabsthumbs.html
// をしなくても、以下のようなキーバインドを割り当てればタブ一覧が表示される
key.setViewKey('A', function (ev, arg) {
allTabs.open();
}, 'タブを一覧表示', true);
// ついでに、上記で表示されるタブ一覧と、Ctrl+Shift+e で表示されるタブグループ一覧(?)で
// タブ検索を XULMigemoる
// これは %PRESERVE% エリアへ
(function(){
@958
958 / gist:1068682
Created July 7, 2011 00:40
[keysnail]keysnail の prompt に about:memory を表示する
ext.add('show-memory-report', function(ev, arg) {
function addFigure(str) {
var num = new String(str).replace(/,/g, "");
while(num != (num = num.replace(/^(-?\d+)(\d{3})/, "$1,$2")));
return num;
}
function getMemoryReports() {
let mrm = Cc["@mozilla.org/memory-reporter-manager;1"].getService(Ci.nsIMemoryReporterManager);
let e = mrm.enumerateReporters();
--- a/104764.user.js
+++ b/104764.user.js
@@ -11,15 +11,15 @@
// raw URL rule
// http://wa.cocolog-enshu.com/pseudodiary/2011/06/gist-raw-url-72.html
(function() {
- var codes = document.querySelectorAll('.code > a');
- if (!codes) {
+ var files = document.querySelectorAll('.file');
+ if (!files) {
@958
958 / gist:1039381
Created June 22, 2011 02:11
[keysnail]プロンプトとアドオンバーの表示をトグルする
style.register(<><![CDATA[
#ks-bottom-separator {
border-top-width: 2px !important;
border-top-style: solid !important;
border-top-color: -moz-use-text-color !important;
-moz-border-top-colors: threedshadow threedhighlight !important;
}
#addon-bar {
border-top: none !important;
-moz-appearance: none !important;
@958
958 / gist:1037288
Created June 21, 2011 05:14
[keysnail]yatc の短縮 URL を goo.gl に変更する
plugins.lib = _.extend(plugins.lib, {
shortenURL: function (longURL, callback) {
let url = 'https://www.googleapis.com/urlshortener/v1/url';
let xhr = new XMLHttpRequest();
xhr.open("POST", url, true);
xhr.setRequestHeader("Content-Type", "application/json");
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
let url = JSON.parse(xhr.responseText).id;
callback(url);
let PLUGIN_INFO =
<KeySnailPlugin>
<name>Encoding switcher</name>
<description>Switch current page encoding</description>
<description lang="ja">表示中のページのエンコードを切り替えます</description>
<updateURL>https://gist.github.com/958/1031072/raw/encoding-switcher.js</updateURL>
<version>0.0.3</version>
<license>MIT</license>
<minVersion>1.8.0</minVersion>
<include>main</include>
@958
958 / gist:1028699
Created June 16, 2011 05:02
[keysnail]HoK拡張ヒントモードから画像でgoogle画像検索
plugins.options['hok.actions'] = [
[':',
'Google image search',
function(e) {
if (e.src) {
let url = 'http://www.google.com/searchbyimage?image_url=' + encodeURIComponent(e.src);
openUILinkIn(url, 'tab');
}
},
false, false, 'img'],
@958
958 / keybind-helper.ks.js
Last active September 26, 2015 02:47
[keysnail]入力中のキーに続くキーバインドを表示する
let PLUGIN_INFO =
<KeySnailPlugin>
<name>Keybind helper</name>
<description>I display a key to push next</description>
<description lang="ja">入力中のキーに続くキーバインドを一覧表示する</description>
<author>958</author>
<license>MIT</license>
<updateURL>https://gist.github.com/958/1026637/raw/keybind-helper.ks.js</updateURL>
<iconURL>https://sites.google.com/site/958site/Home/files/keybind-helper.ks.png</iconURL>
<version>0.0.3</version>
@958
958 / abbreviations.ks.js
Last active September 26, 2015 02:27
[keysnail]Abbreviations manager
var PLUGIN_INFO =
<KeySnailPlugin>
<name>Abbreviations manager</name>
<description lang="ja">Vimperator の Abbreviations みたいなもの</description>
<updateURL>https://gist.github.com/958/1024186/raw/abbreviations.ks.js</updateURL>
<iconURL>https://sites.google.com/site/958site/Home/files/abbreviations.ks.png</iconURL>
<license>MIT</license>
<minVersion>1.8.5</minVersion>
<author>958</author>
<version>0.0.6</version>
@958
958 / firefox-addon-manager.ks.js
Last active September 26, 2015 00:47
[keysnail]Firefox addon manager
// Info
let PLUGIN_INFO =
<KeySnailPlugin>
<name>Firefox addon manager</name>
<description>Firefox addon manager</description>
<description lang="ja">Firefox のアドオン管理</description>
<updateURL>https://gist.github.com/958/1011984/raw/firefox-addon-manager.ks.js</updateURL>
<iconURL>https://sites.google.com/site/958site/Home/files/firefox-addon-manager.ks.png</iconURL>
<author>958</author>