/* * LICENSE * New BSD License: http://opensource.org/licenses/bsd-license.php * * Copyright (c) 2008-2009, janus_wel * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * Neither the name of the nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ let PLUGIN_INFO = {NAME} extend image operation. 画像操作特集。 janus_wel New BSD License 0.21 2.3pre 2.3pre || image_extender_yank_key='g' image_extender_save_key='e' image_skip_prompt='true' ||< In this settings, ';g' start extended-hints mode to yank image URL. ';e' start it to save image, and prompt is not displayed at save operation. ]]> var PLUGIN_INFO = <VimperatorPlugin> <name>{NAME}</name> <description>Clear highlight or highlight keywords in Hatena Services.</description> <description lang="ja">はてなダイアリーやグループでハイライトを消したり付けたりできます</description> <minVersion>2.1a1pre</minVersion> <maxVersion>2.1a1pre</maxVersion> <updateURL>http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk/hatena_highlight.js</updateURL> <author mail="masa138@gmail.com" homepage="http://www.hatena.ne.jp/masa138/">Masayuki KIMURA</author> <version>0.1</version> <detail><![CDATA[ == Commands == :nohatenahighlight ハイライトを無効にします :hatenahighlight ハイライトを有効にします == Examples == Google で検索してはてなにアクセスしたときにハイライトを非表示にしたい場合は .vimperatrrc に以下のような記述をすると非表示になります >|| :autocmd PageLoad 'd\.hatena\.ne\.jp' :nohatenahighlight :autocmd PageLoad 'g\.hatena\.ne\.jp' :nohatenahighlight ||< ]]></detail> </VimperatorPlugin>; (function(){ function toggleHighlight(isClear) { var elements = window.content.document.getElementsByTagName('span'); var highlight = 'highlight'; var clear = '_no_highlight_'; for (var i = 0, length = elements.length; i < length; i++) { var element = elements[i]; if (isClear) { if (element.className == highlight) { element.className = clear; } } else { if (element.className == clear) { element.className = highlight; } } } } commands.addUserCommand(["nohatenahighlight"], "Clear Highlight", function() { toggleHighlight(true); } ); commands.addUserCommand(["hatenahighlight"], "Highlight", function() { toggleHighlight(false); } ); })(); // vim:sw=4 ts=4 et: