为isspeech创建一个Send-to钩子


Creating a Send-to Hook for iSpeech

我经常使用iSpeech http://www.ispeech.org,我想知道你的向导是否可以创建一个bookmarklet,脚本或插件,用于自动将剪贴板或所选文本发送到iSpeech http://www.ispeech.org/convert.text.php或提供其他脚本,插件,具有类似功能的bookmarklet的一些示例,以便我可以自己创建。

用法示例:

选择文本>右键单击>发送到isspeech选择文本>单击Bookmarklet>发送到isspeech

看起来他们也有API http://www.ispeech.org/api

  • 注意:恐怕我缺少必要的在这个网站上搜索词汇例如,如果有什么这已经在这里了-请张贴。请随意编辑标签,标题和内容的清晰度,如果你明白我的意思吧!

更新:我已经非常接近了。我想我可以使用firefox内置的搜索插件UI来实现这个目的。

下面是一个链接的例子:

http://www.ispeech.org/convert.text.php?type=text&声音= usenglishmale2& voiceSpeed = 0,文本=输入+文字+ + +说话

现在,我所要做的就是把它格式化为一个搜索插件,它应该会有效果的。

接近,但没有雪茄。搜索插件UI传递的{searchTerms}似乎有字符限制。

<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/">
<ShortName>iSheech</ShortName>
<Description>iSpeech Convert Text</Description>
<InputEncoding>UTF-8</InputEncoding>
<Image width="16" height="16"></Image>
<Url type="application/x-suggestions+json" method="GET"
     template="http://www.ispeech.org/convert.text.php={searchTerms}" />
<Url type="text/html" method="GET" template="http://www.ispeech.org/convert.text.php?type=text&voice=usenglishmale2&voiceSpeed=0&={searchTerms}">
  <Param name="text" value="{searchTerms}"/>
</Url>
<SearchForm>http://www.ispeech.org/convert.text.php</SearchForm>
</SearchPlugin>

使用bookmarklet进行排序:

javascript:q%20=%20""%20+%20(window.getSelection%20?%20window.getSelection()%20:%20document.getSelection%20?%20document.getSelection()%20:%20document.selection.createRange().text);%20if%20(!q)%20q%20=%20prompt("You%20didn't%20select%20any%20text.%20%20Enter%20a%20search%20phrase:",%20"");%20if%20(q!=null)%20location="http://www.ispeech.org/convert.text.php?type=text&voice=usenglishmale2&voiceSpeed=0&text="%20+%20escape(q).replace(/%20/g,%20"+");%20void%200