pretty.js 459 B

123456789101112131415161718
  1. /**
  2. * @author yangjian
  3. * @since 18-9-11 下午9:02.
  4. */
  5. // function _bindEvent(el, type, fn) {
  6. // if (el.addEventListener){
  7. // el.addEventListener(type, fn);
  8. // } else if (el.attachEvent){
  9. // el.attachEvent('on' + type, fn);
  10. // }
  11. // }
  12. // _bindEvent(document.body, "DOMNodeInserted", function(e) {
  13. // var className = e.target.className;
  14. // if (className && className.indexOf("language-") != -1) {
  15. // Prism.highlightElement(e.target);
  16. // }
  17. // })