Delete text-expand.html (not a necessary include)

This commit is contained in:
lily 2022-10-01 21:16:25 -07:00 committed by GitHub
parent 9c90bbf980
commit ceb1cd7f73
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,16 +0,0 @@
<script>
var elements = document.querySelectorAll('p');
Array.prototype.forEach.call(elements, function(el, i){
if(el.innerHTML=='[expand]') {
var parentcontent = el.parentNode.innerHTML.replace('<p>[expand]</p>','<div class="expand" style="display: none; height: 0; overflow: hidden;">').replace('<p>[/expand]</p>','</div>');
el.parentNode.innerHTML = parentcontent;
}
});
var elements = document.querySelectorAll('div.expand');
Array.prototype.forEach.call(elements, function(el, i){
el.previousElementSibling.innerHTML = el.previousElementSibling.innerHTML + '<span>..&nbsp; <a href="#" style="cursor: pointer;" onclick="this.parentNode.parentNode.nextElementSibling.style.display = \'block\'; this.parentNode.parentNode.nextElementSibling.style.height = \'auto\'; this.parentNode.style.display = \'none\';">read&nbsp;more&nbsp;&rarr;</a></span>';
});
</script>