下了个typecho模板,发现Uncaught SyntaxError: Invalid or unexpected token
这个问题,定位了下,好像是下面这段代码导致的。
麻烦大佬帮忙看一下,正确的写法该怎么写(貌似是最后两行的问题),谢谢~
<script type="text/javascript">
(function () {
var event = document.addEventListener ? {
add: 'addEventListener',
triggers: ['scroll', 'mousemove', 'keyup', 'touchstart'],
load: 'DOMContentLoaded'
} : {
add: 'attachEvent',
triggers: ['onfocus', 'onmousemove', 'onkeyup', 'ontouchstart'],
load: 'onload'
},
added = false;
document[event.add](event.load, function () {
var r = document.getElementById('respond-post-14'),
input = document.createElement('input');
input.type = 'hidden';
input.name = '_';
input.value = (function () {
var _lxrVuZJ = '7c7' +
/* 'q'+'8'+'6c'+/* '9Be'+'e'+'d1b'+''+'b'+'73'+'4ba'+'d'+'2c'+'f'+'b6'+'258'+'c'+'4'+'64', _O6K7Z = []; for (var i = 0; i < _O6K7Z.length; i ++) { _lxrVuZJ = _lxrVuZJ.substring(0, _O6K7Z[i][0]) + _lxrVuZJ.substring(_O6K7Z[i][1]); } return _lxrVuZJ;})(); if (null != r) { var forms = r.getElementsByTagName('form'); if (forms.length > 0) { function append() { if (!added) { forms[0].appendChild(input); added = true; } } for (var i = 0; i < event.triggers.length; i ++) { var trigger = event.triggers[i]; document[event.add](trigger, append); window[event.add](trigger, append); } } } });})();
</script>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…