Update gloss.js

This commit is contained in:
Chen, Chien-ting 2019-05-16 21:45:15 +08:00 committed by GitHub
parent 6330ec4dcc
commit d1d4383450
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -11,28 +11,34 @@ Gua2 siong1-sin3 Li2.
*/
hexo.extend.filter.register('before_post_render', (data) => {
var css_content = `.css-table1{
var css_content = `
.css-table1{
display: table;
border: none; }
border: none;}
.css-tr1{
display:table-row;
}
.css-td1{
display:table-cell;}`
display: table-cell;
padding-right: 1ex;
}`;
var css_rendered = css_content.replace(/([ ]|\t|\n)+/g, " ");
var link_js = `<script type=\"text/javascript">
alert("123");
head = document.getElementsByTagName('head');
link_css = document.createElement('style');
link_css.setAttribute('type', 'text/css');
link_css.innerHTML = "${css_content}";
link_css.innerHTML = "${css_rendered}";
document.getElementsByTagName('head')[0].appendChild(link_css);
</script>`
</script>`;
data.content += link_js;
return data;