index.html 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1" />
  6. <link rel="stylesheet" href="/uwebzh/style.css" type="text/css" />
  7. <title>AD blocking</title>
  8. <script type="text/javascript">
  9. function findLang(){
  10. let href = location.href;
  11. for(let i=href.length-1;i>0;i--){
  12. if('/'==href.charAt(i) && '/'==href.charAt(i-3))
  13. return i;
  14. }
  15. return 0;
  16. }
  17. function nav2(page){
  18. let i = findLang();
  19. location.href = location.href.substring(0,i+1)+page;
  20. }
  21. function nav2Lang(lang){
  22. let i = findLang();
  23. let href = location.href;
  24. location.href = location.href.substring(0,i-2)+lang+location.href.substring(i);
  25. }
  26. </script>
  27. </head>
  28. <body>
  29. <header class='header'>
  30. <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>
  31. <a class="logo" href="javascript:void(0)" onclick="return nav2Lang('zh')">简体中文</a>
  32. <nav>
  33. </nav>
  34. </header>
  35. <br />
  36. <div class="container">
  37. <h1 class="title">AD blocking
  38. <br>
  39. <span class="subtitle"></span>
  40. </h1>
  41. <ul class="tags">
  42. </ul>
  43. <ul>
  44. <li>
  45. <p><a href="../adblock_domain/index.html">Host blocking</a>。</p>
  46. <ul>
  47. <li>Use <a href="../bookmarklet/index.html">bookmarklet &quot;list all script urls&quot;</a> to generate url links, long pressing dubious script (usually 3rd-party library) link, click &quot;Block domain root&quot;.</li>
  48. </ul>
  49. </li>
  50. <li>
  51. <p><a href="../sitejs/index.html">Javascript and CSS for domains</a>。</p>
  52. <ul>
  53. <li>Long press the button &quot;js&quot;, click the menu &quot;MarkAD mode&quot;. In &quot;markAD mode&quot;, click page element to show all attributes and generate CSS AD blocking styles. By default, &quot;display:none&quot; is used. If &quot;display&quot; appears in the attribute information, recommend to use &quot;transform:scale(0)!important&quot; instead.</li>
  54. </ul>
  55. </li>
  56. <li>
  57. <p>Long press the tab manager button, check &quot;Videos only&quot; for video sites and &quot;Images only&quot; for image sites. Other AD blocking options are &quot;Hide pseudo elements&quot; and &quot;Hide iframes&quot;.</p>
  58. <ul>
  59. <li>Add prefix &quot;i:0mc32:&quot; to url when bookmarking, then the option &quot;Images only&quot; applies to whole url subtree. Similarly, &quot;c16&quot; for the option &quot;Videos only&quot; and &quot;c12&quot; for hiding both pseudo elements and iframes.</li>
  60. <li>Long press the button [☰], check the option &quot;Fullscreen autoplay&quot;. Videos are autoplayed in fullscreen mode, ADs have no chance to appear.</li>
  61. </ul>
  62. </li>
  63. <li>
  64. <p>Long press the setting button, check the option &quot;Block external scripts&quot;. <a href="i:61:https://fastly.jsdelivr.net/gh/torappinfo/uweb/en/searchurl/func.html">UI</a> website has option to also block dubious 3rd party resources. <a href="file:///data/data/info.torinfo.uweb/files/js.allow">js.allow</a> whitelists js libraries.</p>
  65. </li>
  66. <li>
  67. <p>Long press the button [☰], &quot;Disable floating ADs&quot;, &quot;Disable banners&quot;, &quot;clear all timers&quot;, &quot;stop events&quot; and &quot;Sleep ...&quot; are also available.</p>
  68. </li>
  69. <li>
  70. <p>Click the button with image icon to hide all images.</p>
  71. </li>
  72. <li>
  73. <p>Click the button &quot;JS&quot; to disable javascript.</p>
  74. </li>
  75. <li>
  76. <p><a href="file:///data/data/info.torinfo.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 &quot;#&quot; is for comments.</p>
  77. </li>
  78. </ul>
  79. </div>
  80. </body>
  81. </html>