Changeset 29386

Show
Ignore:
Timestamp:
02/01/09 19:45:52 (4 years ago)
Author:
anekos
Message:

PLUGIN_INFO 対応

Location:
lang/javascript/vimperator-plugins/trunk
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • lang/javascript/vimperator-plugins/trunk/asdfghjkl.js

    r26323 r29386  
    1 // ==VimperatorPlugin== 
    2 // @name           asdfghjkl; 
    3 // @description    Inputting numbers by asdfghjkl; keys in hint mode. 
    4 // @description-ja Hintモードで、asdfghjkl;キーを使って数字入力をする。 
    5 // @license        Creative Commons 2.1 (Attribution + Share Alike) 
    6 // @version        1.4 
    7 // @minVersion     2.0pre 
    8 // @maxVersion     2.0pre 
    9 // @author         anekos (anekos@snca.net) 
    10 // ==/VimperatorPlugin== 
    11 // 
    12 // Usage: 
    13 //  In hint-mode, When press <Space>, enter into asdfghjkl; mode. 
    14 //  (If you want to leave this mode, re-press <Space>) 
    15 // 
    16 //  You can change the keybind for enter into asdfghjkl like below: 
    17 //    let g:asdfghjkl_mode_change_key = "<C-c>" 
    18 // 
    19 //  You can also change the keys for inputting numbers like below: 
    20 //    let g:asdfghjkl_hintchars = "/zxcvbnm,." 
    21 // 
    22 //  Note that the numbers 0-9 are corresponding to 
    23 //  characters from the left side to the right side of the string. 
    24 // 
    25 // Usage-ja: 
    26 //  ヒントモードで、<Space> を押すと asdfghjkl; モード(?)に入ります。 
    27 //  出たい場合は、もう一度押します。 
    28 // 
    29 //  切り替えキーを変更したい場合は、以下のように設定できます。 
    30 //    let g:asdfghjkl_mode_change_key = "<C-c>" 
    31 // 
    32 //  数字入力のためのキーは、以下のように変更出来ます。 
    33 //    let g:asdfghjkl_hintchars = "/zxcvbnm,." 
    34 //  それぞれの文字は左側から0-9の数字の入力に対応します。 
    35 // 
    36 // 
    37 // Links: 
    38 //  http://d.hatena.ne.jp/nokturnalmortum/20081021#1224543467 
    39 // 
     1/* {{{ 
     2Copyright (c) 2008, anekos. 
     3All rights reserved. 
     4 
     5Redistribution and use in source and binary forms, with or without modification, 
     6are permitted provided that the following conditions are met: 
     7 
     8    1. Redistributions of source code must retain the above copyright notice, 
     9       this list of conditions and the following disclaimer. 
     10    2. Redistributions in binary form must reproduce the above copyright notice, 
     11       this list of conditions and the following disclaimer in the documentation 
     12       and/or other materials provided with the distribution. 
     13    3. The names of the authors may not be used to endorse or promote products 
     14       derived from this software without specific prior written permission. 
     15 
     16THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
     17ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
     18WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
     19IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
     20INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
     21BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
     22DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
     23LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 
     24OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 
     25THE POSSIBILITY OF SUCH DAMAGE. 
     26 
     27 
     28################################################################################### 
     29# http://sourceforge.jp/projects/opensource/wiki/licenses%2Fnew_BSD_license       # 
     30# に参考になる日本語訳がありますが、有効なのは上記英文となります。                # 
     31################################################################################### 
     32 
     33}}} */ 
     34 
     35// PLUGIN_INFO {{{ 
     36let PLUGIN_INFO = 
     37<VimperatorPlugin> 
     38  <name>asdfghjkl;</name> 
     39  <description>Inputting numbers by asdfghjkl; keys in hint mode.</description> 
     40  <description lang="ja">Hintモードで、asdfghjkl;キーを使って数字入力をする。</description> 
     41  <version>1.4.1</version> 
     42  <author mail="anekos@snca.net" homepage="http://d.hatena.ne.jp/nokturnalmortum/">anekos</author> 
     43  <license>new BSD License (Please read the source code comments of this plugin)</license> 
     44  <license lang="ja">修正BSDライセンス (ソースコードのコメントを参照してください)</license> 
     45  <updateURL>http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk/asdfghjkl.js</updateURL> 
     46  <minVersion>2.0pre</minVersion> 
     47  <maxVersion>2.0pre</maxVersion> 
     48  <detail><![CDATA[ 
     49    == Usage == 
     50      In hint-mode, When press <Space>, enter into asdfghjkl; mode. 
     51      (If you want to leave this mode, re-press <Space>) 
     52 
     53      You can change the keybind for enter into asdfghjkl like below 
     54      >|| 
     55       let g:asdfghjkl_mode_change_key = "<C-c>" 
     56      ||< 
     57 
     58      You can also change the keys for inputting numbers like below 
     59      >|| 
     60       let g:asdfghjkl_hintchars = "/zxcvbnm,." 
     61      ||< 
     62 
     63     Note that the numbers 0-9 are corresponding to 
     64     characters from the left side to the right side of the string. 
     65 
     66    == Link == 
     67      http://d.hatena.ne.jp/nokturnalmortum/20081021#1224543467 
     68  ]]></detail> 
     69  <detail lang="ja"><![CDATA[ 
     70    == Usage-ja == 
     71      ヒントモードで、<Space> を押すと asdfghjkl; モード(?)に入ります。 
     72      出たい場合は、もう一度押します。 
     73 
     74      切り替えキーを変更したい場合は、以下のように設定できます。 
     75      >|| 
     76        let g:asdfghjkl_mode_change_key = "<C-c>" 
     77      ||< 
     78 
     79      数字入力のためのキーは、以下のように変更出来ます。 
     80      >|| 
     81        let g:asdfghjkl_hintchars = "/zxcvbnm,." 
     82      ||< 
     83     それぞれの文字は左側から0-9の数字の入力に対応します。 
     84 
     85    == Link == 
     86      http://d.hatena.ne.jp/nokturnalmortum/20081021#1224543467 
     87  ]]></detail> 
     88</VimperatorPlugin>; 
     89// }}} 
    4090 
    4191(function () { 
  • lang/javascript/vimperator-plugins/trunk/command_menu.js

    r24676 r29386  
    1 // ==VimperatorPlugin== 
    2 // @name           Command-MainMenu 
    3 // @description-ja メインメニューとツールバーをコマンドで実行できる 
    4 // @license        Creative Commons 2.1 (Attribution + Share Alike) 
    5 // @version        1.5 
    6 // @author         anekos (anekos@snca.net) 
    7 // ==/VimperatorPlugin== 
    8 // 
    9 // Usage: 
    10 //    :menu ツール-アドオン 
    11 //    :toolbar 戻る 
    12 //    のようにメニュー/ツールバーの"-"区切りのパスを渡すことで、メニュー/ツールバーをクリックします。 
    13 //    Migemo必須。 
    14 // 
    15 // TODO: 
    16 //    ・一度開かないと生成されないようなメニュー(ラベル)に対処できる魔法があったらいいな! 
    17 //     (ScrapBook / ブックマークメニュー) 
    18 //    ・コンテクストメニューがうまくいかない。 
    19 // 
    20 // License: 
    21 //    http://creativecommons.org/licenses/by-sa/2.1/jp/ 
    22 //    http://creativecommons.org/licenses/by-sa/2.1/jp/deed 
     1/* {{{ 
     2Copyright (c) 2008, anekos. 
     3All rights reserved. 
     4 
     5Redistribution and use in source and binary forms, with or without modification, 
     6are permitted provided that the following conditions are met: 
     7 
     8    1. Redistributions of source code must retain the above copyright notice, 
     9       this list of conditions and the following disclaimer. 
     10    2. Redistributions in binary form must reproduce the above copyright notice, 
     11       this list of conditions and the following disclaimer in the documentation 
     12       and/or other materials provided with the distribution. 
     13    3. The names of the authors may not be used to endorse or promote products 
     14       derived from this software without specific prior written permission. 
     15 
     16THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
     17ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
     18WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
     19IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
     20INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
     21BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
     22DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
     23LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 
     24OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 
     25THE POSSIBILITY OF SUCH DAMAGE. 
     26 
     27 
     28################################################################################### 
     29# http://sourceforge.jp/projects/opensource/wiki/licenses%2Fnew_BSD_license       # 
     30# に参考になる日本語訳がありますが、有効なのは上記英文となります。                # 
     31################################################################################### 
     32 
     33}}} */ 
     34 
     35// PLUGIN_INFO {{{ 
     36let PLUGIN_INFO = 
     37<VimperatorPlugin> 
     38  <name>Command-MainMenu</name> 
     39  <description>Execute main-menu and tool-bar by ex-command.</description> 
     40  <description lang="ja">メインメニューとツールバーをコマンドで実行できる</description> 
     41  <version>1.5.1</version> 
     42  <author mail="anekos@snca.net" homepage="http://d.hatena.ne.jp/nokturnalmortum/">anekos</author> 
     43  <license>new BSD License (Please read the source code comments of this plugin)</license> 
     44  <license lang="ja">修正BSDライセンス (ソースコードのコメントを参照してください)</license> 
     45  <updateURL>http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk/command_menu.js</updateURL> 
     46  <minVersion>2.0pre</minVersion> 
     47  <maxVersion>2.0pre</maxVersion> 
     48  <detail><![CDATA[ 
     49    == Usage == 
     50      >|| 
     51        :menu tools-addons 
     52        :toolbar back 
     53      ||< 
     54    == Requires == 
     55      XUL/Migemo addon 
     56  ]]></detail> 
     57  <detail lang="ja"><![CDATA[ 
     58    == Usage == 
     59      >|| 
     60        :menu ツール-アドオン 
     61        :toolbar 戻る 
     62      ||< 
     63      のようにメニュー/ツールバーの"-"区切りのパスを渡すことで、メニュー/ツールバーをクリックします。 
     64      Migemo必須。 
     65    == Requires == 
     66      XUL/Migemo アドオン 
     67  ]]></detail> 
     68</VimperatorPlugin>; 
     69// }}} 
     70 
     71// TODO == 
     72// ・一度開かないと生成されないようなメニュー(ラベル)に対処できる魔法があったらいいな! 
     73//  (ScrapBook / ブックマークメニュー) 
     74// ・コンテクストメニューがうまくいかない。 
    2375 
    2476(function () { 
  • lang/javascript/vimperator-plugins/trunk/echopy.js

    r23256 r29386  
    1 // ==VimperatorPlugin== 
    2 // @name           echopy 
    3 // @description    echo and copy 
    4 // @description-ja echo and copy 
    5 // @license        Creative Commons 2.1 (Attribution + Share Alike) 
    6 // @version        1.0 
    7 // @author         anekos (anekos@snca.net) 
    8 // @maxVersion     2.0pre 
    9 // @minVersion     2.0pre 
    10 // ==/VimperatorPlugin== 
    11 // 
    12 // Usage: 
    13 //    :echo <EXPRESSION> 
    14 //      echo with copy (to clipboard). 
    15 // 
    16 // Usage-ja: 
    17 //    :echo <EXPRESSION> 
    18 //      echo すると同時にクリップボードにコピー 
    19 // 
    20 // Links: 
    21 //    http://d.hatena.ne.jp/nokturnalmortum/20081111#1226414487 
     1/* {{{ 
     2Copyright (c) 2008, anekos. 
     3All rights reserved. 
     4 
     5Redistribution and use in source and binary forms, with or without modification, 
     6are permitted provided that the following conditions are met: 
     7 
     8    1. Redistributions of source code must retain the above copyright notice, 
     9       this list of conditions and the following disclaimer. 
     10    2. Redistributions in binary form must reproduce the above copyright notice, 
     11       this list of conditions and the following disclaimer in the documentation 
     12       and/or other materials provided with the distribution. 
     13    3. The names of the authors may not be used to endorse or promote products 
     14       derived from this software without specific prior written permission. 
     15 
     16THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
     17ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
     18WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
     19IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
     20INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
     21BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
     22DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
     23LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 
     24OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 
     25THE POSSIBILITY OF SUCH DAMAGE. 
     26 
     27 
     28################################################################################### 
     29# http://sourceforge.jp/projects/opensource/wiki/licenses%2Fnew_BSD_license       # 
     30# に参考になる日本語訳がありますが、有効なのは上記英文となります。                # 
     31################################################################################### 
     32 
     33}}} */ 
     34 
     35// PLUGIN_INFO {{{ 
     36let PLUGIN_INFO = 
     37<VimperatorPlugin> 
     38  <name>{NAME}</name> 
     39  <name lang="ja">{NAME}</name> 
     40  <description>Echo and Copy(to clipboard)</description> 
     41  <description lang="ja">echo しつつクリップボードにコピーできる様にする</description> 
     42  <version>1.0.1</version> 
     43  <author mail="anekos@snca.net" homepage="http://d.hatena.ne.jp/nokturnalmortum/">anekos</author> 
     44  <license>new BSD License (Please read the source code comments of this plugin)</license> 
     45  <license lang="ja">修正BSDライセンス (ソースコードのコメントを参照してください)</license> 
     46  <updateURL>http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk/echopy.js</updateURL> 
     47  <minVersion>2.0pre</minVersion> 
     48  <maxVersion>2.0pre</maxVersion> 
     49  <detail><![CDATA[ 
     50    == Usage == 
     51      :echo! <EXPRESSION>: 
     52        echo and copy (to clipboard). 
     53        When used without "!", "echo" does not copy to clipboard. 
     54    == Link == 
     55      http://d.hatena.ne.jp/nokturnalmortum/20081111#1226414487 
     56  ]]></detail> 
     57  <detail lang="ja"><![CDATA[ 
     58    == Usage == 
     59      :echo! <EXPRESSION>: 
     60        echo しつつクリップボードにコピー 
     61        "!" とつけない場合は、クリップボードにコピーされません。 
     62    == Link == 
     63      http://d.hatena.ne.jp/nokturnalmortum/20081111#1226414487 
     64  ]]></detail> 
     65</VimperatorPlugin>; 
     66// }}} 
    2267 
    2368(function () { 
    2469 
    25   function neko (obj, useColor) { 
    26     switch (typeof obj) { 
    27       case 'object': 
    28         return liberator.modules.util.objectToString(obj, useColor); 
    29       case 'function': 
    30         return liberator.modules.util.escapeHTML(obj.toString()); 
    31       case 'number': 
    32       case 'boolean': 
    33         return '' + obj; 
    34       case 'undefined': 
    35         return 'undefined'; 
     70  function ea2s (arg) { 
     71    if (!arg) 
     72      return ''; 
     73 
     74    let raw, res; 
     75    let value = liberator.eval(arg); 
     76 
     77    if (typeof value === 'object') { 
     78      res = util.objectToString(value, true); 
     79      raw = util.objectToString(value, false); 
     80    } else if (typeof value === 'function') { 
     81      raw = value.toString(); 
     82      res = <pre>{raw}</pre>; 
     83    } else if (typeof value === 'string' && /\n/.test(value)) { 
     84      raw = value; 
     85      res = <span highlight="CmdOutput">{value}</span>; 
     86    } else { 
     87      raw = res = String(value); 
    3688    } 
    37     return obj; 
     89 
     90    return [raw, res]; 
    3891  } 
    3992 
     
    4194  let original_action = echo.action; 
    4295 
    43   echo.action = function (arg, bang) { 
    44     if (bang) { 
    45       try { 
    46         if (arg.string == '') 
    47           return; 
    48         let obj = liberator.eval(arg.string); 
    49         liberator.echo(neko(obj, true)); 
    50         liberator.modules.util.copyToClipboard(neko(obj, false)); 
    51       } catch (e) { 
    52         liberator.echoerr(e); 
    53       } 
    54     } else { 
    55       original_action.apply(this, arguments); 
     96  echo.action = function (args) { 
     97    try { 
     98      if (args.string == '') 
     99        return; 
     100      let [raw, res] = ea2s(args.string); 
     101      commandline.echo(res, commandline.HL_NORMAL); 
     102      if (args.bang) 
     103        util.copyToClipboard(raw); 
     104    } catch (e) { 
     105      liberator.echoerr(e); 
    56106    } 
    57107  }; 
    58108  echo.bang = true; 
    59109 
    60  
    61110})(); 
  • lang/javascript/vimperator-plugins/trunk/garbage_finder.js

    r28273 r29386  
    3838  <name>Garbage Finder</name> 
    3939  <name lang="ja">ゴミ探し</name> 
    40   <description>Finds the taints in global(window object)</description> 
     40  <description>Find the taints in global(window object)</description> 
    4141  <description lang="ja">グローバル(window オブジェクト)の汚染を調べる</description> 
    4242  <version>1.0.2</version> 
     
    113113  commands.addUserCommand( 
    114114    ['garbages'], 
    115     'Displays garbages', 
     115    'Display garbages', 
    116116    function (args) { 
    117117      function makeLI (list) {