graceful exit instead of erroring out

This commit is contained in:
James Campos 2010-09-03 12:03:18 -07:00
parent db73dda4b8
commit e257da61c9
2 changed files with 9 additions and 4 deletions

View File

@ -688,8 +688,10 @@ replyNav = ->
window.location = "##{op}"
#error out if there's no #navtopr.
text = $('#navtopr a').nextSibling
#graceful exit
unless navtopr = $ '#navtopr a'
return
text = navtopr.nextSibling
a = tag('a')
a.textContent = 'X'
a.className = 'pointer'

View File

@ -1,5 +1,5 @@
(function() {
var $, $$, BOARD, DAY, PAGENUM, REPLY, _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, a, arr, as, autoWatch, b, board, callback, callbacks, clearHidden, close, config, cutoff, delform, down, el, expandComment, expandThread, favEmpty, favNormal, favicon, getTime, getValue, head, hiddenReplies, hiddenThreads, hide, hideReply, hideThread, html, i, i1, id, iframe, iframeLoad, iframeLoop, img, inAfter, inBefore, input, inputs, l, l1, lastChecked, magic, minimize, mousedown, mousemove, mouseup, move, n, nodeInserted, nop, now, omitted, onloadComment, onloadThread, options, optionsSave, parseResponse, position, quickReply, r, remove, replace, replyNav, report, show, showReply, showThread, slice, span, stopPropagation, submit, tag, text, thread, threadF, threads, up, watch, watchX, watched, watcher, watcherUpdate, x, xhrs;
var $, $$, BOARD, DAY, PAGENUM, REPLY, _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, a, arr, as, autoWatch, b, board, callback, callbacks, clearHidden, close, config, cutoff, delform, down, el, expandComment, expandThread, favEmpty, favNormal, favicon, getTime, getValue, head, hiddenReplies, hiddenThreads, hide, hideReply, hideThread, html, i, i1, id, iframe, iframeLoad, iframeLoop, img, inAfter, inBefore, input, inputs, l, l1, lastChecked, magic, minimize, mousedown, mousemove, mouseup, move, n, navtopr, nodeInserted, nop, now, omitted, onloadComment, onloadThread, options, optionsSave, parseResponse, position, quickReply, r, remove, replace, replyNav, report, show, showReply, showThread, slice, span, stopPropagation, submit, tag, text, thread, threadF, threads, up, watch, watchX, watched, watcher, watcherUpdate, x, xhrs;
var __hasProp = Object.prototype.hasOwnProperty;
config = {
'Thread Hiding': true,
@ -754,7 +754,10 @@
return (window.location = ("#" + (op)));
}
};
text = $('#navtopr a').nextSibling;
if (!(navtopr = $('#navtopr a'))) {
return null;
}
text = navtopr.nextSibling;
a = tag('a');
a.textContent = 'X';
a.className = 'pointer';