index.js 993 B

12345678910111213141516171819202122232425262728293031323334
  1. $(function(){
  2. hljs.initHighlightingOnLoad();
  3. var EditormdView = editormd.markdownToHTML("page_md_content", {
  4. htmlDecode : "style,script,iframe", // you can filter tags decode
  5. emoji : true,
  6. taskList : true,
  7. tex : true, // 默认不解析
  8. flowChart : true, // 默认不解析
  9. sequenceDiagram : true, // 默认不解析
  10. });
  11. //为所有table标签添加bootstap支持的表格类
  12. $("table").addClass("table table-bordered table-hover");
  13. //超链接都在新窗口打开
  14. $('a[href^="http"]').each(function() {
  15. $(this).attr('target', '_blank');
  16. });
  17. if (!isMobile()) {
  18. $("th").css("min-width","77px");
  19. };
  20. $("table thead tr").css({"background-color":"#08c","color":"#fff"});
  21. $("table tr").each(function(){
  22. if($(this).find("td").eq(1).html()=="object")
  23. {
  24. $(this).css({"background-color":"#99CC99","color":"#000"});
  25. }
  26. });
  27. })