aboutsummaryrefslogtreecommitdiffstats
path: root/tabmixplus.js
diff options
context:
space:
mode:
authorhogelog2010-01-25 14:35:12 +0000
committerhogelog2010-01-25 14:35:12 +0000
commit958913f435879187a6e0be2256f312fae997f4f8 (patch)
tree43e5f1f2241932309d244c577d340b9164e73f71 /tabmixplus.js
parentaa298f73ba1c5c181bb20c1e670c13b7f4dcf598 (diff)
downloadvimperator-plugins-958913f435879187a6e0be2256f312fae997f4f8.tar.bz2
* rename tabcommands.js -> tabmixplus.js
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@36532 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'tabmixplus.js')
-rw-r--r--tabmixplus.js59
1 files changed, 59 insertions, 0 deletions
diff --git a/tabmixplus.js b/tabmixplus.js
new file mode 100644
index 0000000..9321401
--- /dev/null
+++ b/tabmixplus.js
@@ -0,0 +1,59 @@
+// PLUGIN_INFO//{{{
+var PLUGIN_INFO =
+<VimperatorPlugin>
+ <name>{NAME}</name>
+ <description>add some tabmixplus commands</description>
+ <author mail="konbu.komuro@gmail.com" homepage="http://d.hatena.ne.jp/hogelog/">hogelog</author>
+ <version>0.0.1</version>
+ <minVersion>2.2</minVersion>
+ <maxVersion>2.2</maxVersion>
+ <updateURL>http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk/tabmixplus.js</updateURL>
+ <detail><![CDATA[
+== COMMANDS ==
+dup[licate]:
+ duplicate current tab
+ren[ame]:
+ rename current tab
+freeze:
+ freeze (protect&lock) current tab
+protect:
+ protect current tab
+lock:
+ lock current tab
+
+]]></detail>
+</VimperatorPlugin>;
+//}}}
+(function(){
+commands.add(["dup[licate]"], "duplicate current tab", function(args) {
+ gBrowser.duplicateTab(gBrowser.mCurrentTab);
+});
+commands.add(["ren[ame]"], "rename current tab", function(args) {
+ gBrowser.renameTab(gBrowser.mCurrentTab);
+});
+commands.add(["freeze"], "freeze current tab", function(args) {
+ let protect = gBrowser.mCurrentTab.hasAttribute("protected");
+ let lock = gBrowser.mCurrentTab.hasAttribute("locked");
+ if (protect && lock) {
+ gBrowser.mCurrentTab.removeAttribute("protected");
+ gBrowser.mCurrentTab.removeAttribute("locked");
+ } else
+ gBrowser.freezeTab(gBrowser.mCurrentTab);
+});
+commands.add(["protect"], "protect current tab", function(args) {
+ let protect = gBrowser.mCurrentTab.hasAttribute("protected");
+ if (protect)
+ gBrowser.mCurrentTab.removeAttribute("protected");
+ else
+ gBrowser.mCurrentTab.setAttribute("protected", true);
+});
+commands.add(["lock"], "lock current tab", function(args) {
+ let lock = gBrowser.mCurrentTab.hasAttribute("locked");
+ if (lock)
+ gBrowser.mCurrentTab.removeAttribute("locked");
+ else
+ gBrowser.mCurrentTab.setAttribute("locked", true);
+});
+
+})();
+// vim: fdm=marker sw=4 ts=4 et: