Ghettofix greasemonkey compatibility since your average Firefox doesn't read changelogs/known bug lists. Close #141.

This commit is contained in:
Nicolas Stepien 2012-02-01 23:52:18 +01:00
parent f3d06094fc
commit 7964acdce6
3 changed files with 16 additions and 0 deletions

View File

@ -1218,6 +1218,15 @@
$.on(iframe, 'error', function() {
return this.src = this.src;
});
$.on(iframe, 'load', function() {
var _this = this;
if (!(qr.status.ready || this.src === 'about:blank')) {
this.src = 'about:blank';
return setTimeout((function() {
return _this.src = 'http://sys.4chan.org/post';
}), 250);
}
});
$.add(d.body, iframe);
if (conf['Persistent QR']) {
qr.dialog();

View File

@ -2,6 +2,8 @@ master
- Mayhem
Reverted updater's scrolling behavior.
Fix image posting on Firefox along with Unicode characters in the form.
Ghettofix Greasemonkey compatibility with the new QR.
Greasemonkey is still NOT RECOMMENDED, use Scriptish instead.
2.25.1
- Mayhem

View File

@ -874,6 +874,11 @@ qr =
hidden: true
src: 'http://sys.4chan.org/post'
$.on iframe, 'error', -> @src = @src
# Greasemonkey ghetto fix
$.on iframe, 'load', ->
unless qr.status.ready or @src is 'about:blank'
@src = 'about:blank'
setTimeout (=> @src = 'http://sys.4chan.org/post'), 250
$.add d.body, iframe
if conf['Persistent QR']
qr.dialog()