merge master
This commit is contained in:
commit
282c3ff9ca
27
4chan_x.js
27
4chan_x.js
@ -2,7 +2,7 @@
|
||||
// @name 4chan x
|
||||
// @namespace aeosynth
|
||||
// @description Adds various features.
|
||||
// @version 1.27.6
|
||||
// @version 1.27.8.2
|
||||
// @copyright 2009-2011 James Campos <james.r.campos@gmail.com>
|
||||
// @license MIT; http://en.wikipedia.org/wiki/Mit_license
|
||||
// @include http://boards.4chan.org/*
|
||||
@ -974,8 +974,8 @@
|
||||
}
|
||||
},
|
||||
messageIframe: function(e) {
|
||||
var message;
|
||||
message = $('table b').firstChild.textContent;
|
||||
var message, _ref;
|
||||
message = ((_ref = $('table font b')) != null ? _ref.firstChild.textContent : void 0) || '';
|
||||
e.source.postMessage(message, '*');
|
||||
return window.location = 'about:blank';
|
||||
},
|
||||
@ -983,7 +983,14 @@
|
||||
var data, dialog, error;
|
||||
data = e.data;
|
||||
dialog = $('#qr');
|
||||
if (data === 'Post successful!') {
|
||||
if (data) {
|
||||
error = $.el('span', {
|
||||
className: 'error',
|
||||
textContent: data
|
||||
});
|
||||
$.append(dialog, error);
|
||||
qr.autohide.unset();
|
||||
} else {
|
||||
if (dialog) {
|
||||
if ($.config('Persistent QR')) {
|
||||
qr.refresh(dialog);
|
||||
@ -991,15 +998,6 @@
|
||||
$.remove(dialog);
|
||||
}
|
||||
}
|
||||
g.seconds = g.sage ? 60 : 30;
|
||||
qr.cooldownStart();
|
||||
} else {
|
||||
error = $.el('span', {
|
||||
className: 'error',
|
||||
textContent: data
|
||||
});
|
||||
$.append(dialog, error);
|
||||
qr.autohide.unset();
|
||||
}
|
||||
return recaptcha.reload();
|
||||
},
|
||||
@ -1708,7 +1706,6 @@
|
||||
case 'tv':
|
||||
url = "http://green-oval.net/cgi-board.pl/" + g.BOARD + "/thread/" + g.THREAD_ID;
|
||||
break;
|
||||
case 'cgl':
|
||||
case 'jp':
|
||||
case 'm':
|
||||
case 'tg':
|
||||
@ -2022,7 +2019,7 @@
|
||||
/*
|
||||
lastChecked = Number GM_getValue('lastChecked', '0')
|
||||
now = Date.now()
|
||||
DAY = 24 * 60 * 60
|
||||
DAY = 1000 * 60 * 60 * 24
|
||||
if lastChecked < now - 1*DAY
|
||||
cutoff = now - 7*DAY
|
||||
while g.hiddenThreads.length
|
||||
|
||||
6
README.md
Normal file
6
README.md
Normal file
@ -0,0 +1,6 @@
|
||||
# Building
|
||||
|
||||
[install nodejs and npm](https://github.com/joyent/node/wiki/Installation),
|
||||
clone [coffee-script](https://github.com/jashkenas/coffee-script/),
|
||||
cd into it and run `npm link`, clone 4chan x, cd into it and run `cake dev &`.
|
||||
kill the process with `killall node`.
|
||||
@ -1,3 +1,12 @@
|
||||
1.27.8
|
||||
- fix qr image posting
|
||||
- fix thread hiding
|
||||
- fix movement
|
||||
|
||||
1.27.7
|
||||
- fix qr persist
|
||||
- fix updater defaults
|
||||
|
||||
1.27.6
|
||||
- fix 'update now' button
|
||||
|
||||
|
||||
2
header
2
header
@ -2,7 +2,7 @@
|
||||
// @name 4chan x
|
||||
// @namespace aeosynth
|
||||
// @description Adds various features.
|
||||
// @version 1.27.6
|
||||
// @version 1.27.8.2
|
||||
// @copyright 2009-2011 James Campos <james.r.campos@gmail.com>
|
||||
// @license MIT; http://en.wikipedia.org/wiki/Mit_license
|
||||
// @include http://boards.4chan.org/*
|
||||
|
||||
@ -733,27 +733,25 @@ qr =
|
||||
$.remove dialog
|
||||
|
||||
messageIframe: (e) ->
|
||||
message = $('table b').firstChild.textContent
|
||||
message = $('table font b')?.firstChild.textContent or ''
|
||||
e.source.postMessage message, '*'
|
||||
window.location = 'about:blank'
|
||||
|
||||
messageTop: (e) ->
|
||||
{data} = e
|
||||
dialog = $ '#qr'
|
||||
if data is 'Post successful!'
|
||||
if dialog
|
||||
if $.config 'Persistent QR'
|
||||
qr.refresh dialog
|
||||
else
|
||||
$.remove dialog
|
||||
g.seconds = if g.sage then 60 else 30
|
||||
qr.cooldownStart()
|
||||
else
|
||||
if data # error message
|
||||
error = $.el 'span',
|
||||
className: 'error'
|
||||
textContent: data
|
||||
$.append dialog, error
|
||||
qr.autohide.unset()
|
||||
else
|
||||
if dialog
|
||||
if $.config 'Persistent QR'
|
||||
qr.refresh dialog
|
||||
else
|
||||
$.remove dialog
|
||||
|
||||
recaptcha.reload()
|
||||
|
||||
@ -1326,7 +1324,7 @@ redirect = ->
|
||||
switch g.BOARD
|
||||
when 'a', 'g', 'lit', 'sci', 'tv'
|
||||
url = "http://green-oval.net/cgi-board.pl/#{g.BOARD}/thread/#{g.THREAD_ID}"
|
||||
when 'cgl', 'jp', 'm', 'tg'
|
||||
when 'jp', 'm', 'tg'
|
||||
url = "http://archive.easymodo.net/cgi-board.pl/#{g.BOARD}/thread/#{g.THREAD_ID}"
|
||||
when '3', 'adv', 'an', 'c', 'ck', 'co', 'fa', 'fit', 'int', 'k', 'mu', 'n', 'o', 'p', 'po', 'soc', 'sp', 'toy', 'trv', 'v', 'vp', 'x'
|
||||
url = "http://archive.no-ip.org/#{g.BOARD}/thread/#{g.THREAD_ID}"
|
||||
@ -1558,7 +1556,7 @@ if $.isDST() then g.chanOffset -= 1
|
||||
###
|
||||
lastChecked = Number GM_getValue('lastChecked', '0')
|
||||
now = Date.now()
|
||||
DAY = 24 * 60 * 60
|
||||
DAY = 1000 * 60 * 60 * 24
|
||||
if lastChecked < now - 1*DAY
|
||||
cutoff = now - 7*DAY
|
||||
while g.hiddenThreads.length
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user