Skip to content
Permalink
Browse files

handler spoiler tag

  • Loading branch information...
devnewton committed May 14, 2017
1 parent e5a529d commit 1b7e800c83cf3dcacb90cf91c92d3064d9c1e6c4
Showing with 22 additions and 1 deletion.
  1. +14 −0 css/taab.css
  2. +3 −0 js/taab.js
  3. +5 −1 peg/backend2html.pegjs
@@ -85,6 +85,20 @@ figure:hover img {
top: 100%;
}

mark {
background-color: black;
color: black;
}

mark:hover {
background-color: inherit;
}

.revealed-spoiler {
background-color: inherit;
color: red;
}

.jb3-bigorno {
border: 1px solid #F00;
}
@@ -73,6 +73,9 @@ document.addEventListener('DOMContentLoaded', function () {
this.$refs.message.focus();
}
break;
case 'MARK':
e.target.classList.toggle('revealed-spoiler');
break;
}
},
mouseEntered: function (e) {
@@ -84,7 +84,11 @@ closeTag
}

validFormatTag
= ("b" / "i" / "s" / "u" / "tt")
= (spoiler / "b" / "i" / "s" / "u" / "tt")

spoiler
= "spoiler"
{ return "mark"; }

invalidOpenTag
= "<" tag:invalidTag ">"

0 comments on commit 1b7e800

Please sign in to comment.
You can’t perform that action at this time.