aboutsummaryrefslogtreecommitdiffstats
path: root/_libly.js
diff options
context:
space:
mode:
authoranekos2010-03-01 12:23:13 +0000
committeranekos2010-03-01 12:23:13 +0000
commit5468b2b3c060a538f92999dcb0a46bccf1f9cee0 (patch)
tree60e9918aeebc33eb75a0788ca53de96abf61e56b /_libly.js
parent8d09e455b73baa731177ba9f7d0386eb1dd6ad67 (diff)
downloadvimperator-plugins-5468b2b3c060a538f92999dcb0a46bccf1f9cee0.tar.bz2
プラグインパスが見つからない場合は、echoerr した上で続行するようにした
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@36890 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to '_libly.js')
-rwxr-xr-x_libly.js34
1 files changed, 18 insertions, 16 deletions
diff --git a/_libly.js b/_libly.js
index 11d3fa8..a966b78 100755
--- a/_libly.js
+++ b/_libly.js
@@ -12,7 +12,7 @@ var PLUGIN_INFO =
<description lang="ja">適当なライブラリっぽいものたち。</description>
<author mail="suvene@zeromemory.info" homepage="http://zeromemory.sblo.jp/">suVene</author>
<license>MIT</license>
- <version>0.1.30</version>
+ <version>0.1.31</version>
<minVersion>2.3pre</minVersion>
<maxVersion>2.3pre</maxVersion>
<updateURL>http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk/_libly.js</updateURL>
@@ -252,21 +252,23 @@ libly.$U = {//{{{
let restore = function () obj[name] = original;
if (autoRestore) {
let pluginPath = getPluginPath();
- if (!pluginPath)
- throw 'getPluginPath failed';
- restores[pluginPath] =
- (restores[pluginPath] || []).filter(
- function (res) (
- res.object != obj ||
- res.name != name ||
- (res.restore() && false)
- )
- );
- restores[pluginPath].push({
- object: obj,
- name: name,
- restore: restore
- });
+ if (pluginPath) {
+ restores[pluginPath] =
+ (restores[pluginPath] || []).filter(
+ function (res) (
+ res.object != obj ||
+ res.name != name ||
+ (res.restore() && false)
+ )
+ );
+ restores[pluginPath].push({
+ object: obj,
+ name: name,
+ restore: restore
+ });
+ } else {
+ liberator.echoerr('getPluginPath failed');
+ }
}
original = obj[name];
let current = obj[name] = function () {