mirror of
https://github.com/torappinfo/uweb.git
synced 2024-08-14 23:54:59 +00:00
add offline cache
This commit is contained in:
parent
ad12551ed7
commit
fe41bb41a4
10 changed files with 119 additions and 3 deletions
|
@ -110,6 +110,15 @@ Toggle all checkboxes in forms
|
|||
Enable selection</description>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>Offline resources</title>
|
||||
<link>/en/offlinecache/</link>
|
||||
<pubDate>Mon, 25 Apr 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>/en/offlinecache/</guid>
|
||||
<description>Corresponding files in &quot;sitecache/[domain name]/[full path including filename, '?' , '&amp;' , '='. exactly as url]&quot; are loaded with option &quot;use offline resources&quot;.</description>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>Resource redirection</title>
|
||||
<link>/en/redirect/</link>
|
||||
|
|
|
@ -125,6 +125,12 @@
|
|||
</a>
|
||||
</li>
|
||||
|
||||
<li class="post">
|
||||
<a href="offlinecache/index.html">
|
||||
<span>Offline resources</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="post">
|
||||
<a href="redirect/index.html">
|
||||
<span>Resource redirection</span>
|
||||
|
|
11
en/index.xml
11
en/index.xml
|
@ -64,7 +64,7 @@ Note: "Engines" needs file "engine.search",whose format is sam
|
|||
<pubDate>Thu, 28 Jul 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>/en/sitemap/</guid>
|
||||
<description>UI Search engines UI (gitee) Customization Long pressing menus for toolbar buttons User agents Javascript Url services Links Commands Remote javascript Menu for selections Menu for long pressing hypertext Toolbar Gestures Address bar command modes Font settings Advanced Content AD blocking CSS styles Redirection Javascript and CSS for domains Tools Bookmarklets Custom file handling Html5 application Termux Miscellaneous Configuration files Tips Manual </description>
|
||||
<description>UI Search engines UI (gitee) Customization Long pressing menus for toolbar buttons User agents Javascript Url services Links Commands Remote javascript Menu for selections Menu for long pressing hypertext Toolbar Gestures Address bar command modes Font settings Advanced Content AD blocking CSS styles Redirection Offline cache Javascript and CSS for domains Tools Bookmarklets Custom file handling Html5 application Termux Miscellaneous Configuration files Tips Manual </description>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
|
@ -217,6 +217,15 @@ Performance
|
|||
Remote javascript is defined in default.rjs. Click the following link to install. (Force exit and re-launch the app, then long press the &quot;search&quot; button to popup the menu.</description>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>Offline resources</title>
|
||||
<link>/en/offlinecache/</link>
|
||||
<pubDate>Mon, 25 Apr 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>/en/offlinecache/</guid>
|
||||
<description>Corresponding files in &quot;sitecache/[domain name]/[full path including filename, '?' , '&amp;' , '='. exactly as url]&quot; are loaded with option &quot;use offline resources&quot;.</description>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>Resource redirection</title>
|
||||
<link>/en/redirect/</link>
|
||||
|
|
55
en/offlinecache/index.html
Normal file
55
en/offlinecache/index.html
Normal file
|
@ -0,0 +1,55 @@
|
|||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<link rel="stylesheet" href="/uwebzh/style.css" type="text/css" />
|
||||
<title>Offline resources</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('zh')">简体中文</a>
|
||||
|
||||
|
||||
<nav>
|
||||
</nav>
|
||||
</header>
|
||||
<br />
|
||||
|
||||
<div class="container">
|
||||
<h1 class="title">Offline resources
|
||||
<br>
|
||||
<span class="subtitle"></span>
|
||||
</h1>
|
||||
<ul class="tags">
|
||||
|
||||
</ul>
|
||||
<p>Corresponding files in "sitecache/[domain name]/[full path including filename, '?' , '&' , '='. exactly as url]" are loaded with option "use offline resources".</p>
|
||||
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -202,6 +202,19 @@
|
|||
hreflang="en"
|
||||
href="/en/rjs/"
|
||||
/>
|
||||
</url><url>
|
||||
<loc>/en/offlinecache/</loc>
|
||||
<lastmod>2022-04-25T00:00:00+00:00</lastmod>
|
||||
<xhtml:link
|
||||
rel="alternate"
|
||||
hreflang="zh"
|
||||
href="/zh/offlinecache/"
|
||||
/>
|
||||
<xhtml:link
|
||||
rel="alternate"
|
||||
hreflang="en"
|
||||
href="/en/offlinecache/"
|
||||
/>
|
||||
</url><url>
|
||||
<loc>/en/tags/redirection/</loc>
|
||||
<lastmod>2022-04-25T00:00:00+00:00</lastmod>
|
||||
|
|
|
@ -74,6 +74,7 @@
|
|||
<li><a href="../adblock/index.html">AD blocking</a></li>
|
||||
<li><a href="../globalcss/index.html">CSS styles</a></li>
|
||||
<li><a href="../redirect/index.html">Redirection</a></li>
|
||||
<li><a href="../offlinecache/index.html">Offline cache</a></li>
|
||||
<li><a href="../sitejs/index.html">Javascript and CSS for domains</a></li>
|
||||
</ul>
|
||||
<h5 id="tools">Tools</h5>
|
||||
|
|
|
@ -32,7 +32,7 @@ Note: "Engines" needs file "engine.search",whose format is sam
|
|||
<pubDate>Thu, 28 Jul 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>/en/sitemap/</guid>
|
||||
<description>UI Search engines UI (gitee) Customization Long pressing menus for toolbar buttons User agents Javascript Url services Links Commands Remote javascript Menu for selections Menu for long pressing hypertext Toolbar Gestures Address bar command modes Font settings Advanced Content AD blocking CSS styles Redirection Javascript and CSS for domains Tools Bookmarklets Custom file handling Html5 application Termux Miscellaneous Configuration files Tips Manual </description>
|
||||
<description>UI Search engines UI (gitee) Customization Long pressing menus for toolbar buttons User agents Javascript Url services Links Commands Remote javascript Menu for selections Menu for long pressing hypertext Toolbar Gestures Address bar command modes Font settings Advanced Content AD blocking CSS styles Redirection Offline cache Javascript and CSS for domains Tools Bookmarklets Custom file handling Html5 application Termux Miscellaneous Configuration files Tips Manual </description>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
|
|
11
index.html
11
index.html
|
@ -1 +1,10 @@
|
|||
<meta http-equiv="refresh" content="0; url=zh/index.html">
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>en/</title>
|
||||
<link rel="canonical" href="en/">
|
||||
<meta name="robots" content="noindex">
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="refresh" content="0; url=en/">
|
||||
</head>
|
||||
</html>
|
||||
|
|
|
@ -30,6 +30,10 @@
|
|||
<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>
|
||||
|
|
|
@ -495,5 +495,15 @@
|
|||
<loc>/zh/tags/%E4%B8%8B%E8%BD%BD/</loc>
|
||||
</url><url>
|
||||
<loc>/zh/offlinecache/</loc>
|
||||
<xhtml:link
|
||||
rel="alternate"
|
||||
hreflang="en"
|
||||
href="/en/offlinecache/"
|
||||
/>
|
||||
<xhtml:link
|
||||
rel="alternate"
|
||||
hreflang="zh"
|
||||
href="/zh/offlinecache/"
|
||||
/>
|
||||
</url>
|
||||
</urlset>
|
||||
|
|
Loading…
Reference in a new issue