Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: pages/adware.md

Issue 29350056: Issue 4348 - control adware page warning through url parameter (Closed)
Patch Set: Add the class, don't rewrite Created Sept. 22, 2016, 2:57 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pages/adware.md
===================================================================
--- a/pages/adware.md
+++ b/pages/adware.md
@@ -31,6 +31,7 @@
.warning
{
+ display: none;
color: #e11a2c;
}
@@ -42,6 +43,11 @@
background-color: #fff;
}
+ .show-warning .warning
+ {
+ display: block;
+ }
+
.icon-header
{
vertical-align: middle;
@@ -131,6 +137,19 @@
color: #e11a2c;
}
</style>
+
+ <script type="text/javascript">
+ document.addEventListener("DOMContentLoaded", function()
+ {
+ if (window.location.search.indexOf("warning=true") == 1)
+ {
+ if ("classList" in document.body)
+ document.body.classList.add("show-warning")
+ else
+ document.body.className += " show-warning";
+ }
+ }, false);
+ </script>
</head>
# {{page-header I’m using <fix>Adblock Plus</fix> but I still see suspicious ads}}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld