11'use strict' ;
2- var video_data = JSON . parse ( document . getElementById ( 'video_data' ) . innerHTML ) ;
2+ var video_data = JSON . parse ( document . getElementById ( 'video_data' ) . textContent ) ;
33
44String . prototype . supplant = function ( o ) {
55 return this . replace ( / { ( [ ^ { } ] * ) } / g, function ( a , b ) {
@@ -11,10 +11,10 @@ String.prototype.supplant = function (o) {
1111function toggle_parent ( target ) {
1212 var body = target . parentNode . parentNode . children [ 1 ] ;
1313 if ( body . style . display === null || body . style . display === '' ) {
14- target . innerHTML = '[ + ]' ;
14+ target . textContent = '[ + ]' ;
1515 body . style . display = 'none' ;
1616 } else {
17- target . innerHTML = '[ - ]' ;
17+ target . textContent = '[ - ]' ;
1818 body . style . display = '' ;
1919 }
2020}
@@ -23,10 +23,10 @@ function toggle_comments(event) {
2323 var target = event . target ;
2424 var body = target . parentNode . parentNode . parentNode . children [ 1 ] ;
2525 if ( body . style . display === null || body . style . display === '' ) {
26- target . innerHTML = '[ + ]' ;
26+ target . textContent = '[ + ]' ;
2727 body . style . display = 'none' ;
2828 } else {
29- target . innerHTML = '[ - ]' ;
29+ target . textContent = '[ - ]' ;
3030 body . style . display = '' ;
3131 }
3232}
@@ -50,7 +50,7 @@ function hide_youtube_replies(event) {
5050 var body = target . parentNode . parentNode . children [ 1 ] ;
5151 body . style . display = 'none' ;
5252
53- target . innerHTML = sub_text ;
53+ target . textContent = sub_text ;
5454 target . onclick = show_youtube_replies ;
5555 target . setAttribute ( 'data-inner-text' , inner_text ) ;
5656 target . setAttribute ( 'data-sub-text' , sub_text ) ;
@@ -65,7 +65,7 @@ function show_youtube_replies(event) {
6565 var body = target . parentNode . parentNode . children [ 1 ] ;
6666 body . style . display = '' ;
6767
68- target . innerHTML = sub_text ;
68+ target . textContent = sub_text ;
6969 target . onclick = hide_youtube_replies ;
7070 target . setAttribute ( 'data-inner-text' , inner_text ) ;
7171 target . setAttribute ( 'data-sub-text' , sub_text ) ;
0 commit comments