Bump to version 2.21.0, add stable updaptes to the master branch.

This commit is contained in:
Nicolas Stepien 2011-11-26 23:34:01 +01:00
parent 7c103f99f2
commit 8862e3dbcc
4 changed files with 33 additions and 8 deletions

View File

@ -1,5 +1,6 @@
// ==UserScript==
// @name 4chan x
// @version 2.21.0
// @namespace aeosynth
// @description Adds various features.
// @copyright 2009-2011 James Campos <james.r.campos@gmail.com>
@ -13,7 +14,8 @@
/* LICENSE
*
* Copyright (c) 2009-2011 James Campos <james.r.campos@gmail.com>
* http://aeosynth.github.com/4chan-x/
* http://mayhemydg.github.com/4chan-x/
* 4chan x 2.21.0
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
@ -64,7 +66,7 @@
*/
(function() {
var $, $$, DAY, Favicon, HOUR, MINUTE, Main, NAMESPACE, Recaptcha, SECOND, Time, anonymize, conf, config, cooldown, d, expandComment, expandThread, filter, flatten, g, getTitle, imgExpand, imgGif, imgHover, key, keybinds, log, nav, options, qr, quoteBacklink, quoteInline, quoteOP, quotePreview, redirect, replyHiding, reportButton, revealSpoilers, sauce, strikethroughQuotes, threadHiding, threadStats, threading, titlePost, ui, unread, updater, val, watcher;
var $, $$, DAY, Favicon, HOUR, MINUTE, Main, NAMESPACE, Recaptcha, SECOND, Time, VERSION, anonymize, conf, config, cooldown, d, expandComment, expandThread, filter, flatten, g, getTitle, imgExpand, imgGif, imgHover, key, keybinds, log, nav, options, qr, quoteBacklink, quoteInline, quoteOP, quotePreview, redirect, replyHiding, reportButton, revealSpoilers, sauce, strikethroughQuotes, threadHiding, threadStats, threading, titlePost, ui, unread, updater, val, watcher;
var __slice = Array.prototype.slice;
config = {
@ -77,7 +79,8 @@
'Comment Expansion': [true, 'Expand too long comments'],
'Thread Expansion': [true, 'View all replies'],
'Index Navigation': [true, 'Navigate to previous / next thread'],
'Reply Navigation': [false, 'Navigate to top / bottom of thread']
'Reply Navigation': [false, 'Navigate to top / bottom of thread'],
'Check for Updates': [true, 'Check for updated versions of 4chan X']
},
Filtering: {
'Anonymize': [false, 'Make everybody anonymous'],
@ -208,6 +211,8 @@
NAMESPACE = '4chan_x.';
VERSION = '2.21.0';
SECOND = 1000;
MINUTE = 60 * SECOND;
@ -2963,6 +2968,11 @@
$.addStyle(Main.css);
threading.init();
Favicon.init();
if (Main.reqUpdate && conf['Check for Updates']) {
$.add(d.head, $.el('script', {
src: 'https://raw.github.com/mayhemydg/4chan-x/master/latest.js'
}));
}
if ((form = $('form[name=post]')) && (canPost = !!$('#recaptcha_response_field'))) {
Recaptcha.init();
if (g.REPLY && conf['Auto Watch Reply'] && conf['Thread Watcher']) {
@ -3013,9 +3023,13 @@
return options.init();
},
message: function(e) {
var data, origin;
var data, location, origin;
origin = e.origin, data = e.data;
if (origin === 'http://sys.4chan.org') return qr.message(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";
}
},
node: function(e) {
var callback, target, _i, _len, _ref, _results;

View File

@ -2,9 +2,12 @@
{exec} = require 'child_process'
fs = require 'fs'
VERSION = '2.21.0'
HEADER = """
// ==UserScript==
// @name 4chan x
// @version #{VERSION}
// @namespace aeosynth
// @description Adds various features.
// @copyright 2009-2011 James Campos <james.r.campos@gmail.com>
@ -18,7 +21,8 @@ HEADER = """
/* LICENSE
*
* Copyright (c) 2009-2011 James Campos <james.r.campos@gmail.com>
* http://aeosynth.github.com/4chan-x/
* http://mayhemydg.github.com/4chan-x/
* 4chan x #{VERSION}
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation

View File

@ -1,4 +1,6 @@
master
2.21.0
- mayhem
initiate 4chan X earlier
performance improvements
@ -7,8 +9,6 @@ master
automatically reload expanded pictures on error
handle bans with the thread updater
use unread favicons by ferongr
- aeosynth
quick reply redesign
2.20.3
- mayhem

View File

@ -9,6 +9,7 @@ config =
'Thread Expansion': [true, 'View all replies']
'Index Navigation': [true, 'Navigate to previous / next thread']
'Reply Navigation': [false, 'Navigate to top / bottom of thread']
'Check for Updates': [true, 'Check for updated versions of 4chan X']
Filtering:
'Anonymize': [false, 'Make everybody anonymous']
'Filter': [false, 'Self-moderation placebo']
@ -121,6 +122,7 @@ conf = {}
) null, config
NAMESPACE = '4chan_x.'
VERSION = '2.21.0'
SECOND = 1000
MINUTE = 60*SECOND
HOUR = 60*MINUTE
@ -2319,6 +2321,9 @@ Main =
threading.init()
Favicon.init()
if Main.reqUpdate and conf['Check for Updates']
$.add d.head, $.el 'script', src: 'https://raw.github.com/mayhemydg/4chan-x/master/latest.js'
#recaptcha may be blocked, eg by noscript
if (form = $ 'form[name=post]') and (canPost = !!$ '#recaptcha_response_field')
Recaptcha.init()
@ -2397,6 +2402,8 @@ Main =
{origin, data} = e
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"
node: (e) ->
{target} = e