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
2020-05-12 09:50:03 +00:00
< link rel = "stylesheet" href = "https://jamesfengcao.gitee.io/uweb/style.css" type = "text/css" / >
2020-05-09 14:42:57 +00:00
< title > 运行javascript脚本< / title >
< / head >
< body >
< header class = 'header' >
2020-05-12 09:50:03 +00:00
< a class = "logo" href = ".." > ⟰< / a > < a class = "logo" href = "https://jamesfengcao.gitee.io/uweb//tags/" > Tags< / a >
2020-05-09 14:42:57 +00:00
< nav >
< / nav >
< / header >
2020-04-29 08:37:43 +00:00
2020-05-09 14:42:57 +00:00
< div class = "container" >
< h1 class = "title" > 运行javascript脚本
< br >
< span class = "subtitle" > < / span >
< / h1 >
< ul class = "tags" >
2020-04-29 08:37:43 +00:00
2020-05-12 09:50:03 +00:00
< li > < a href = "https://jamesfengcao.gitee.io/uweb/tags/javascript" > javascript< / a > < / li >
2020-04-29 08:37:43 +00:00
2020-05-09 14:42:57 +00:00
< / ul >
< p > < a href = ".." > uweb浏览器< / a > 支持运行本地及远程javascript脚本。< br >
< b > 大型脚本可安装到" /sdcard/uweb/bookmarklet" 目录下:< / b > < br >
< a target = "_self" href = "i:0h/sdcard/uweb/bookmarklet/彩云小译.js:https://caiyunapp.com/dest/trs.js" > 彩云小译< / a > < / p >
< p > < b > 远程及小型脚本可安装到default.rjs文件中: < / b > < br >
2020-05-10 00:44:35 +00:00
< a target = "_self" href = "i:0g/sdcard/uweb/default.rjs:https://jamesfengcao.gitee.io/uweb/searchurl/txt/rjs.cfg" > 点击安装站内搜索、背景图、新窗口打开链接、移除覆盖物等< / a > < / p >
2020-04-29 08:37:43 +00:00
< p > < b > 远程脚本配置文件/sdcard/uweb/default.rjs示例如下: < / b > < / p >
< pre > 彩云小译:'https://caiyunapp.com/dest/trs.js'
移除覆盖物:'https://jamesfengcao.gitee.io/uweb/searchurl/bml/content/rmo.js'
新窗口打开链接:'';{d=document,b=d.createElement('base');b.setAttribute('target','_blank');d.head.appendChild(b);}
google translate:'https://translate.google.cn/translate_a/element.js?cb=googleTranslateElementInit';b=d.body;v=d.createElement('div');v.id='google_translate_element';v.style.display='none';b.insertBefore(v,b.firstChild);p=d.createElement('script');p.text="function googleTranslateElementInit(){new google.translate.TranslateElement({pageLanguage: 'auto',includedLanguages:'zh-CN,zh-TW,en'},'google_translate_element');}";p.type='text/javascript';b.appendChild(p)
< / pre >
2020-05-09 14:42:57 +00:00
< p > default.rjs每行格式如下 (url部分支持js代码运算): < br >
2020-08-27 06:49:16 +00:00
[远程脚本名]:[返回js脚本url的javascript代码]< / p >
< p > 其中js脚本url可以为< a href = "../html5" > 本地html5应用< / a > 脚本地址。譬如'file:///sdcard/uweb/app[XXX]/....../[XXX].js'。< br >
清空后台重启浏览器,长按搜索按钮,则弹出远程脚本菜单。< / 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 >