add google translate menus

This commit is contained in:
James Feng Cao 2023-04-29 13:37:17 +08:00
parent 50c0037c97
commit fc717a7c90
7 changed files with 14 additions and 12 deletions

View file

@ -65,6 +65,8 @@
<p><a href="i:04New tab to open links:;let d=document;b=d.createElement('base');b.setAttribute('target','_blank');d.head.appendChild(b)">New tab to open links:;let d=document;b=d.createElement('base');b.setAttribute('target','_blank');d.head.appendChild(b)</a></p>
<p><a href="i:04Site search:;open('i:15site:' + location.hostname)">Site search:;open('i:15site:' + location.hostname)</a></p>
<p><a href="i:04Spell check:;let t=document.getElementsByTagName('textarea');let v=t[0].spellcheck;if(v==null)v=false;t[0].spellcheck=!v">Spell check:;let t=document.getElementsByTagName('textarea');let v=t[0].spellcheck;if(v==null)v=false;t[0].spellcheck=!v</a></p>
<p><a target="_self" href="i:0gdefault.rjs::google translate:['https://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit'];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:[]},'google_translate_element');}%0A">Google translate</a></p>
<p><a target="_self" href="i:0gdefault.rjs::google translate2en:['https://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit'];location.hash=location.hash+'#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,multilanguagePage:true,pageLanguage:'auto',includedLanguages:[]},'google_translate_element');}%0A">Google translate to English</a></p>
<p>Remote script configuration file &quot;default.rjs&quot; whose lines have the following format:<br>
[script name]:[javascript code to return url arrays]</p>
<h4 id="activated-scripts">Activated scripts</h4>
@ -74,7 +76,7 @@
<p>All remote js (default.rjs) are allowed to execute on CSP sites. Local js files without remote resource access work fine when under the folder &quot;bookmarklet&quot;, others needs to be refered in default.rjs as http urls such as &quot;https://local/...&quot; (<a href="../html5/index.html">html5</a> or <a href="../offlinecache/index.html">offline cache</a>) .</p>
</div>
<p>Last Modified: 20 April 2023<br>
<p>Last Modified: 29 April 2023<br>
support .js files under &#39;css&#39; folder<br>
<pre></pre>
</p>

View file

@ -58,7 +58,7 @@
/>
</url><url>
<loc>/en/</loc>
<lastmod>2023-04-20T10:19:36+08:00</lastmod>
<lastmod>2023-04-29T13:34:57+08:00</lastmod>
<xhtml:link
rel="alternate"
hreflang="zh"
@ -113,7 +113,7 @@
/>
</url><url>
<loc>/en/topposts/</loc>
<lastmod>2023-04-20T10:15:37+08:00</lastmod>
<lastmod>2023-04-29T13:34:57+08:00</lastmod>
<xhtml:link
rel="alternate"
hreflang="zh"
@ -291,7 +291,7 @@
/>
</url><url>
<loc>/en/rjs/</loc>
<lastmod>2023-04-20T10:15:37+08:00</lastmod>
<lastmod>2023-04-29T13:34:57+08:00</lastmod>
<xhtml:link
rel="alternate"
hreflang="zh"

View file

@ -4,14 +4,14 @@
<sitemap>
<loc>en/sitemap.xml</loc>
<lastmod>2023-04-20T10:19:36+08:00</lastmod>
<lastmod>2023-04-29T13:34:57+08:00</lastmod>
</sitemap>
<sitemap>
<loc>zh/sitemap.xml</loc>
<lastmod>2023-04-29T12:15:57+08:00</lastmod>
<lastmod>2023-04-29T13:11:23+08:00</lastmod>
</sitemap>

View file

@ -508,7 +508,7 @@ Selection to paragraph:;let g=&#39;paragraph&#39;;getSelection().modify(&#39;mov
站内搜索:;open(&#39;i:15site:&#39; + location.hostname)
编辑器拼写检查:;let t=document.getElementsByTagName(&#39;textarea&#39;);let v=t[0].spellcheck;if(v==null)v=false;t[0].spellcheck=!v
远程及小型脚本可安装到default.rjs文件中。远程脚本对CSP网站仍然有效。
点击安装google翻译、背景图等
点击安装免魔法google翻译、背景图等
远程脚本配置文件default.rjs每行格式如下 (url部分支持js代码运算)
[远程脚本名]:[返回url数组的javascript代码]
其中url可以为本地http脚本地址。譬如&#39;https://local/...&#39; (本地html5应用或离线缓存)。此时js脚本也可使用.link文件方式调用。</description>

View file

@ -67,7 +67,7 @@
<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>
<a target="_self" href="i:0gdefault.rjs:../searchurl/txt/rjs.cfg">点击安装google翻译、背景图等</a></p>
<a target="_self" href="i:0gdefault.rjs:../searchurl/txt/rjs.cfg">点击安装免魔法google翻译、背景图等</a></p>
<p>远程脚本配置文件default.rjs每行格式如下 (url部分支持js代码运算)<br>
[远程脚本名]:[返回url数组的javascript代码]</p>
<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>

View file

@ -29,7 +29,7 @@
/>
</url><url>
<loc>/zh/</loc>
<lastmod>2023-04-29T12:15:57+08:00</lastmod>
<lastmod>2023-04-29T13:11:23+08:00</lastmod>
<xhtml:link
rel="alternate"
hreflang="en"
@ -126,7 +126,7 @@
/>
</url><url>
<loc>/zh/topposts/</loc>
<lastmod>2023-04-29T12:08:30+08:00</lastmod>
<lastmod>2023-04-29T13:11:23+08:00</lastmod>
<xhtml:link
rel="alternate"
hreflang="en"
@ -252,7 +252,7 @@
<lastmod>2022-09-24T14:06:03+08:00</lastmod>
</url><url>
<loc>/zh/rjs/</loc>
<lastmod>2023-04-29T12:08:30+08:00</lastmod>
<lastmod>2023-04-29T13:11:23+08:00</lastmod>
<xhtml:link
rel="alternate"
hreflang="en"

View file

@ -211,7 +211,7 @@ Selection to paragraph:;let g=&#39;paragraph&#39;;getSelection().modify(&#39;mov
站内搜索:;open(&#39;i:15site:&#39; + location.hostname)
编辑器拼写检查:;let t=document.getElementsByTagName(&#39;textarea&#39;);let v=t[0].spellcheck;if(v==null)v=false;t[0].spellcheck=!v
远程及小型脚本可安装到default.rjs文件中。远程脚本对CSP网站仍然有效。
点击安装google翻译、背景图等
点击安装免魔法google翻译、背景图等
远程脚本配置文件default.rjs每行格式如下 (url部分支持js代码运算)
[远程脚本名]:[返回url数组的javascript代码]
其中url可以为本地http脚本地址。譬如&#39;https://local/...&#39; (本地html5应用或离线缓存)。此时js脚本也可使用.link文件方式调用。</description>