uweb/zh/rjs/index.html

113 lines
7.5 KiB
HTML
Raw Normal View History

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="../style.css" type="text/css" />
<title>运行javascript脚本</title>
<script type="text/javascript">
function findLang(){
let href = location.href;
for(let i=href.length-1;i>0;i--){
if('/'==href.charAt(i) && '/'==href.charAt(i-3))
return i;
}
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);
}
</script>
</head>
<body>
<header class='header'>
<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>
<a class="logo" href="javascript:void(0)" onclick="return nav2Lang('en')">English</a>
<nav>
</nav>
</header>
<br />
<div class="container">
<h1 class="title">运行javascript脚本
<br>
<span class="subtitle"></span>
</h1>
<ul class="tags">
</ul>
<p><a href="../sitejs/index.html">特定网址用户脚本</a></p>
<p><b>全局脚本</b>位于js子目录, 长按[☰]按钮配置。点击以下链<br>
接安装:<br>
2023-02-20 14:03:43 +00:00
&lt;a target=_self&quot; href=&quot;i:0hjs/记住密码.js:../searchurl/txt/passwdsave.js&quot;&gt;记住密码</a><br>
<a target="_self" href="i:0hjs/极速网页.js:https://fastly.jsdelivr.net/npm/instant.page">极速网页</a></p>
<p><b>大型脚本</b>可安装到&quot;bookmarklet&quot;目录下长按js按钮<br>
2023-04-29 13:12:12 +00:00
<a target="_self" href="i:0hbookmarklet/!google翻译.js:https://fastly.jsdelivr.net/gh/torappinfo/js1@main/element.js:%0A{let d=document,b=d.body,v=d.createElement('div');v.id='google_translate_element';v.style='position:fixed;bottom:10px;right:10px;cursor:pointer;z-index:9999';b.insertBefore(v,b.firstChild);function googleTranslateElementInit(){new google.translate.TranslateElement({layout:google.translate.TranslateElement.InlineLayout.SIMPLE,multilanguagePage:true,pageLanguage:'auto',includedLanguages:'zh-CN,zh-TW,en,ko,ja'},'google_translate_element');}}">免魔法google翻译</a></p>
2023-04-29 13:48:40 +00:00
<p><a target="_self" href="i:0hbookmarklet/!Google至简体:https://fastly.jsdelivr.net/gh/torappinfo/js1@main/element.js:%0A{let d=document;location.hash=location.hash%2B'#googtrans(zh-CN)';b=d.body;v=d.createElement('div');v.id='google_translate_element';v.style='position:fixed;bottom:10px;right:10px;cursor:pointer;z-index:9999';b.insertBefore(v,b.firstChild);function googleTranslateElementInit(){new google.translate.TranslateElement({layout:google.translate.TranslateElement.InlineLayout.SIMPLE,autoDisplay:true,pageLanguage:'auto',includedLanguages:'zh-CN,zh-TW,en,ko,ja'},'google_translate_element');}}">免魔法Google翻译至简体</a></p>
<p><a target="_self" href="i:0hbookmarklet/!Google至英文:https://fastly.jsdelivr.net/gh/torappinfo/js1@main/element.js:%0A{let d=document;location.hash=location.hash%2B'#googtrans(en)';b=d.body;v=d.createElement('div');v.id='google_translate_element';v.style='position:fixed;bottom:10px;right:10px;cursor:pointer;z-index:9999';b.insertBefore(v,b.firstChild);function googleTranslateElementInit(){new google.translate.TranslateElement({layout:google.translate.TranslateElement.InlineLayout.SIMPLE,autoDisplay:true,pageLanguage:'auto',includedLanguages:'zh-CN,zh-TW,en,ko,ja'},'google_translate_element');}}">免魔法Google翻译至英文</a></p>
2023-04-29 13:12:12 +00:00
<p><a target="_self" href='i:0hbookmarklet/eruda.js:https://fastly.jsdelivr.net/npm/eruda:%0Aeruda.init()'>Eruda</a></p>
2023-02-20 14:03:43 +00:00
<p><a target="_self" href="i:0hbookmarklet/performance.js:https://fastly.jsdelivr.net/gh/micmro/performance-bookmarklet/dist/performanceBookmarklet.min.js">Performance</a><br>
<a target="_self" href="i:0hbookmarklet/移除覆盖物.js:../searchurl/bml/content/rmo.js">移除覆盖物</a></p>
<p><b>远程脚本</b>配置文件default.rjs样列如下点击以下链接自动安装 (清空后台重启浏览器,长按搜索按钮,则弹出远程脚本菜单)</p>
<p><a href="i:04Selection to sentence:;let g='sentence';getSelection().modify('move','forward',g);getSelection().modify('extend','backward',g);">Selection to sentence:;let g='sentence';getSelection().modify('move','forward',g);getSelection().modify('extend','backward',g);</a></p>
<p><a href="i:04Selection to line:;let g='line';getSelection().modify('move','forward',g);getSelection().modify('extend','backward',g);">Selection to line:;let g='line';getSelection().modify('move','forward',g);getSelection().modify('extend','backward',g);</a></p>
<p><a href="i:04Selection to paragraph:;let g='paragraph';getSelection().modify('move','forward',g);getSelection().modify('extend','backward',g);">Selection to paragraph:;let g='paragraph';getSelection().modify('move','forward',g);getSelection().modify('extend','backward',g);</a></p>
<p><a href="i:04显示数学公式:['https://fastly.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js']">显示数学公式:['https://fastly.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js']</a></p>
<p><a href="i:04新窗口打开链接:;let d=document;b=d.createElement('base');b.setAttribute('target','_blank');d.head.appendChild(b)">新窗口打开链接:;let d=document;b=d.createElement('base');b.setAttribute('target','_blank');d.head.appendChild(b)</a></p>
<p><a href="i:04站内搜索:;open('i:15site:' + location.hostname)">站内搜索:;open('i:15site:' + location.hostname)</a></p>
<p><a href="i:04编辑器拼写检查:;let t=document.getElementsByTagName('textarea');let v=t[0].spellcheck;if(v==null)v=false;t[0].spellcheck=!v">编辑器拼写检查:;let t=document.getElementsByTagName('textarea');let v=t[0].spellcheck;if(v==null)v=false;t[0].spellcheck=!v</a></p>
<p>远程及小型脚本可安装到default.rjs文件中。远程脚本对CSP网站仍然有效。<br>
2023-04-29 13:48:40 +00:00
<a target="_self" href="i:0gdefault.rjs:../searchurl/txt/rjs.cfg">点击安装背景图等</a></p>
<p>远程脚本配置文件default.rjs每行格式如下 (url部分支持js代码运算)<br>
[远程脚本名]:[返回url数组的javascript代码]</p>
2022-10-26 15:19:54 +00:00
<p>其中url可以为本地http脚本地址。譬如'https://local/...' (<a href="../html5/index.html">本地html5应用</a><a href="../offlinecache/index.html">离线缓存</a>)。此时js脚本也可使用<a href="../links/index.html">.link文件</a>方式调用。</p>
</div>
2023-04-29 04:17:33 +00:00
<p>Last Modified: 29 April 2023<br>
2023-04-29 13:48:40 +00:00
add google translate in rjs.py<br>
2023-03-07 02:07:05 +00:00
<pre></pre>
</p>
2023-05-09 03:11:05 +00:00
<script>
if(location.href.indexOf("/zh/")>0){
var script = document.createElement("script");
script.type = "text/javascript";
script.src = "../../js/gissues.js";
script.setAttribute("repo","jamesfengcao/uweb");
script.setAttribute("issue-term","title");
script.setAttribute("theme","github-light");
script.setAttribute("crossorigin","anonymous");
script.async = true;
document.body.appendChild(script);
}
</script>
2023-05-06 01:56:44 +00:00
<script id='jsgiscus'
src='https://giscus.app/client.js'
data-repo="torappinfo/uweb"
data-repo-id="MDEwOlJlcG9zaXRvcnkzMDIyMDU3MjE="
data-category="Announcements"
data-category-id="DIC_kwDOEgNLGc4CQjsh"
2023-05-06 02:49:29 +00:00
data-mapping="title"
2023-05-06 01:56:44 +00:00
data-strict="0"
data-reactions-enabled="1"
data-emit-metadata="0"
data-input-position="top"
data-theme="light"
data-lang="en"
data-loading="lazy"
2023-05-06 02:49:29 +00:00
crossorigin="anonymous" async>
2023-05-06 01:40:28 +00:00
</script>
</body>
</html>