diff options
author | anekos | 2010-03-28 14:21:17 +0000 |
---|---|---|
committer | anekos | 2010-03-28 14:21:17 +0000 |
commit | 46fa6d14e2e7ea4f9e7191ab8cc17863976088a3 (patch) | |
tree | be5cbe53a0caf114604ed147e17c3e617d5fc533 | |
parent | 70e41a3651f052b38c488d306ef3c2780b747cd3 (diff) | |
download | vimperator-plugins-46fa6d14e2e7ea4f9e7191ab8cc17863976088a3.tar.bz2 |
存在しないバージョンを考慮
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@37119 d0d07461-0603-4401-acd4-de1884942a52
-rw-r--r-- | PMWriter.js | 9 |
1 files changed, 8 insertions, 1 deletions
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 += <> <dt>{'for ' + ver}</dt> - <a href={url} class="coderepos" target="_blank">{url}</a> + {file.exists() ? <a href={url} class="coderepos" target="_blank">{url}</a> : <>not supported</>} </>; }); |