From 46fa6d14e2e7ea4f9e7191ab8cc17863976088a3 Mon Sep 17 00:00:00 2001 From: anekos Date: Sun, 28 Mar 2010 14:21:17 +0000 Subject: 存在しないバージョンを考慮 git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@37119 d0d07461-0603-4401-acd4-de1884942a52 --- PMWriter.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'PMWriter.js') diff --git a/PMWriter.js b/PMWriter.js index 8332393..5cc7948 100644 --- a/PMWriter.js +++ b/PMWriter.js @@ -3,6 +3,8 @@ * さわるなきけん! * DO NOT USE! * このコードを読むと失明する場合があります。 + * + * for 2.2 * */ @@ -11,6 +13,7 @@ const U = liberator.plugins.libly.$U; let pluginDirPath = liberator.globalVariables.pmwriter_plugin_dir; + let pluginRootDirPath = io.File(pluginDirPath).parent.path; let outputDir = liberator.globalVariables.pmwriter_output_dir; const VERSIONS = '2.2 2.1 2.0 1.2'.split(/\s+/); @@ -237,10 +240,14 @@ VERSIONS.forEach(function (ver) { let url = CodeReposBranch + ver + '/' + pluginFilename; + let file = io.File(pluginRootDirPath); + file.append('branches'); + file.append(ver); + file.append(pluginFilename); versionsBody += <>
{'for ' + ver}
- {url} + {file.exists() ? {url} : <>not supported} ; }); -- cgit v1.2.3