2020-05-09 14:42:57 +00:00
|
|
|
|
<!doctype html>
|
|
|
|
|
<html>
|
|
|
|
|
<head>
|
2020-04-29 08:37:43 +00:00
|
|
|
|
<meta charset="utf-8">
|
2020-05-09 14:42:57 +00:00
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
2020-04-29 08:37:43 +00:00
|
|
|
|
|
2022-10-31 07:44:05 +00:00
|
|
|
|
<link rel="stylesheet" href="../style.css" type="text/css" />
|
2020-09-17 04:22:44 +00:00
|
|
|
|
<title>操作选中(富)文本/元素</title>
|
2022-06-30 03:43:09 +00:00
|
|
|
|
<script type="text/javascript">
|
2022-07-12 02:24:02 +00:00
|
|
|
|
function findLang(){
|
2022-06-30 03:43:09 +00:00
|
|
|
|
let href = location.href;
|
|
|
|
|
for(let i=href.length-1;i>0;i--){
|
|
|
|
|
if('/'==href.charAt(i) && '/'==href.charAt(i-3))
|
2022-07-12 02:24:02 +00:00
|
|
|
|
return i;
|
2022-06-30 03:43:09 +00:00
|
|
|
|
}
|
2022-07-12 02:24:02 +00:00
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
function nav2(page){
|
|
|
|
|
let i = findLang();
|
|
|
|
|
location.href = location.href.substring(0,i+1)+page;
|
|
|
|
|
}
|
|
|
|
|
function nav2Lang(lang){
|
|
|
|
|
let i = findLang();
|
|
|
|
|
let href = location.href;
|
|
|
|
|
location.href = location.href.substring(0,i-2)+lang+location.href.substring(i);
|
2022-06-30 03:43:09 +00:00
|
|
|
|
}
|
|
|
|
|
</script>
|
2020-05-09 14:42:57 +00:00
|
|
|
|
</head>
|
|
|
|
|
<body>
|
|
|
|
|
<header class='header'>
|
2022-06-30 03:43:09 +00:00
|
|
|
|
<a class="logo" href="javascript:void(0)" onclick="return nav2('index.html')">Home</a> <a class="logo" href="javascript:void(0)" onclick="return nav2('tags/index.html')">Tags</a>
|
2022-07-12 02:24:02 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a class="logo" href="javascript:void(0)" onclick="return nav2Lang('en')">English</a>
|
|
|
|
|
|
|
|
|
|
|
2020-05-09 14:42:57 +00:00
|
|
|
|
<nav>
|
|
|
|
|
</nav>
|
|
|
|
|
</header>
|
2020-08-29 00:42:46 +00:00
|
|
|
|
<br />
|
2020-04-29 08:37:43 +00:00
|
|
|
|
|
2020-05-09 14:42:57 +00:00
|
|
|
|
<div class="container">
|
2020-09-17 04:22:44 +00:00
|
|
|
|
<h1 class="title">操作选中(富)文本/元素
|
2020-05-09 14:42:57 +00:00
|
|
|
|
<br>
|
|
|
|
|
<span class="subtitle"></span>
|
|
|
|
|
</h1>
|
|
|
|
|
<ul class="tags">
|
2020-04-29 08:37:43 +00:00
|
|
|
|
|
2020-10-08 07:39:48 +00:00
|
|
|
|
<li><a href="../tags/termux">termux</a> </li>
|
2020-04-29 08:37:43 +00:00
|
|
|
|
|
2020-10-08 07:39:48 +00:00
|
|
|
|
<li><a href="../tags/ssh">ssh</a> </li>
|
2020-05-09 14:42:57 +00:00
|
|
|
|
|
2020-10-08 07:39:48 +00:00
|
|
|
|
<li><a href="../tags/PC">PC</a> </li>
|
2020-05-09 14:42:57 +00:00
|
|
|
|
|
2020-10-08 07:39:48 +00:00
|
|
|
|
<li><a href="../tags/%e5%89%aa%e8%b4%b4%e6%9d%bf">剪贴板</a> </li>
|
2020-05-09 14:42:57 +00:00
|
|
|
|
|
2020-10-08 07:39:48 +00:00
|
|
|
|
<li><a href="../tags/Windows">Windows</a> </li>
|
2020-05-09 14:42:57 +00:00
|
|
|
|
|
|
|
|
|
</ul>
|
2022-04-25 12:55:41 +00:00
|
|
|
|
<p>点击以下链接可安装长按“链接”按钮菜单:<br>
|
2022-07-09 00:45:17 +00:00
|
|
|
|
<a href="i:0gdefault.select::google划词翻译:/uweb:printf 'https://translate.google.cn/?sl=en&tl=zh-CN&op=translate&text=';cat|tr ' ' '%2B'%0A">google划词翻译</a><br>
|
|
|
|
|
<a href="i:0gdefault.select::bing翻译:/uweb:printf 'https://cn.bing.com/translator/?from=&to=zh-Hans&text=';cat|tr ' ' '%2B'%0A">bing翻译</a><br>
|
|
|
|
|
<a href="i:0gdefault.select::papago翻译:/uweb:printf 'https://papago.naver.com/?sk=auto&tk=zh-CN&st=';cat|tr ' ' '%2B'%0A">papago翻译</a></p>
|
|
|
|
|
<p><a href="i:0gdefault.select::iciba:/uweb:printf 'https://m.iciba.com/';cat|tr ' ' '%2B'%0A">iciba</a><br>
|
|
|
|
|
<a href="i:0gdefault.select::百度翻译:/uweb:printf 'https://fanyi.baidu.com/#auto/zh/';cat|tr ' ' '%2B'%0A">百度翻译</a><br>
|
|
|
|
|
<a href="i:0gdefault.select::有道翻译:/uweb:printf 'https://m.youdao.com/translate?type=AUTO&inputtext=';cat|tr ' ' '%2B'%0A">有道翻译</a><br>
|
|
|
|
|
<a href="i:0gdefault.select::搜狗翻译:/uweb:printf 'https://translate.sogou.com/text?transfrom=auto&transto=zh-CHS&model=general&keyword=';cat|tr ' ' '%2B'%0A">搜狗翻译</a></p>
|
|
|
|
|
<p><a href="i:0gdefault.select::彩云小译:/uweb:print 'https://fanyi.caiyunapp.com/#/ {function tE(el,t){var e=new Event(t);el.dispatchEvent(e);}let s=document.querySelector(%22textarea%22);s.value=%60';cat;print '%60;tE(s,%22input%22);tE(s,%22keyup%22)}'%0A">彩云小译</a><br>
|
|
|
|
|
<a href="i:0gdefault.select::deepL:/uweb:print 'https://www.deepl.com/translator {function tE(el,t){var e=new Event(t);el.dispatchEvent(e);}let s=document.querySelector(%22textarea%22);s.value=%60';cat;print '%60;tE(s,%22change%22)}'%0A">deepL</a></p>
|
2022-08-11 11:14:34 +00:00
|
|
|
|
<p><a target="_self" href="i:0gdefault.select:https://fastly.jsdelivr.net/gh/torappinfo/uweb/zh/searchurl/txt/select.cfg">点击安装"保存文本"等</a></p>
|
2022-02-12 11:46:05 +00:00
|
|
|
|
<p>重启浏览器,长按“链接”按钮,将弹出菜单。若用户当前窗口并无选中文本,则选取整个页面作相应操作,否则以选中文本为准。</p>
|
2022-07-09 00:45:17 +00:00
|
|
|
|
<p>配置文件"default.select"定义了<a href="..">超微浏览器</a>对选中(富)文本/元素进行的操作。没有任何选中元素则以整个网页为操作对象。每行格式如下:<br>
|
2021-02-23 05:40:18 +00:00
|
|
|
|
[菜单名]:[mimetype]:[命令行]</p>
|
2020-06-23 06:31:35 +00:00
|
|
|
|
<p>选中(富)文本作为命令行的标准输入,而标准输出根据mimetype进行相应处理。<br>
|
2021-02-23 05:40:18 +00:00
|
|
|
|
mimetype用来表示命令的输入输出类型。格式为"[输入mimetype]/[输出mimetype]","[输入mimetype]"可为"html"或空(txt格式)或为以超微配置目录为基准的相对路径.js文件名; 输出可为标准的mimetype或超微特殊扩充。如:<br>
|
2020-06-23 06:31:35 +00:00
|
|
|
|
html/text/html: 选中富文本为html格式, 输出mimetype为text/html。<br>
|
2020-07-05 15:04:13 +00:00
|
|
|
|
/uweb: 选中文本为txt格式, 输出mimetype为<a href="../cmd">特殊扩充uweb</a>,超微将把输出作为<a href="../links">链接</a>来处理。<br>
|
2020-09-17 04:22:44 +00:00
|
|
|
|
/termux: 命令运行结果将作为termux下命令运行。<br>
|
2022-08-11 11:14:34 +00:00
|
|
|
|
<a target="_self" href="i:0hcheck.js:https://fastly.jsdelivr.net/gh/torappinfo/uweb/zh/searchurl/txt/check.js">checked.js</a>: 运行配置目录下checked.js,其返回值作为命令行标准输入。对任何目录型(以“/”结尾)文件url,后面可附"?[文件前缀][<em>[文件后缀]]"。譬如"file:///sdcard/?</em>.png"会列举出"/sdcard"目录下所有.png文件。此时选择选定文件,则可利用checked.js复制文件至PC。(参看下面具体配置)</p>
|
2022-07-09 00:45:17 +00:00
|
|
|
|
<p>配置default.select如下:<br>
|
2022-11-25 05:25:29 +00:00
|
|
|
|
复制文本到地址栏:/uweb:printf i:15;cat<br>
|
2020-06-23 06:31:35 +00:00
|
|
|
|
复制至PC剪贴板::ssh [user:password]@192.168.2.102 "DISPLAY=:0 xsel -i"<br>
|
2020-09-23 02:32:44 +00:00
|
|
|
|
复制富文本至PC剪贴板:html:ssh [user:password]@192.168.2.102 "DISPLAY=:0 xsel -i"<br>
|
|
|
|
|
复制文件至PC:checked.js:while read fname;do scp $fname [user:password]@192.168.2.102:Downloads/.; done</p>
|
2020-06-23 06:31:35 +00:00
|
|
|
|
<p>如使用剪贴板功能手机需安装uweb定制<a href="../pcdown">Termux</a>,并在termux下安装openssl。<br>
|
|
|
|
|
此处假定远程PC的IP地址为192.168.2.102,PC已经开通了ssh服务。建议用户配置ssh服务为免密码登录,此时用户无需将密码写入文件default.select。用户PC上安装有xsel剪贴板工具。使用其它工具请酌情修改。</p>
|
2022-07-09 00:45:17 +00:00
|
|
|
|
<p>采用以上配置,笔记将储存在应用内部目录下文件note.txt或note.html中(富文本)。命名笔记储存文件则由用户在地址栏输入框内指定。</p>
|
2022-02-12 11:46:05 +00:00
|
|
|
|
<p>手机其它应用中的文本可选中后分享给超微浏览器,再由超微浏览器作笔记或进一步分享给PC。如果其它应用无法分享选中文本,这种情况可以先复制文本至剪贴板。长按链接按钮选择适当功能即可复制至PC剪贴板。</p>
|
2020-05-09 14:42:57 +00:00
|
|
|
|
<h4 id="windows-pc">Windows PC</h4>
|
|
|
|
|
<p>对Windows PC而言,vista及以后自带clip.exe,此时配置如下:<br>
|
|
|
|
|
复制文本至PC剪贴板::ssh [user:password]@192.168.2.102 clip.exe</code></p>
|
|
|
|
|
<p>其它推荐工具(读取PC剪贴板):<br>
|
|
|
|
|
<a href="http://unxutils.sourceforge.net/">pclip</a></p>
|
2020-04-29 08:37:43 +00:00
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
2020-05-09 14:42:57 +00:00
|
|
|
|
</body>
|
2020-04-29 08:37:43 +00:00
|
|
|
|
</html>
|