titlepost
This commit is contained in:
parent
b5889009b7
commit
2985529016
16
4chan_x.js
16
4chan_x.js
@ -59,7 +59,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
var $, $$, NAMESPACE, anonymize, autoWatch, callback, config, d, delform, el, expand, expandComment, expandThread, g, imageClick, imageExpand, imageExpandClick, imageHover, imageResize, imageThumb, imageToggle, imageType, imageTypeChange, keybinds, localize, log, nav, navtopr, nodeInserted, option, options, pathname, qr, quickReport, recaptcha, recaptchaListener, recaptchaReload, redirect, replyHiding, sauce, scroll, temp, text, threadHiding, tzOffset, ui, updateFavicon, updateTitle, updater, watcher, _config, _i, _j, _k, _len, _len2, _len3, _ref, _ref2, _ref3, _ref4;
|
var $, $$, NAMESPACE, anonymize, autoWatch, callback, config, d, delform, el, expand, expandComment, expandThread, g, imageClick, imageExpand, imageExpandClick, imageHover, imageResize, imageThumb, imageToggle, imageType, imageTypeChange, keybinds, localize, log, nav, navtopr, nodeInserted, option, options, pathname, qr, quickReport, recaptcha, recaptchaListener, recaptchaReload, redirect, replyHiding, sauce, scroll, temp, threadHiding, titlePost, tzOffset, ui, updateFavicon, updateTitle, updater, watcher, _config, _i, _j, _k, _len, _len2, _len3, _ref, _ref2, _ref3, _ref4;
|
||||||
var __slice = Array.prototype.slice;
|
var __slice = Array.prototype.slice;
|
||||||
if (typeof console != "undefined" && console !== null) {
|
if (typeof console != "undefined" && console !== null) {
|
||||||
log = console.log;
|
log = console.log;
|
||||||
@ -1647,6 +1647,13 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
titlePost = {
|
||||||
|
init: function() {
|
||||||
|
var el;
|
||||||
|
el = $('span.filetitle') || $('blockquote');
|
||||||
|
return d.title = "/" + g.BOARD + "/ - " + el.textContent;
|
||||||
|
}
|
||||||
|
};
|
||||||
imageClick = function(e) {
|
imageClick = function(e) {
|
||||||
if (e.shiftKey || e.altKey || e.ctrlKey) {
|
if (e.shiftKey || e.altKey || e.ctrlKey) {
|
||||||
return;
|
return;
|
||||||
@ -2148,12 +2155,7 @@
|
|||||||
qr.persist();
|
qr.persist();
|
||||||
}
|
}
|
||||||
if ($.config('Post in Title')) {
|
if ($.config('Post in Title')) {
|
||||||
if (!(text = $('span.filetitle').textContent)) {
|
titlePost.init();
|
||||||
text = $('blockquote').textContent;
|
|
||||||
}
|
|
||||||
if (text) {
|
|
||||||
d.title = "/" + g.BOARD + "/ - " + text;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if ($.config('Unread Count')) {
|
if ($.config('Unread Count')) {
|
||||||
g.replies = [];
|
g.replies = [];
|
||||||
|
|||||||
@ -1290,6 +1290,11 @@ localize =
|
|||||||
][date.getDay()]
|
][date.getDay()]
|
||||||
s.textContent = " #{month}/#{day}/#{year}(#{dotw})#{hour}:#{min_sec} "
|
s.textContent = " #{month}/#{day}/#{year}(#{dotw})#{hour}:#{min_sec} "
|
||||||
|
|
||||||
|
titlePost =
|
||||||
|
init: ->
|
||||||
|
el = $('span.filetitle') or $('blockquote')
|
||||||
|
d.title = "/#{g.BOARD}/ - #{el.textContent}"
|
||||||
|
|
||||||
# TODO rewrite these **************************************************************************
|
# TODO rewrite these **************************************************************************
|
||||||
|
|
||||||
imageClick = (e) ->
|
imageClick = (e) ->
|
||||||
@ -1693,10 +1698,7 @@ if g.REPLY
|
|||||||
if $.config('Quick Reply') and $.config 'Persistent QR'
|
if $.config('Quick Reply') and $.config 'Persistent QR'
|
||||||
qr.persist()
|
qr.persist()
|
||||||
if $.config 'Post in Title'
|
if $.config 'Post in Title'
|
||||||
unless text = $('span.filetitle').textContent
|
titlePost.init()
|
||||||
text = $('blockquote').textContent
|
|
||||||
if text
|
|
||||||
d.title = "/#{g.BOARD}/ - #{text}"
|
|
||||||
if $.config 'Unread Count'
|
if $.config 'Unread Count'
|
||||||
g.replies = []
|
g.replies = []
|
||||||
d.title = '(0) ' + d.title
|
d.title = '(0) ' + d.title
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user