diff options
author | anekos | 2010-04-07 16:57:49 +0000 |
---|---|---|
committer | anekos | 2010-04-07 16:57:49 +0000 |
commit | 92e4ae2c78ea26188c4c22958bcb34b1b59d9dfa (patch) | |
tree | 10988e3b43406eddf0ca4ec41c30e805c77126d8 /maine_coon.js | |
parent | 6e887bd289f82af1a56c931eedbeec2371625797 (diff) | |
download | vimperator-plugins-92e4ae2c78ea26188c4c22958bcb34b1b59d9dfa.tar.bz2 |
libly の around を使うようにした
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@37170 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'maine_coon.js')
-rw-r--r-- | maine_coon.js | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/maine_coon.js b/maine_coon.js index 5d81dc4..1863271 100644 --- a/maine_coon.js +++ b/maine_coon.js @@ -38,7 +38,7 @@ let PLUGIN_INFO = <name lang="ja">メインクーン</name> <description>Make the screen larger</description> <description lang="ja">なるべくでかい画面で使えるように</description> - <version>2.4.2</version> + <version>2.4.3</version> <author mail="anekos@snca.net" homepage="http://d.hatena.ne.jp/nokturnalmortum/">anekos</author> <minVersion>2.3</minVersion> <maxVersion>2.3</maxVersion> @@ -178,15 +178,6 @@ let elemStyle = let mainWindow = document.getElementById('main-window'); let messageBox = document.getElementById('liberator-message'); - function around (obj, name, func) { - let next = obj[name]; - obj[name] = function () - let (self = this, args = arguments) - func.call(self, - function () next.apply(self, args), - args); - } - function s2b (s, d) !!((!/^(\d+|false)$/i.test(s)|parseInt(s)|!!d*2)&1<<!s); function hideTargets (hide) { @@ -388,24 +379,24 @@ let elemStyle = }); } - around(commandline, 'input', function (next, args) { + U.around(commandline, 'input', function (next, args) { let result = next(); inputting = true; return result; }); - around(commandline, 'open', function (next, args) { + U.around(commandline, 'open', function (next, args) { messageBox.collapsed = false; return next(); }); - around(commandline, 'close', function (next, args) { + U.around(commandline, 'close', function (next, args) { if (autoHideCommandLine && !inputting) messageBox.collapsed = true; return next(); }); - around(commandline._callbacks.submit, modes.EX, function (next, args) { + U.around(commandline._callbacks.submit, modes.EX, function (next, args) { let r = next(); if (autoHideCommandLine && !inputting && !(modes.extended & modes.OUTPUT_MULTILINE)) commandline.close(); @@ -413,8 +404,8 @@ let elemStyle = }); let (callback = function (next) (inputting = false, next())) { - around(commandline._callbacks.submit, modes.PROMPT, callback); - around(commandline._callbacks.cancel, modes.PROMPT, callback); + U.around(commandline._callbacks.submit, modes.PROMPT, callback); + U.around(commandline._callbacks.cancel, modes.PROMPT, callback); } options.add( |