diff --git a/4chan_x.user.js b/4chan_x.user.js index 02a62087b..11d2e7434 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -1760,7 +1760,7 @@ input.disabled = true; input.value = 404; } - d.title = d.title.match(/.+-/)[0] + ' 404'; + d.title = d.title.match(/^.+-/)[0] + ' 404'; g.dead = true; Favicon.update(); return; @@ -1773,7 +1773,6 @@ This saves bandwidth for both the user and the servers, avoid unnecessary computation, and won't load images and scripts when parsing the response. */ - updater.lastModified = this.getResponseHeader('Last-Modified'); if (this.status === 304) { if (conf['Verbose']) { updater.count.textContent = '+0'; @@ -1781,6 +1780,7 @@ } return; } + updater.lastModified = this.getResponseHeader('Last-Modified'); body = $.el('body', { innerHTML: this.responseText }); diff --git a/script.coffee b/script.coffee index c7bacc5a4..293a7f70a 100644 --- a/script.coffee +++ b/script.coffee @@ -1364,8 +1364,7 @@ updater = for input in $$ '#com_submit' input.disabled = true input.value = 404 - # XXX trailing spaces are trimmed - d.title = d.title.match(/.+-/)[0] + ' 404' + d.title = d.title.match(/^.+-/)[0] + ' 404' g.dead = true Favicon.update() return @@ -1379,12 +1378,12 @@ updater = This saves bandwidth for both the user and the servers, avoid unnecessary computation, and won't load images and scripts when parsing the response. ### - updater.lastModified = @getResponseHeader('Last-Modified') if @status is 304 if conf['Verbose'] updater.count.textContent = '+0' updater.count.className = null return + updater.lastModified = @getResponseHeader 'Last-Modified' body = $.el 'body', innerHTML: @responseText