From db24ae5afa00146ae709a44a28a65adf400f1aa8 Mon Sep 17 00:00:00 2001 From: anekos Date: Mon, 2 Nov 2009 10:00:42 +0000 Subject: Follow HEAD (2.3pre) git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@35833 d0d07461-0603-4401-acd4-de1884942a52 --- PMWriter.js | 2 +- _libly.js | 8 ++++---- appendAnchor.js | 2 +- auto_reload.js | 10 +++++----- blinkelement.js | 10 ++++++---- bufferecho.js | 2 +- char-hints-mod2.js | 2 +- fetchyoutube.js | 8 ++++---- gvimail.js | 6 +++--- hatenaStar.js | 8 ++++---- highlight.js | 4 ++-- imageextender.js | 8 ++++---- inspector.js | 8 ++++---- matanico.js | 8 ++++---- mkcolor.js | 8 ++++---- nnp_cooperation.js | 2 +- pluginManager.js | 10 +++++----- reveal-ie-ctrl-a-images.js | 8 ++++---- scenario-actor.js | 6 +++--- stella.js | 2 +- takahashiPresentation.js | 12 ++++++------ xpathBlink.js | 8 ++++---- 22 files changed, 72 insertions(+), 70 deletions(-) diff --git a/PMWriter.js b/PMWriter.js index 2891fed..9b65d5c 100644 --- a/PMWriter.js +++ b/PMWriter.js @@ -140,7 +140,7 @@ name: function () {otags.name.apply(otags, arguments)} }; - let files = io.readDirectory(pluginDirPath); + let files = io.File(pluginDirPath).readDirectory(); let indexHtml = <>; let allHtml = <>; let pminfos = []; diff --git a/_libly.js b/_libly.js index 6d547a8..f5cc789 100755 --- a/_libly.js +++ b/_libly.js @@ -12,9 +12,9 @@ var PLUGIN_INFO = 適当なライブラリっぽいものたち。 suVene MIT - 0.1.24 - 1.2 - 2.0pre + 0.1.25 + 2.3pre + 2.3pre http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk/_libly.js 自動リロード Watch local file, and automatically reload current page when the file is modified. ローカルのファイルを監視して、現在のページをリロードする - 1.0.0 + 1.0.1 anekos new BSD License (Please read the source code comments of this plugin) 修正BSDライセンス (ソースコードのコメントを参照してください) - 2.0pre - 2.0pre + 2.3pre + 2.3pre @@ -68,13 +68,13 @@ let PLUGIN_INFO = let func = reload = function () tabs.reload(tab); let time = parseInt(parseFloat(args[0] || 1) * 1000); - let (file = io.getFile(args.string)) { + let (file = io.File(args.string)) { if (file.exists() && file.isFile()) { let filepath = file.path; storage.lastModifiedTime = file.lastModifiedTime; time = 200; func = function () { - let file = io.getFile(filepath); + let file = io.File(filepath); let mt = file.lastModifiedTime; if (storage.lastModifiedTime == mt) return; diff --git a/blinkelement.js b/blinkelement.js index 81b379e..af9ca75 100644 --- a/blinkelement.js +++ b/blinkelement.js @@ -4,8 +4,8 @@ * @description blink specified elements. * @description-ja 指定した要素を点滅させる。 * @author janus_wel - * @version 0.31 - * @minversion 2.0pre 2008/10/16 + * @version 0.32 + * @minversion 2.3pre 2009/11/02 * ==/VimperatorPlugin== * * LICENSE @@ -34,7 +34,7 @@ * let blink_element_opacity='0.7' * * :bl content.document.getElementsByTagName('A'); - * :bl buffer.evaluateXPath('//a'); + * :bl util.evaluateXPath('//a'); * :nobl * */ @@ -98,8 +98,10 @@ commands.addUserCommand( } }, { + literal: 0, completer: function (filter) completion.javascript(filter), - } + }, + true ); commands.addUserCommand( diff --git a/bufferecho.js b/bufferecho.js index 641053f..10f48e9 100644 --- a/bufferecho.js +++ b/bufferecho.js @@ -28,7 +28,7 @@ commands.addUserCommand(['bufferecho','becho'],'Display results of JavaScript to ); var manager = { append: function(htmlString){ - var body = buffer.evaluateXPath('/html/body').snapshotItem(0); + var body = util.evaluateXPath('/html/body').snapshotItem(0); body.innerHTML += htmlString; }, open: function(str, forceNewTab) { diff --git a/char-hints-mod2.js b/char-hints-mod2.js index 880ca5f..ead68a6 100644 --- a/char-hints-mod2.js +++ b/char-hints-mod2.js @@ -125,7 +125,7 @@ let g:hintlabeling: { let hints = []; (function (win) { - let elems = [elem for(elem in buffer.evaluateXPath('//*[@liberator:highlight="Hint" and @number]', win.document))]; + let elems = [elem for(elem in util.evaluateXPath('//*[@liberator:highlight="Hint" and @number]', win.document))]; hints = hints.concat(elems); Array.forEach(win.frames, arguments.callee); })(win); diff --git a/fetchyoutube.js b/fetchyoutube.js index 8d77f06..a19c823 100644 --- a/fetchyoutube.js +++ b/fetchyoutube.js @@ -2,10 +2,10 @@ // @name Fetch YouTube Video // @description Fetch YouTube Video (fmt=22) // @license Creative Commons 2.1 (Attribution + Share Alike) -// @version 1.1 +// @version 1.1.1 // @author anekos (anekos@snca.net) -// @minVersion 2.0pre -// @maxVersion 2.0pre +// @minVersion 2.3pre +// @maxVersion 2.3pre // ==/VimperatorPlugin== // // Usage: @@ -54,7 +54,7 @@ let file; if (filepath) { - file = io.getFile(io.expandPath(filepath)); + file = io.File(io.expandPath(filepath)); } else { file = dm.userDownloadsDirectory; } diff --git a/gvimail.js b/gvimail.js index 49a8826..c3b7658 100644 --- a/gvimail.js +++ b/gvimail.js @@ -5,7 +5,7 @@ * @description Make Gmail behave like Vim * @author Mahefa Randimbisoa (DotMG) * @license GPL 2.0 - * @requires Vimperator 0.6pre, Gmail v1 or v2 + * @requires Vimperator 2.3pre * @url http://code.google.com/p/gvimail/ * @version 0.1 * ==/VimperatorPlugin== @@ -36,7 +36,7 @@ if (canvas_frame) return (canvas_frame); if (use_gmail_v1) {// On older versions of Gmail, The main canvas is the iframe that has the attribute left: 0pt - return (buffer.evaluateXPath('//iframe[contains(@style, "left: 0pt")]', window.content.frames[0].document, null, true).iterateNext()); + return (util.evaluateXPath('//iframe[contains(@style, "left: 0pt")]', window.content.frames[0].document, null, true).iterateNext()); } return null; }, @@ -44,7 +44,7 @@ /// or a part of the src attribute of the img element (for Gmail v1) clickImage : function (classnamev2, imgsrcv1) { - var elem = buffer.evaluateXPath('//*[contains(concat(" ", @class, " "), " '+classnamev2+' ")] | //img[contains(@src, "'+imgsrcv1+'")]', GViMail.getMainCanvas().contentDocument, null, true).iterateNext(); + var elem = util.evaluateXPath('//*[contains(concat(" ", @class, " "), " '+classnamev2+' ")] | //img[contains(@src, "'+imgsrcv1+'")]', GViMail.getMainCanvas().contentDocument, null, true).iterateNext(); // hmm, the code below generates a log: Invalid argument for followLink. buffer.followLink(elem, liberator.CURRENT_TAB); }, diff --git a/hatenaStar.js b/hatenaStar.js index a5e0714..1d07ac1 100644 --- a/hatenaStar.js +++ b/hatenaStar.js @@ -4,9 +4,9 @@ var PLUGIN_INFO = Add Hatena Star. はてなスターをつける。 mattn - 0.1.2 - 2.2pre - 2.2pre + 0.1.3 + 2.3pre + 2.3pre http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk/hatenaStar.js ; (function() { @@ -60,7 +60,7 @@ liberator.modules.commands.addUserCommand(['hatenastar', 'hatenas'], 'add Hatena function (args) { try { var arg = args.string; - let result = buffer.evaluateXPath(StarXPath); + let result = util.evaluateXPath(StarXPath); let m = arg.match(/^(\d+)\?$/); if (m) { blink(result.snapshotItem(Number(m[1])-1)); diff --git a/highlight.js b/highlight.js index 60dda04..56dd61c 100644 --- a/highlight.js +++ b/highlight.js @@ -4,8 +4,8 @@ * @description Factory for the object to highlight specified element[s]. this set in plugins.highlighterFactory. * @description-ja 指定した要素をハイライトするオブジェクトを返す Factory 。 plugins.highlighterFactory に構築される。 * @author janus_wel - * @version 0.11 - * @minversion 2.0pre 2008/10/16 + * @version 0.12 + * @minversion 2.3pre 2009/11/02 * ==/VimperatorPlugin== * * LICENSE diff --git a/imageextender.js b/imageextender.js index d8c0189..d9078b8 100644 --- a/imageextender.js +++ b/imageextender.js @@ -39,9 +39,9 @@ let PLUGIN_INFO = 画像操作特集。 janus_wel New BSD License - 0.20 - 2.0 - 2.1pre + 0.21 + 2.3pre + 2.3pre DOM Inspector command DOM Inspector teramako -0.2 -2.0pre -2.0 +0.3 +2.3pre +2.3pre 今見ている動画 / 検索結果の情報を Twitter に投稿する。 janus_wel New BSD License -0.71 -2.0pre -2.0pre +0.72 +2.3pre +2.3pre http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk/matanico.js mkcolor Write current highlights to the specified file. 現在のHighlightを指定のファイルに書き出す。 - 1.0.1 + 1.0.2 anekos new BSD License (Please read the source code comments of this plugin) 修正BSDライセンス (ソースコードのコメントを参照してください) http://coderepos.org/share/export/27234/lang/javascript/vimperator-plugins/trunk/mkcolor.js - 2.0pre - 2.0pre + 2.3pre + 2.3pre @@ -78,7 +78,7 @@ let PLUGIN_INFO = 'Write current highlights to the specified file', function (args) { let filename = args[0]; - let file = io.getFile(filename); + let file = io.File(filename); if (file.exists() && !args.bang) return liberator.echoerr(filename + ' already exists (add ! to override)'); io.writeFile(file, getcolor()); diff --git a/nnp_cooperation.js b/nnp_cooperation.js index c03273e..ea96aac 100644 --- a/nnp_cooperation.js +++ b/nnp_cooperation.js @@ -108,7 +108,7 @@ liberator.modules.commands.addUserCommand( } // check existence of items in NicoNicoPlaylist - let nodes = buffer.evaluateXPath( + let nodes = util.evaluateXPath( 'id("' + playlistNode.id + '")/div[contains(concat(" ", @class, " "), " playlist-list-outer ")]/ul/li/a' ); let nodesLength = nodes.snapshotLength; diff --git a/pluginManager.js b/pluginManager.js index 8069b6f..b7e07cc 100644 --- a/pluginManager.js +++ b/pluginManager.js @@ -4,9 +4,9 @@ var PLUGIN_INFO = Manage Vimperator Plugins Vimpeatorプラグインの管理 teramako -0.6.3 -2.0pre -2.0pre +0.6.4 +2.3pre +2.3pre http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk/pluginManager.js source is null.'; @@ -994,7 +994,7 @@ var public = { const npi = /\/(all|index)\.html/; const js = /\.js$/i; function xe(xpath){ - let ss = buffer.evaluateXPath(xpath); + let ss = util.evaluateXPath(xpath); return (ss.snapshotLength > 0) && ss.snapshotItem(0).href; } if (cr.test(url)) { diff --git a/reveal-ie-ctrl-a-images.js b/reveal-ie-ctrl-a-images.js index 40f4268..01d8af1 100644 --- a/reveal-ie-ctrl-a-images.js +++ b/reveal-ie-ctrl-a-images.js @@ -38,13 +38,13 @@ let PLUGIN_INFO = Reveal Image Reveal IE Ctrl-A images. IE の Ctrl-A 画像を暴く - 1.0.3 + 1.0.4 anekos new BSD License (Please read the source code comments of this plugin) 修正BSDライセンス (ソースコードのコメントを参照してください) http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk/reveal-ie-ctrl-a-images.js - 2.0pre - 2.0 + 2.3pre + 2.3pre {NAME} browser act scenario semi-automatic. hogelog - 0.0.6 - 2.0a2 + 0.0.7 + 2.3pre http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk/scenario-actor.js {NAME} simple takahashi-method presentation tool hogelog - 0.1 - 2.0a1 - 2.0a1 + 0.1.1 + 2.3pre + 2.3pre http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk/takahashiPresentation.js 2008/12/23 09:20:07 teramako DOM Inspector MPL 1.1 -1.0 -1.2 -2.0 +1.0.1 +2.3pre +2.3pre http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk/xpathBlink.js