fix auto-updater. 2.21.4

This commit is contained in:
Nicolas Stepien 2011-11-28 02:45:42 +01:00
parent 692fae179b
commit 3c9665780b
5 changed files with 13 additions and 9 deletions

View File

@ -1,6 +1,6 @@
// ==UserScript==
// @name 4chan x
// @version 2.21.3
// @version 2.21.4
// @namespace aeosynth
// @description Adds various features.
// @copyright 2009-2011 James Campos <james.r.campos@gmail.com>
@ -15,7 +15,7 @@
*
* Copyright (c) 2009-2011 James Campos <james.r.campos@gmail.com>
* http://mayhemydg.github.com/4chan-x/
* 4chan x 2.21.3
* 4chan x 2.21.4
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
@ -211,7 +211,7 @@
NAMESPACE = '4chan_x.';
VERSION = '2.21.3';
VERSION = '2.21.4';
SECOND = 1000;
@ -3035,12 +3035,12 @@
return options.init();
},
message: function(e) {
var data, location, origin;
var data, origin;
origin = e.origin, data = e.data;
if (origin === 'http://sys.4chan.org') {
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?')) {
return 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";
}
},
node: function(e) {

View File

@ -2,7 +2,7 @@
{exec} = require 'child_process'
fs = require 'fs'
VERSION = '2.21.3'
VERSION = '2.21.4'
HEADER = """
// ==UserScript==

View File

@ -1,5 +1,9 @@
master
2.21.4
- mayhem
fix auto-updater
2.21.3
- mayhem
fix locked thread icons with fit width/screen enabled on Firefox

View File

@ -1 +1 @@
postMessage({version:'2.21.3'},'*');
postMessage({version:'2.21.4'},'*');

View File

@ -122,7 +122,7 @@ conf = {}
) null, config
NAMESPACE = '4chan_x.'
VERSION = '2.21.3'
VERSION = '2.21.4'
SECOND = 1000
MINUTE = 60*SECOND
HOUR = 60*MINUTE
@ -2413,7 +2413,7 @@ Main =
if origin is 'http://sys.4chan.org'
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?'
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) ->
{target} = e