- QtWebEngine blocks redirection to "data:" urls. - Includes light / dark style Signed-off-by: Juraj Oravec <jurajoravec@mailo.com>remotes/origin/kf6
parent
5ece02142b
commit
aadae5dd9e
3 changed files with 33 additions and 15 deletions
@ -1,18 +1,36 @@ |
|||||||
<html><head> |
<html><head> |
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8"> |
<meta http-equiv="content-type" content="text/html; charset=utf-8"> |
||||||
<title>%TITLE%</title> |
<title>Blocked content</title> |
||||||
<link rel="icon" href="%FAVICON%" type="image/x-icon" /> |
<link rel="icon" href="adblock_big.png" type="image/x-icon" /> |
||||||
<style> |
<style> |
||||||
html {background: #dddddd;} |
#box {max-width: 300px;height: 80%;overflow:auto;padding: 25px;padding-bottom: 10px;text-align: center;vertical-align: middle;margin: auto;} |
||||||
body {background: #dddddd;} |
|
||||||
#box {background: #ffffff;max-width: 300px;height: 80%;overflow:auto;padding: 25px;padding-bottom: 10px;text-align: center;vertical-align: middle;margin: auto;direction: %DIRECTION%;} |
|
||||||
h2 {font-size: 100%;font-weight: bold; border-bottom: 1px solid #f4f4f4; margin-bottom: 0px;} |
h2 {font-size: 100%;font-weight: bold; border-bottom: 1px solid #f4f4f4; margin-bottom: 0px;} |
||||||
|
|
||||||
|
@media (prefers-color-scheme: light) { |
||||||
|
html, body {background: #dddddd;color: #525c66;} |
||||||
|
#box {background: #ffffff;} |
||||||
|
h2 {border-bottom-color: #aaa;} |
||||||
|
.dark {display: none;} |
||||||
|
} |
||||||
|
@media (prefers-color-scheme: dark) { |
||||||
|
html, body {background: #070709;color: #dddddd;} |
||||||
|
#box {background: #171717;} |
||||||
|
h2 {border-bottom-color: #555;} |
||||||
|
.light {display: none;} |
||||||
|
} |
||||||
</style> |
</style> |
||||||
</head> |
</head> |
||||||
<body> |
<body> |
||||||
<div id="box"> |
<div id="box"> |
||||||
<img src="%IMAGE%" > |
<img src="adblock_big.png" > |
||||||
<h2>AdBlock</h2> |
<h2>AdBlock</h2> |
||||||
%RULE% |
<span id="rule"></span> |
||||||
</div> |
</div> |
||||||
|
|
||||||
|
<script> |
||||||
|
let params = (new URL(document.location)).searchParams; |
||||||
|
document.title = params.get("title"); |
||||||
|
document.getElementById("rule").innerHTML = params.get("rule"); |
||||||
|
document.getElementById("box").style.direction = params.get("direction"); |
||||||
|
</script> |
||||||
</body></html> |
</body></html> |
||||||
|
|||||||
Loading…
Reference in new issue