diff --git a/4chan_x.user.js b/4chan_x.user.js
index 9baec94fb..8480bb589 100644
--- a/4chan_x.user.js
+++ b/4chan_x.user.js
@@ -1183,7 +1183,9 @@
return cooldown.start();
}
});
- return $('.postarea form').action += '?cooldown';
+ if (g.REPLY) {
+ return $('.postarea form').action += '?cooldown';
+ }
},
start: function() {
var submit, _i, _len, _ref;
@@ -1216,7 +1218,7 @@
submit.disabled = false;
submit.value = 'Submit';
}
- if (!qr.postInvalid()) {
+ if (qr.el && $('#auto', qr.el).checked || !qr.postInvalid()) {
return qr.submit.call($('form', qr.el));
}
}
@@ -1296,7 +1298,7 @@
THREAD_ID = g.THREAD_ID || $.x('ancestor::div[@class="thread"]/div', link).id;
spoiler = $('.postarea label') ? '' : '';
challenge = $('#recaptcha_challenge_field').value;
- html = " X
Quick Reply
";
+ html = " X Quick Reply
";
qr.el = ui.dialog('qr', {
top: '0px',
left: '0px'
@@ -1876,17 +1878,20 @@
},
watch: function(thread, id) {
var el, props, watched, _name;
- el = $('span.filetitle');
- if (!el.textContent) {
- el = $('blockquote');
- if (!el.textContent) {
- return;
- }
- }
+ el = $('span.filetitle', thread);
props = {
- textContent: "/" + g.BOARD + "/ - " + ($.innerText(el).slice(0, 25)),
href: "/" + g.BOARD + "/res/" + id
};
+ if (!el.textContent) {
+ el = $('blockquote', thread);
+ if (el.textContent) {
+ props.textContent = "/" + g.BOARD + "/ - " + ($.innerText(el).slice(0, 25));
+ } else {
+ props.textContent = d.title;
+ }
+ } else {
+ props.textContent = "/" + g.BOARD + "/ - " + ($.innerText(el).slice(0, 25));
+ }
watched = $.get('watched', {});
watched[_name = g.BOARD] || (watched[_name] = {});
watched[g.BOARD][id] = props;
@@ -2283,9 +2288,10 @@
} else {
qp.innerHTML = "Loading " + id + "...";
threadID = this.pathname.split('/').pop() || $.x('ancestor::div[@class="thread"]/div', this).id;
- return $.cache(this.pathname, (function() {
+ $.cache(this.pathname, (function() {
return quotePreview.parse(this, id, threadID);
}));
+ return ui.hover();
}
},
mouseout: function() {
diff --git a/changelog b/changelog
index 6b4598a74..e22016044 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,10 @@
+GitHub
+- mayhem:
+ bring back auto posting
+ don't start the cooldown on thread creation
+- aeosynth:
+ show linebreaks as spaces in title & watcher
+
11.8.15
- aeosynth:
convert qr from hidden iframes to ajax
diff --git a/script.coffee b/script.coffee
index 956b03d4e..7cff549ce 100644
--- a/script.coffee
+++ b/script.coffee
@@ -938,7 +938,7 @@ cooldown =
$.set g.BOARD+'/cooldown', time if $.get(g.BOARD+'/cooldown', 0) < time
cooldown.start() if Date.now() < $.get g.BOARD+'/cooldown', 0
$.bind window, 'storage', (e) -> cooldown.start() if e.key is "#{NAMESPACE}#{g.BOARD}/cooldown"
- $('.postarea form').action += '?cooldown'
+ $('.postarea form').action += '?cooldown' if g.REPLY
start: ->
cooldown.duration = Math.ceil ($.get(g.BOARD+'/cooldown', 0) - Date.now()) / 1000
@@ -958,7 +958,7 @@ cooldown =
for submit in submits
submit.disabled = false
submit.value = 'Submit'
- unless qr.postInvalid()
+ if qr.el and $('#auto', qr.el).checked or not qr.postInvalid()
qr.submit.call $ 'form', qr.el
qr =
@@ -1042,7 +1042,7 @@ qr =
#{spoiler}
-
+
#{$.get('captchas', []).length} captchas
@@ -1538,14 +1538,17 @@ watcher =
watcher.refresh()
watch: (thread, id) ->
- el = $ 'span.filetitle'
- if not el.textContent
- el = $ 'blockquote'
- if not el.textContent
- return
+ el = $ 'span.filetitle', thread
props =
- textContent: "/#{g.BOARD}/ - #{$.innerText(el)[...25]}"
href: "/#{g.BOARD}/res/#{id}"
+ if not el.textContent
+ el = $ 'blockquote', thread
+ if el.textContent
+ props.textContent = "/#{g.BOARD}/ - #{$.innerText(el)[...25]}"
+ else
+ props.textContent = d.title
+ else
+ props.textContent = "/#{g.BOARD}/ - #{$.innerText(el)[...25]}"
watched = $.get 'watched', {}
watched[g.BOARD] or= {}
@@ -1788,6 +1791,7 @@ quotePreview =
qp.innerHTML = "Loading #{id}..."
threadID = @pathname.split('/').pop() or $.x('ancestor::div[@class="thread"]/div', @).id
$.cache @pathname, (-> quotePreview.parse @, id, threadID)
+ ui.hover()
mouseout: ->
$.removeClass el, 'qphl' if el = $.id @hash[1..]
ui.hoverend()