This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//extensions/[email protected]/chrome/content/tabundle.js | |
Tabundle.createGroupListHtml = function() { | |
var height = window.innerHeight; | |
var currentGroup = TabView._window.GroupItems.getActiveGroupItem(); | |
var list = Array.map(currentGroup._children, function(tabitem) { | |
var w = gBrowser.getBrowserForTab(tabitem.tab).contentWindow | |
var c = Tabundle.capture(w, {x: 0, y:0}, {h: height, w: w.innerWidth}, 0.3) | |
return [w.document.title, w.location.href, c] | |
}) | |
var date = Tabundle.dateString(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun ac-ispell-get-word () | |
(format "\\(%s\\)" (car (ispell-get-word nil "\\*")))) | |
(defun ac-ispell-get-candidates (prefix) | |
(let ((word prefix) | |
(interior-frag nil)) | |
(lookup-words (concat (and interior-frag "*") word | |
(if (or interior-frag (null ispell-look-p)) | |
"*")) | |
ispell-complete-word-dict))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ext.add("goo.gl", function () { | |
let endpoint = "https://www.googleapis.com/urlshortener/v1/url"; | |
let params = { "longUrl": window._content.document.location.href }; | |
let result = util.httpPostJSON(endpoint, params, function (xhr) { | |
if (xhr.status == 200) { | |
var ret = JSON.parse(xhr.responseText); | |
command.setClipboardText(ret.id); | |
display.echoStatusBar("Short URL copied into clipboard: " + ret.id, 3000); | |
} else { | |
display.echoStatusBar("goo.gl service failed: " + xhr.statusText, 3000); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ext.add("open-extension-dialog", function(ev, arg) { | |
var wm = Components.classes['@mozilla.org/appshell/window-mediator;1'].getService(Components.interfaces.nsIWindowMediator); | |
OpenAddonsMgr = function(type, typeUrl) { | |
var extensionManager = wm.getMostRecentWindow("Extension:Manager"); | |
if (extensionManager) { | |
extensionManager.focus(); | |
extensionManager.showView(type); | |
} else { | |
var addonManager = wm.getMostRecentWindow("Addons:Manager"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun anything-goto-symbol () | |
"Show anything list, using current symbol as input to narrow the choices." | |
(interactive) | |
(anything | |
:prompt "Go to:" | |
:candidate-number-limit 10 | |
:input (thing-at-point 'symbol) | |
:sources | |
'( anything-c-source-imenu | |
anything-c-source-browse-code |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; use `frame-bufs.el' to mimic perspective feature | |
(idle-require 'frame-bufs) | |
(defun frame-bufs-switch-buffer () | |
"Switch buffer, within buffers associated with current frame (`frame-bufs-buffer-list')" | |
(interactive) | |
(if (and (fboundp 'frame-bufs-mode) | |
frame-bufs-mode) | |
(let* ( (buffers (mapcar 'buffer-name (frame-bufs-buffer-list (selected-frame)))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global-bind-key beginning-of-line "home" | |
global-bind-key end-of-line "end" | |
;!force exec-file "msshift" | |
set-variable %cygwin-path "e:/cygwin2" | |
;!force exec-file "win32" | |
set-variable $INFOPATH &cat %cygwin-path "/usr/share/info" | |
;; Emacs-like imenu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// let `tabbundle' only snapshot tabs in current group | |
// put these code into: | |
// extensions\[email protected]\chrome\content\tabundle.js | |
Tabundle.bundle = function() { | |
Tabundle.createIndexHtml() | |
//var path = Tabundle.createListHtml() | |
var path = Tabundle.createGroupListHtml(); | |
if (path) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
key.setGlobalKey(['C-x', '0'], function (ev, arg) { | |
SplitBrowser.activeBrowserCloseWindow(); | |
}, '現在のフレームを閉じる'); | |
key.setGlobalKey(['C-x', '1'], function (ev, arg) { | |
var url = SplitBrowser.activeBrowser != gBrowser ? SplitBrowser.activeSubBrowser.src : null; | |
var browsers = SplitBrowser.browsers; | |
for (var i = 0; i < browsers.length; ++i) | |
browsers[i].close(); |
OlderNewer