Skip to content

Commit

Permalink
fix censorStyle removal
Browse files Browse the repository at this point in the history
  • Loading branch information
Krazete committed Apr 25, 2024
1 parent 56faa09 commit 3e779be
Showing 1 changed file with 21 additions and 20 deletions.
41 changes: 21 additions & 20 deletions censor.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,5 @@
javascript:
var censorStyle = document.createElement("style");
censorStyle.innerHTML = `.censor {
opacity: 1 !important;
image-rendering: pixelated !important;
}
.censor + img {
display: none !important;
}
.censor + video {
visibility: hidden !important;
}
.censor-parent:hover .censor {
display: none !important;
}
.censor-parent:hover .censor + img {
display: unset !important;
}
.censor-parent:hover .censor + video {
visibility: visible !important;
}`;
var censorStyle;
var sensed;
var censors;
var af;
Expand Down Expand Up @@ -112,6 +93,26 @@ if (af) {
censorStyle.remove();
}
else {
censorStyle = document.createElement("style");
censorStyle.innerHTML = `.censor {
opacity: 1 !important;
image-rendering: pixelated !important;
}
.censor + img {
display: none !important;
}
.censor + video {
visibility: hidden !important;
}
.censor-parent:hover .censor {
display: none !important;
}
.censor-parent:hover .censor + img {
display: unset !important;
}
.censor-parent:hover .censor + video {
visibility: visible !important;
}`;
document.body.appendChild(censorStyle);
sensed = [];
censors = [];
Expand Down

0 comments on commit 3e779be

Please sign in to comment.