Skip to content

Instantly share code, notes, and snippets.

// vim: set sw=4 ts=4 fdm=marker et :
//"use strict";
var INFO = //{{{
<plugin name="hints-ext" version="0.0.3"
href="http://github.com/caisui/vimperator/blob/master/plugin/hints-ext.js"
summary="Hints Ext"
xmlns="http://vimperator.org/namespaces/liberator">
<author href="http://d.hatena.ne.jp/caisui">caisui</author>
<license href="http://www.opensource.org/licenses/bsd-license.php">New BSD License</license>
<project name="Vimperator" minVersion="3.0"/>
@caisui
caisui / cmd-if.js
Created December 8, 2012 10:43
if コマンド
// vim: set fdm=marker :
function Reader() {} //{{{
Reader.prototype.END = {};
(function (F) {
var P = F.prototype;
P.open = true;
P.path = "undefined(str)";
P.close = function close() {
this.open = false;
};
@caisui
caisui / Readme.md
Created September 30, 2012 07:22
e4x 削除した vimperator
src= install.rdf Makefile $(shell find . \( -name '*.js' -or -name chrome.manifest \))
output=sourceless.xpi
xpi: $(src)
zip $(output) -r $(src)
@caisui
caisui / realsize.js
Created June 28, 2012 11:05
指定サイズの矩形を MOW に 表示
commands.addUserCommand(["realsize"], "may be real size", function (args) {
var width, height;
if (args.length === 1)
width = height = args[0];
else {
width = args[0];
height = args[1];
}
if (args["-r"])
[width, height] = [height, width];
content inspector-ext chrome/content/
override chrome://inspector/content/viewers/eventListeners/eventListeners.js chrome://inspector-ext/content/eventListeners.js
override chrome://inspector/content/viewers/eventListeners/eventListeners.xul chrome://inspector-ext/content/eventListeners.xul
override chrome://inspector/content/res/viewer-registry.rdf chrome://inspector-ext/content/viewer-registry.rdf
@caisui
caisui / service.js
Created June 17, 2012 07:41
compatible service.js
if (!services.services.pref) {
[
["appStartup", "startup"],
["browserSearch", "search"],
["directory", "dirsvc"],
["observer", "obs"],
["pref", "prefs"],
["subscriptLoader", "scriptloader"],
["windowMediator", "wm"],
["windowWatcher", "ww"],
@caisui
caisui / rc.py
Created May 8, 2012 14:49
percol's keymap
from types import FunctionType
def percol_specialkey_replace(fn):
def decofn(self, key):
if len(key) > 2 and key[0] == "<" and key[-1] == ">":
key = key[1:-1]
return fn(self, key)
return decofn
class ChainMap(object):
var a = {
__noSuchMethod__: function () {c++;}
};
var e = [];
var c = 0;
for (var i = 0; i < 100; i++) {
try {
a.b();
} catch (ex) {
e.push([i, ex.message]);