Skip to content

Instantly share code, notes, and snippets.

View teramako's full-sized avatar

teramako teramako

View GitHub Profile
liberator.plugins.delicious = (function(){
function getBookmarkFile(){
let file = services.get("directory").get("ProfD",Ci.nsIFile)
file.append("ybookmarks.sqlite");
if (!file.exists() || !file.isReadable()){
return null;
}
manager.file = file;
return file;
/*
* http://www.bijint.com/
*
* == Start ==
* js plugins.bijin_clock.start(min)
* min: interval minutes (default: 1)
*
* == Stop ==
* js plugins.bijin_clock.stop()
*/
let PLUGIN_INFO =
<VimperatorPlugin>
<name>{NAME}</name>
<description>like Growl (xul version)</description>
<require type="plugin">notifier.js</require>
<version>0.1</version>
<minVersion>2.0pre</minVersion>
<maxVersion>2.0</maxVersion>
<detail><![CDATA[
popup alert like Growl
liberator.plugins.reorgSQLite = (function(){
const obs = Cc["@mozilla.org/observer-service;1"].getService(Ci.nsIObserverService);
const ss = Cc["@mozilla.org/storage/service;1"].getService(Ci.mozIStorageService);
let sqliteFiles = [];
function getSQLiteFiles(){
if (sqliteFiles.length > 0){
return sqliteFiles;
jetpack.future.import("slideBar");
const NAME = "wikipedia-ja", baseURL = "http://en.m.wikipedia.org";
function getSlidebar(){
return jetpack.tabs.focused.raw.ownerDocument.defaultView.slideBar;
}
function getSlideFeature(slidebar){
return slidebar.features.filter(function(F) "name" in F.args && F.args.name == NAME)[0];
}
let PLUGIN_INFO =
<VimperatorPlugin>
<name>{NAME}</name>
<description>get expanded or shorten URL with bit.ly</description>
<author mail="teramako@gmail.com" homepage="http://d.hatena.ne.jp/teramako/">teramako</author>
<version>0.6.3</version>
<minVersion>2.0</minVersion>
<maxVersion>2.2a1pre</maxVersion>
<detail lang="ja"><![CDATA[
http://bit.ly/ のAPIを使用して短いURLを得たり、元のURLを得るためのコード
/**
* @description GitHub JavaScript API
* @author teramako teramako@gmail.com
* @license MIT
* @see http://develop.github.com/
*/
var GITHUB;
(function(){
//#!/usr/lib/xulrunner/xpcshell -f
/*
const Cc = Components.classes;
const Ci = Components.interfaces;
*/
liberator.plugins.telnetd = (function(){
const cs = Cc["@mozilla.org/consoleservice;1"].getService(Ci.nsIConsoleService);
#!/usr/lib/xulrunner/xpcshell
const USAGE = <><![CDATA[
XULRunner付属のxpcshellで動くJavaScript
引数のURLのHTML文字列を取得しパースして、再度文字列化して出力するもの
Usage: xpcshell curl.js URL
]]></>.toString();
// ==UserScript==
// @name twittager
// @namespace http://twitter.com/teramako/
// @include http://twitter.com/*
// @include https://twitter.com/*
// ==/UserScript==
(function(){
const twittagerNS = new Namespace("http://twittag.r-definition.com/");