Load robots.txt instead of favicon.ico in the iframe.

This commit is contained in:
Nicolas Stepien 2012-02-07 20:41:02 +01:00
parent 11522cc0d0
commit cce108dff3
2 changed files with 6 additions and 6 deletions

View File

@ -1207,7 +1207,7 @@
iframe = $.el('iframe', {
id: 'iframe',
hidden: true,
src: 'http://sys.4chan.org/favicon.ico'
src: 'http://sys.4chan.org/robots.txt'
});
$.on(iframe, 'error', function() {
return this.src = this.src;
@ -1216,7 +1216,7 @@
if (!qr.status.ready) {
iframe.src = 'about:blank';
return setTimeout((function() {
return iframe.src = 'http://sys.4chan.org/favicon.ico';
return iframe.src = 'http://sys.4chan.org/robots.txt';
}), 250);
}
};
@ -3434,7 +3434,7 @@
}
$.on(window, 'message', Main.message);
if (location.hostname === 'sys.4chan.org') {
if (location.pathname === '/favicon.ico') {
if (location.pathname === '/robots.txt') {
qr.message.init();
} else if (/report/.test(location.search)) {
$.ready(function() {

View File

@ -880,13 +880,13 @@ qr =
iframe = $.el 'iframe',
id: 'iframe'
hidden: true
src: 'http://sys.4chan.org/favicon.ico'
src: 'http://sys.4chan.org/robots.txt'
$.on iframe, 'error', -> @src = @src
# Greasemonkey ghetto fix
loadChecking = (iframe) ->
unless qr.status.ready
iframe.src = 'about:blank'
setTimeout (-> iframe.src = 'http://sys.4chan.org/favicon.ico'), 250
setTimeout (-> iframe.src = 'http://sys.4chan.org/robots.txt'), 250
$.on iframe, 'load', -> unless @src is 'about:blank' then setTimeout loadChecking, 500, @
$.add d.body, iframe
@ -2662,7 +2662,7 @@ Main =
$.on window, 'message', Main.message
if location.hostname is 'sys.4chan.org'
if location.pathname is '/favicon.ico'
if location.pathname is '/robots.txt'
qr.message.init()
else if /report/.test location.search
$.ready ->