Verify that data.version is actually sent, should resolve issue #29
This commit is contained in:
parent
dc0386a05c
commit
b85f525758
@ -3064,7 +3064,7 @@
|
|||||||
origin = e.origin, data = e.data;
|
origin = e.origin, data = e.data;
|
||||||
if (origin === 'http://sys.4chan.org') {
|
if (origin === 'http://sys.4chan.org') {
|
||||||
return qr.message(data);
|
return qr.message(data);
|
||||||
} else if (data.version !== VERSION && confirm('An updated version of 4chan X is available, would you like to install it now?')) {
|
} else if (data.version && data.version !== VERSION && confirm('An updated version of 4chan X is available, would you like to install it now?')) {
|
||||||
return window.location = "https://raw.github.com/mayhemydg/4chan-x/" + data.version + "/4chan_x.user.js";
|
return window.location = "https://raw.github.com/mayhemydg/4chan-x/" + data.version + "/4chan_x.user.js";
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
master
|
master
|
||||||
|
- mayhem
|
||||||
|
fix obscure and continuous prompts to auto update
|
||||||
|
|
||||||
2.22.1
|
2.22.1
|
||||||
- mayhem
|
- mayhem
|
||||||
|
|||||||
@ -2437,7 +2437,7 @@ Main =
|
|||||||
{origin, data} = e
|
{origin, data} = e
|
||||||
if origin is 'http://sys.4chan.org'
|
if origin is 'http://sys.4chan.org'
|
||||||
qr.message data
|
qr.message data
|
||||||
else if data.version isnt VERSION and confirm 'An updated version of 4chan X is available, would you like to install it now?'
|
else if data.version and data.version isnt VERSION and confirm 'An updated version of 4chan X is available, would you like to install it now?'
|
||||||
window.location = "https://raw.github.com/mayhemydg/4chan-x/#{data.version}/4chan_x.user.js"
|
window.location = "https://raw.github.com/mayhemydg/4chan-x/#{data.version}/4chan_x.user.js"
|
||||||
|
|
||||||
node: (e) ->
|
node: (e) ->
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user