Created
November 17, 2015 00:56
-
-
Save wisq/521731c3395810cb23db to your computer and use it in GitHub Desktop.
Multifox .vimperatorrc snippet
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
command! home js set_multifox_profile("3"); | |
command! work js set_multifox_profile("2"); | |
" Get the multifox version hash by looking inside the multifox XPI file. | |
" (Look at the hash it uses in its own imports.) | |
:js << EOF | |
Components.utils.import("resource://multifox-88f97b0/commands.js"); | |
function set_multifox_profile(id) { | |
event = { | |
target: { | |
ownerDocument: {defaultView: {top: window}}, | |
hasAttribute: function(name) { return name == "profile-id" }, | |
getAttribute: function(name) { return id }, | |
} | |
}; | |
windowCommand(event, "cmd_select_profile"); | |
} | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment