mirror of
https://github.com/torappinfo/uweb.git
synced 2024-08-14 23:54:59 +00:00
119 lines
4.6 KiB
HTML
119 lines
4.6 KiB
HTML
<!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>AD blocking</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">AD blocking
|
|
<br>
|
|
<span class="subtitle"></span>
|
|
</h1>
|
|
<ul class="tags">
|
|
|
|
</ul>
|
|
<ul>
|
|
<li>
|
|
<p><a href="../adblock_domain/index.html#">Host blocking</a>。</p>
|
|
<ul>
|
|
<li>Use <a href="../bookmarklet/index.html#">bookmarklet "list all script urls"</a> to generate url links, long pressing dubious script (usually 3rd-party library) link, click "Block domain root".</li>
|
|
</ul>
|
|
</li>
|
|
<li>
|
|
<p><a href="../sitejs/index.html#">Javascript and CSS for domains</a>。</p>
|
|
<ul>
|
|
<li>Long press the button "js", click the menu "MarkAD mode". In "markAD mode", click page element to show all attributes and generate CSS AD blocking styles. By default, "display:none" is used. If "display" appears in the attribute information, recommend to use "transform:scale(0)!important" instead.</li>
|
|
</ul>
|
|
</li>
|
|
<li>
|
|
<p>Long press the tab manager button, check "Videos only" for video sites and "Images only" for image sites. Other AD blocking options are "Hide pseudo elements" and "Hide iframes".</p>
|
|
<ul>
|
|
<li>Add prefix "i:0mc32:" to url when bookmarking, then the option "Images only" applies to whole url subtree. Similarly, "c16" for the option "Videos only" and "c12" for hiding both pseudo elements and iframes.</li>
|
|
<li>Long press the button [☰], check the option "Fullscreen autoplay". Videos are autoplayed in fullscreen mode, ADs have no chance to appear.</li>
|
|
</ul>
|
|
</li>
|
|
<li>
|
|
<p>Long press the setting button, check the option "Block external scripts". <a href="i:61:../searchurl/func.html">UI</a> website has option to also block dubious 3rd party resources. <a href="file:///data/data/info.torapp.uweb/files/js.allow">js.allow</a> whitelists js libraries.</p>
|
|
</li>
|
|
<li>
|
|
<p>Long press the button [☰], "Disable floating ADs", "Disable banners", "clear all timers", "stop events" and "Sleep ..." are also available.</p>
|
|
</li>
|
|
<li>
|
|
<p>Click the button with image icon to hide all images.</p>
|
|
</li>
|
|
<li>
|
|
<p>Click the button "JS" to disable javascript.</p>
|
|
</li>
|
|
<li>
|
|
<p><a href="file:///data/data/info.torapp.uweb/files/url.deny">url.deny</a>: one giant regular expression for blocked urls (java grammar), in which carriage returns (CR or newline) are ignored and "#" is for comments.</p>
|
|
</li>
|
|
</ul>
|
|
|
|
</div>
|
|
<p>Last Modified: 2 April 2024<br>
|
|
add js function in README<br>
|
|
<pre></pre>
|
|
</p>
|
|
|
|
<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"
|
|
data-mapping="title"
|
|
data-strict="0"
|
|
data-reactions-enabled="1"
|
|
data-emit-metadata="0"
|
|
data-input-position="top"
|
|
data-theme="light"
|
|
data-lang="en"
|
|
data-loading="lazy"
|
|
crossorigin="anonymous" async>
|
|
</script>
|
|
|
|
<footer class="site-footer">
|
|
<div class="container">
|
|
© 2018-2024 Richard H. Cao
|
|
</div>
|
|
</footer>
|
|
<!-- This document is licensed under the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is available at <https://www.gnu.org/licenses/>. -->
|
|
|
|
|
|
</body>
|
|
</html>
|