File: adblock.html

package info (click to toggle)
falkon 25.12.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 25,120 kB
  • sloc: cpp: 66,939; javascript: 21,781; sh: 578; xml: 562; python: 496; sql: 75; makefile: 23
file content (38 lines) | stat: -rw-r--r-- 1,196 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<html>
<head>
 <title>AdBlock Tests &A</title>
 <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
</head>
<body>
<h2>AdBlock Tests</h2>
<h3>Popup Blocking</h3>
<p>
<a href="javascript:window.open('http://www.google.com/aclk?sa=l&adurl=http://www.edreams.com/', '_blank', 'width=600,height=600,statusbar=no,toolbar=no')">Open Popup window (will be blocked)</a>
</p>

<h3>Element hiding</h3>
Blocking element with <b>##div.test-qz-ad</b> rule.
<div class="test-qz-ad" style="font-weight: bold; color: darkred;">
If you see this text, the rule does not works!
</div>

<h3>Subdocument rules</h3>
Blocking iframe with <b>||linux.org.ru^$subdocument</b> rule.
<iframe src="http://www.linux.org.ru" width="100" height="100"></iframe>

<h3>XMLHttpRequest rules</h3>
Blocking ajax with <b>adblock.html$xmlhttprequest</b> rule.
<div id="ajax-status">Blocked</div>
<script>
$.get("adblock.html", function(data) {
    $("#ajax-status").html("Loaded!");
  });

if (location.protocol == "file:") {
    document.write("<h3 style='color:red'>Protocol file:// cannot be blocked!</h3>");
    document.write("Please move this file to localhost");
}
</script>

</body>
</html>