Merge branch 'v3'
Conflicts: LICENSE builds/appchan-x.user.js builds/crx/script.js src/General/Navigate.coffee src/Posting/QR.coffee
This commit is contained in:
commit
4a2249d0ec
@ -3349,7 +3349,7 @@
|
|||||||
if (!(!$.hasClass(quotelink, 'deadlink'))) {
|
if (!(!$.hasClass(quotelink, 'deadlink'))) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$.add(quotelink, $.tn('\u00A0(Dead)'));
|
quotelink.textContent = quotelink.textContent + '\u00A0(Dead)';
|
||||||
$.addClass(quotelink, 'deadlink');
|
$.addClass(quotelink, 'deadlink');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -6954,7 +6954,7 @@
|
|||||||
if (Conf['Quote Inlining']) {
|
if (Conf['Quote Inlining']) {
|
||||||
$.on(link, 'click', QuoteInline.toggle);
|
$.on(link, 'click', QuoteInline.toggle);
|
||||||
if (Conf['Quote Hash Navigation']) {
|
if (Conf['Quote Hash Navigation']) {
|
||||||
nodes.push.apply(nodes, QuoteInline.qiQuote(link, $.hasClass(link, 'filtered')));
|
nodes.push(QuoteInline.qiQuote(link, $.hasClass(link, 'filtered')));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$.add(container, nodes);
|
$.add(container, nodes);
|
||||||
@ -8235,12 +8235,14 @@
|
|||||||
$.on(d, 'dragover', QR.dragOver);
|
$.on(d, 'dragover', QR.dragOver);
|
||||||
$.on(d, 'drop', QR.dropFile);
|
$.on(d, 'drop', QR.dropFile);
|
||||||
$.on(d, 'dragstart dragend', QR.drag);
|
$.on(d, 'dragstart dragend', QR.drag);
|
||||||
switch (g.VIEW) {
|
return {
|
||||||
case 'index':
|
index: function() {
|
||||||
return $.on(d, 'IndexRefresh', QR.generatePostableThreadsList);
|
return $.on(d, 'IndexRefresh', QR.generatePostableThreadsList);
|
||||||
case 'thread':
|
},
|
||||||
|
thread: function() {
|
||||||
return $.on(d, 'ThreadUpdate', QR.statusCheck);
|
return $.on(d, 'ThreadUpdate', QR.statusCheck);
|
||||||
}
|
}
|
||||||
|
}[g.VIEW]();
|
||||||
},
|
},
|
||||||
statusCheck: function() {
|
statusCheck: function() {
|
||||||
if (g.DEAD) {
|
if (g.DEAD) {
|
||||||
@ -8572,7 +8574,7 @@
|
|||||||
return list.value = g.VIEW === 'thread' ? g.THREADID : 'new';
|
return list.value = g.VIEW === 'thread' ? g.THREADID : 'new';
|
||||||
},
|
},
|
||||||
dialog: function() {
|
dialog: function() {
|
||||||
var check, dialog, elm, event, flagSelector, i, items, key, mimeTypes, name, node, nodes, save, value, _ref;
|
var check, dialog, elm, event, i, items, key, mimeTypes, name, node, nodes, save, value, _ref;
|
||||||
QR.nodes = nodes = {
|
QR.nodes = nodes = {
|
||||||
el: dialog = UI.dialog('qr', 'top:0;right:0;', "<div id=qrtab class=move><input type=checkbox id=autohide title=Auto-hide><div id=qr-thread-select><select data-name=thread title='Create a new thread / Reply'><option value=new>New thread</option></select></div><a href=javascript:; class='close fa' title=Close>\uf00d</a></div><form><div class=persona><input name=name data-name=name list=\"list-name\" placeholder=Name class=field size=1 tabindex=10><input name=email data-name=email list=\"list-email\" placeholder=E-mail class=field size=1 tabindex=20><input name=sub data-name=sub list=\"list-sub\" placeholder=Subject class=field size=1 tabindex=30> </div><div class=textarea><textarea data-name=com placeholder=Comment class=field tabindex=40></textarea><span id=char-count></span></div><div id=dump-list-container><div id=dump-list></div><a id=add-post href=javascript:; title=\"Add a post\" tabindex=50>+</a></div><div id=file-n-submit><span id=qr-filename-container class=field tabindex=60><span id=qr-no-file>No selected file</span><input id=\"qr-filename\" data-name=\"filename\" spellcheck=\"false\"><span id=qr-extras-container><label id=qr-spoiler-label><input type=checkbox id=qr-file-spoiler title='Spoiler image' tabindex=70></label><span class=description>Spoiler</span><a id=dump-button title='Dump list'>+</a><span class=description>Dump</span><a id=qr-filerm href=javascript:; title='Remove file' class=fa>\uf00d</a><span class=description>Remove File</span></span></span><input type=submit tabindex=80></div><input type=file multiple></form><datalist id=\"list-name\"></datalist><datalist id=\"list-email\"></datalist><datalist id=\"list-sub\"></datalist>")
|
el: dialog = UI.dialog('qr', 'top:0;right:0;', "<div id=qrtab class=move><input type=checkbox id=autohide title=Auto-hide><div id=qr-thread-select><select data-name=thread title='Create a new thread / Reply'><option value=new>New thread</option></select></div><a href=javascript:; class='close fa' title=Close>\uf00d</a></div><form><div class=persona><input name=name data-name=name list=\"list-name\" placeholder=Name class=field size=1 tabindex=10><input name=email data-name=email list=\"list-email\" placeholder=E-mail class=field size=1 tabindex=20><input name=sub data-name=sub list=\"list-sub\" placeholder=Subject class=field size=1 tabindex=30> </div><div class=textarea><textarea data-name=com placeholder=Comment class=field tabindex=40></textarea><span id=char-count></span></div><div id=dump-list-container><div id=dump-list></div><a id=add-post href=javascript:; title=\"Add a post\" tabindex=50>+</a></div><div id=file-n-submit><span id=qr-filename-container class=field tabindex=60><span id=qr-no-file>No selected file</span><input id=\"qr-filename\" data-name=\"filename\" spellcheck=\"false\"><span id=qr-extras-container><label id=qr-spoiler-label><input type=checkbox id=qr-file-spoiler title='Spoiler image' tabindex=70></label><span class=description>Spoiler</span><a id=dump-button title='Dump list'>+</a><span class=description>Dump</span><a id=qr-filerm href=javascript:; title='Remove file' class=fa>\uf00d</a><span class=description>Remove File</span></span></span><input type=submit tabindex=80></div><input type=file multiple></form><datalist id=\"list-name\"></datalist><datalist id=\"list-email\"></datalist><datalist id=\"list-sub\"></datalist>")
|
||||||
};
|
};
|
||||||
@ -8634,12 +8636,7 @@
|
|||||||
nodes.flashTag.dataset["default"] = '4';
|
nodes.flashTag.dataset["default"] = '4';
|
||||||
$.add(nodes.form, nodes.flashTag);
|
$.add(nodes.form, nodes.flashTag);
|
||||||
}
|
}
|
||||||
if (flagSelector = $('.flagSelector')) {
|
QR.flagsInput();
|
||||||
nodes.flag = flagSelector.cloneNode(true);
|
|
||||||
nodes.flag.dataset.name = 'flag';
|
|
||||||
nodes.flag.dataset["default"] = '0';
|
|
||||||
$.add(nodes.form, nodes.flag);
|
|
||||||
}
|
|
||||||
$.on(nodes.filename.parentNode, 'click keydown', QR.openFileInput);
|
$.on(nodes.filename.parentNode, 'click keydown', QR.openFileInput);
|
||||||
items = $$('*', QR.nodes.el);
|
items = $$('*', QR.nodes.el);
|
||||||
i = 0;
|
i = 0;
|
||||||
@ -8725,6 +8722,40 @@
|
|||||||
return $.rmClass(this, 'tripped');
|
return $.rmClass(this, 'tripped');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
flags: function() {
|
||||||
|
var flag, fn, select, _i, _len, _ref;
|
||||||
|
fn = function(val) {
|
||||||
|
return $.el('option', {
|
||||||
|
value: val[0],
|
||||||
|
textContent: val[1]
|
||||||
|
});
|
||||||
|
};
|
||||||
|
select = $.el('select', {
|
||||||
|
name: 'flag',
|
||||||
|
className: 'flagSelector'
|
||||||
|
});
|
||||||
|
_ref = [['0', 'None'], ['US', 'American'], ['KP', 'Best Korean'], ['BL', 'Black Nationalist'], ['CM', 'Communist'], ['CF', 'Confederate'], ['RE', 'Conservative'], ['EU', 'European'], ['GY', 'Gay'], ['PC', 'Hippie'], ['IL', 'Israeli'], ['DM', 'Liberal'], ['RP', 'Libertarian'], ['MF', 'Muslim'], ['NZ', 'Nazi'], ['OB', 'Obama'], ['PR', 'Pirate'], ['RB', 'Rebel'], ['TP', 'Tea Partier'], ['TX', 'Texan'], ['TR', 'Tree Hugger'], ['WP', 'White Supremacist']];
|
||||||
|
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||||
|
flag = _ref[_i];
|
||||||
|
$.add(select, fn(flag));
|
||||||
|
}
|
||||||
|
return select;
|
||||||
|
},
|
||||||
|
flagsInput: function() {
|
||||||
|
var flag, nodes;
|
||||||
|
nodes = QR.nodes;
|
||||||
|
if (nodes.flagSelector) {
|
||||||
|
$.rm(nodes.flagSelector);
|
||||||
|
delete nodes.flagSelector;
|
||||||
|
}
|
||||||
|
if (g.BOARD.ID === 'pol') {
|
||||||
|
flag = QR.flags();
|
||||||
|
flag.dataset.name = 'flag';
|
||||||
|
flag.dataset["default"] = '0';
|
||||||
|
nodes.flag = flag;
|
||||||
|
return $.add(nodes.form, flag);
|
||||||
|
}
|
||||||
|
},
|
||||||
preSubmitHooks: [],
|
preSubmitHooks: [],
|
||||||
submit: function(e) {
|
submit: function(e) {
|
||||||
var challenge, err, extra, filetag, formData, hook, options, post, response, textOnly, thread, threadID, _i, _len, _ref, _ref1;
|
var challenge, err, extra, filetag, formData, hook, options, post, response, textOnly, thread, threadID, _i, _len, _ref, _ref1;
|
||||||
@ -15696,19 +15727,32 @@
|
|||||||
return QR.generatePostableThreadsList();
|
return QR.generatePostableThreadsList();
|
||||||
},
|
},
|
||||||
updateContext: function(view) {
|
updateContext: function(view) {
|
||||||
|
var oldView;
|
||||||
|
if (view === g.VIEW) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
$.rmClass(doc, g.VIEW);
|
$.rmClass(doc, g.VIEW);
|
||||||
$.addClass(doc, view);
|
$.addClass(doc, view);
|
||||||
|
oldView = g.VIEW;
|
||||||
g.VIEW = view;
|
g.VIEW = view;
|
||||||
switch (view) {
|
return {
|
||||||
case 'index':
|
index: function() {
|
||||||
|
if (oldView === g.VIEW) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
delete g.THREADID;
|
delete g.THREADID;
|
||||||
$.off(d, 'ThreadUpdate', QR.statusCheck);
|
$.off(d, 'ThreadUpdate', QR.statusCheck);
|
||||||
return $.on(d, 'IndexRefresh', QR.generatePostableThreadsList);
|
return $.on(d, 'IndexRefresh', QR.generatePostableThreadsList);
|
||||||
case 'thread':
|
},
|
||||||
|
thread: function() {
|
||||||
g.THREADID = +window.location.pathname.split('/')[3];
|
g.THREADID = +window.location.pathname.split('/')[3];
|
||||||
|
if (oldView === g.VIEW) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
$.on(d, 'ThreadUpdate', QR.statusCheck);
|
$.on(d, 'ThreadUpdate', QR.statusCheck);
|
||||||
return $.off(d, 'IndexRefresh', QR.generatePostableThreadsList);
|
return $.off(d, 'IndexRefresh', QR.generatePostableThreadsList);
|
||||||
}
|
}
|
||||||
|
}[g.VIEW]();
|
||||||
},
|
},
|
||||||
updateBoard: function(boardID) {
|
updateBoard: function(boardID) {
|
||||||
var fullBoardList, onload, req;
|
var fullBoardList, onload, req;
|
||||||
@ -15717,6 +15761,7 @@
|
|||||||
$.rmClass($('.current', fullBoardList), 'current');
|
$.rmClass($('.current', fullBoardList), 'current');
|
||||||
$.addClass($("a[href*='/" + boardID + "/']", fullBoardList), 'current');
|
$.addClass($("a[href*='/" + boardID + "/']", fullBoardList), 'current');
|
||||||
Header.generateBoardList(Conf['boardnav'].replace(/(\r\n|\n|\r)/g, ' '));
|
Header.generateBoardList(Conf['boardnav'].replace(/(\r\n|\n|\r)/g, ' '));
|
||||||
|
QR.flagsInput();
|
||||||
onload = function(e) {
|
onload = function(e) {
|
||||||
var aboard, board, err, _i, _len, _ref;
|
var aboard, board, err, _i, _len, _ref;
|
||||||
if (e.type === 'abort') {
|
if (e.type === 'abort') {
|
||||||
@ -15750,14 +15795,14 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Navigate.updateTitle(board);
|
Navigate.updateTitle(board);
|
||||||
return Navigate.updateFavicon(!!board.ws_board);
|
return Navigate.updateSFW(!!board.ws_board);
|
||||||
};
|
};
|
||||||
return req = $.ajax('//a.4cdn.org/boards.json', {
|
return req = $.ajax('//a.4cdn.org/boards.json', {
|
||||||
onabort: onload,
|
onabort: onload,
|
||||||
onloadend: onload
|
onloadend: onload
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
updateFavicon: function(sfw) {
|
updateSFW: function(sfw) {
|
||||||
var theme;
|
var theme;
|
||||||
Favicon.el.href = "//s.4cdn.org/image/favicon" + (sfw ? '-ws' : '') + ".ico";
|
Favicon.el.href = "//s.4cdn.org/image/favicon" + (sfw ? '-ws' : '') + ".ico";
|
||||||
$.add(d.head, Favicon.el);
|
$.add(d.head, Favicon.el);
|
||||||
@ -15776,7 +15821,6 @@
|
|||||||
theme = Themes[Conf[g.THEMESTRING] || (sfw ? 'Yotsuba B' : 'Yotsuba')] || Themes[Conf[g.THEMESTRING] = sfw ? 'Yotsuba B' : 'Yotsuba'];
|
theme = Themes[Conf[g.THEMESTRING] || (sfw ? 'Yotsuba B' : 'Yotsuba')] || Themes[Conf[g.THEMESTRING] = sfw ? 'Yotsuba B' : 'Yotsuba'];
|
||||||
Style.setTheme(theme);
|
Style.setTheme(theme);
|
||||||
}
|
}
|
||||||
mainStyleSheet.href = newStyleSheet.href;
|
|
||||||
return Main.setClass();
|
return Main.setClass();
|
||||||
},
|
},
|
||||||
updateTitle: function(_arg) {
|
updateTitle: function(_arg) {
|
||||||
@ -15820,26 +15864,30 @@
|
|||||||
pageNum = view;
|
pageNum = view;
|
||||||
view = 'index';
|
view = 'index';
|
||||||
}
|
}
|
||||||
if (view !== g.VIEW) {
|
if (view === g.VIEW && boardID === g.BOARD.ID) {
|
||||||
Navigate.disconnect();
|
|
||||||
Navigate.clean();
|
|
||||||
Navigate.updateContext(view);
|
Navigate.updateContext(view);
|
||||||
|
} else {
|
||||||
|
Navigate.disconnect();
|
||||||
|
Navigate.updateContext(view);
|
||||||
|
Navigate.clean();
|
||||||
Navigate.reconnect();
|
Navigate.reconnect();
|
||||||
}
|
}
|
||||||
if (view === 'index') {
|
if (boardID === g.BOARD.ID) {
|
||||||
if (boardID === g.BOARD.ID) {
|
Navigate.title = function() {
|
||||||
Navigate.title = function() {
|
if (view === 'index') {
|
||||||
return d.title = $('.boardTitle').textContent;
|
return d.title = $('.boardTitle').textContent;
|
||||||
};
|
}
|
||||||
} else {
|
};
|
||||||
g.BOARD = new Board(boardID);
|
} else {
|
||||||
Navigate.title = function() {
|
g.BOARD = new Board(boardID);
|
||||||
return Navigate.updateBoard(boardID);
|
Navigate.title = function() {
|
||||||
};
|
return Navigate.updateBoard(boardID);
|
||||||
}
|
};
|
||||||
|
}
|
||||||
|
if (view === 'index') {
|
||||||
return Index.update(pageNum);
|
return Index.update(pageNum);
|
||||||
} else {
|
} else {
|
||||||
Navigate.updateFavicon(Favicon.SFW);
|
Navigate.updateSFW(Favicon.SFW);
|
||||||
load = Navigate.load;
|
load = Navigate.load;
|
||||||
Navigate.req = $.ajax("//a.4cdn.org/" + boardID + "/res/" + threadID + ".json", {
|
Navigate.req = $.ajax("//a.4cdn.org/" + boardID + "/res/" + threadID + ".json", {
|
||||||
onabort: load,
|
onabort: load,
|
||||||
@ -15866,6 +15914,7 @@
|
|||||||
new Notice('warning', "Failed to load thread." + (req.status ? " " + req.status : ''));
|
new Notice('warning', "Failed to load thread." + (req.status ? " " + req.status : ''));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Navigate.title();
|
||||||
try {
|
try {
|
||||||
return Navigate.parse(JSON.parse(req.response).posts);
|
return Navigate.parse(JSON.parse(req.response).posts);
|
||||||
} catch (_error) {
|
} catch (_error) {
|
||||||
|
|||||||
@ -3355,7 +3355,7 @@
|
|||||||
if (!(!$.hasClass(quotelink, 'deadlink'))) {
|
if (!(!$.hasClass(quotelink, 'deadlink'))) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$.add(quotelink, $.tn('\u00A0(Dead)'));
|
quotelink.textContent = quotelink.textContent + '\u00A0(Dead)';
|
||||||
$.addClass(quotelink, 'deadlink');
|
$.addClass(quotelink, 'deadlink');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -6957,7 +6957,7 @@
|
|||||||
if (Conf['Quote Inlining']) {
|
if (Conf['Quote Inlining']) {
|
||||||
$.on(link, 'click', QuoteInline.toggle);
|
$.on(link, 'click', QuoteInline.toggle);
|
||||||
if (Conf['Quote Hash Navigation']) {
|
if (Conf['Quote Hash Navigation']) {
|
||||||
nodes.push.apply(nodes, QuoteInline.qiQuote(link, $.hasClass(link, 'filtered')));
|
nodes.push(QuoteInline.qiQuote(link, $.hasClass(link, 'filtered')));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$.add(container, nodes);
|
$.add(container, nodes);
|
||||||
@ -8239,12 +8239,14 @@
|
|||||||
$.on(d, 'dragover', QR.dragOver);
|
$.on(d, 'dragover', QR.dragOver);
|
||||||
$.on(d, 'drop', QR.dropFile);
|
$.on(d, 'drop', QR.dropFile);
|
||||||
$.on(d, 'dragstart dragend', QR.drag);
|
$.on(d, 'dragstart dragend', QR.drag);
|
||||||
switch (g.VIEW) {
|
return {
|
||||||
case 'index':
|
index: function() {
|
||||||
return $.on(d, 'IndexRefresh', QR.generatePostableThreadsList);
|
return $.on(d, 'IndexRefresh', QR.generatePostableThreadsList);
|
||||||
case 'thread':
|
},
|
||||||
|
thread: function() {
|
||||||
return $.on(d, 'ThreadUpdate', QR.statusCheck);
|
return $.on(d, 'ThreadUpdate', QR.statusCheck);
|
||||||
}
|
}
|
||||||
|
}[g.VIEW]();
|
||||||
},
|
},
|
||||||
statusCheck: function() {
|
statusCheck: function() {
|
||||||
if (g.DEAD) {
|
if (g.DEAD) {
|
||||||
@ -8580,7 +8582,7 @@
|
|||||||
return list.value = g.VIEW === 'thread' ? g.THREADID : 'new';
|
return list.value = g.VIEW === 'thread' ? g.THREADID : 'new';
|
||||||
},
|
},
|
||||||
dialog: function() {
|
dialog: function() {
|
||||||
var check, dialog, event, flagSelector, i, items, key, mimeTypes, name, node, nodes, save, value, _ref;
|
var check, dialog, event, i, items, key, mimeTypes, name, node, nodes, save, value, _ref;
|
||||||
QR.nodes = nodes = {
|
QR.nodes = nodes = {
|
||||||
el: dialog = UI.dialog('qr', 'top:0;right:0;', "<div id=qrtab class=move><input type=checkbox id=autohide title=Auto-hide><div id=qr-thread-select><select data-name=thread title='Create a new thread / Reply'><option value=new>New thread</option></select></div><a href=javascript:; class='close fa' title=Close>\uf00d</a></div><form><div class=persona><input name=name data-name=name list=\"list-name\" placeholder=Name class=field size=1 tabindex=10><input name=email data-name=email list=\"list-email\" placeholder=E-mail class=field size=1 tabindex=20><input name=sub data-name=sub list=\"list-sub\" placeholder=Subject class=field size=1 tabindex=30> </div><div class=textarea><textarea data-name=com placeholder=Comment class=field tabindex=40></textarea><span id=char-count></span></div><div id=dump-list-container><div id=dump-list></div><a id=add-post href=javascript:; title=\"Add a post\" tabindex=50>+</a></div><div id=file-n-submit><span id=qr-filename-container class=field tabindex=60><span id=qr-no-file>No selected file</span><input id=\"qr-filename\" data-name=\"filename\" spellcheck=\"false\"><span id=qr-extras-container><label id=qr-spoiler-label><input type=checkbox id=qr-file-spoiler title='Spoiler image' tabindex=70></label><span class=description>Spoiler</span><a id=dump-button title='Dump list'>+</a><span class=description>Dump</span><a id=qr-filerm href=javascript:; title='Remove file' class=fa>\uf00d</a><span class=description>Remove File</span></span></span><input type=submit tabindex=80></div><input type=file multiple></form><datalist id=\"list-name\"></datalist><datalist id=\"list-email\"></datalist><datalist id=\"list-sub\"></datalist>")
|
el: dialog = UI.dialog('qr', 'top:0;right:0;', "<div id=qrtab class=move><input type=checkbox id=autohide title=Auto-hide><div id=qr-thread-select><select data-name=thread title='Create a new thread / Reply'><option value=new>New thread</option></select></div><a href=javascript:; class='close fa' title=Close>\uf00d</a></div><form><div class=persona><input name=name data-name=name list=\"list-name\" placeholder=Name class=field size=1 tabindex=10><input name=email data-name=email list=\"list-email\" placeholder=E-mail class=field size=1 tabindex=20><input name=sub data-name=sub list=\"list-sub\" placeholder=Subject class=field size=1 tabindex=30> </div><div class=textarea><textarea data-name=com placeholder=Comment class=field tabindex=40></textarea><span id=char-count></span></div><div id=dump-list-container><div id=dump-list></div><a id=add-post href=javascript:; title=\"Add a post\" tabindex=50>+</a></div><div id=file-n-submit><span id=qr-filename-container class=field tabindex=60><span id=qr-no-file>No selected file</span><input id=\"qr-filename\" data-name=\"filename\" spellcheck=\"false\"><span id=qr-extras-container><label id=qr-spoiler-label><input type=checkbox id=qr-file-spoiler title='Spoiler image' tabindex=70></label><span class=description>Spoiler</span><a id=dump-button title='Dump list'>+</a><span class=description>Dump</span><a id=qr-filerm href=javascript:; title='Remove file' class=fa>\uf00d</a><span class=description>Remove File</span></span></span><input type=submit tabindex=80></div><input type=file multiple></form><datalist id=\"list-name\"></datalist><datalist id=\"list-email\"></datalist><datalist id=\"list-sub\"></datalist>")
|
||||||
};
|
};
|
||||||
@ -8642,12 +8644,7 @@
|
|||||||
nodes.flashTag.dataset["default"] = '4';
|
nodes.flashTag.dataset["default"] = '4';
|
||||||
$.add(nodes.form, nodes.flashTag);
|
$.add(nodes.form, nodes.flashTag);
|
||||||
}
|
}
|
||||||
if (flagSelector = $('.flagSelector')) {
|
QR.flagsInput();
|
||||||
nodes.flag = flagSelector.cloneNode(true);
|
|
||||||
nodes.flag.dataset.name = 'flag';
|
|
||||||
nodes.flag.dataset["default"] = '0';
|
|
||||||
$.add(nodes.form, nodes.flag);
|
|
||||||
}
|
|
||||||
$.on(nodes.filename.parentNode, 'click keydown', QR.openFileInput);
|
$.on(nodes.filename.parentNode, 'click keydown', QR.openFileInput);
|
||||||
$.on(dialog, 'focusin', QR.focusin);
|
$.on(dialog, 'focusin', QR.focusin);
|
||||||
$.on(dialog, 'focusout', QR.focusout);
|
$.on(dialog, 'focusout', QR.focusout);
|
||||||
@ -8716,6 +8713,40 @@
|
|||||||
return $.rmClass(this, 'tripped');
|
return $.rmClass(this, 'tripped');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
flags: function() {
|
||||||
|
var flag, fn, select, _i, _len, _ref;
|
||||||
|
fn = function(val) {
|
||||||
|
return $.el('option', {
|
||||||
|
value: val[0],
|
||||||
|
textContent: val[1]
|
||||||
|
});
|
||||||
|
};
|
||||||
|
select = $.el('select', {
|
||||||
|
name: 'flag',
|
||||||
|
className: 'flagSelector'
|
||||||
|
});
|
||||||
|
_ref = [['0', 'None'], ['US', 'American'], ['KP', 'Best Korean'], ['BL', 'Black Nationalist'], ['CM', 'Communist'], ['CF', 'Confederate'], ['RE', 'Conservative'], ['EU', 'European'], ['GY', 'Gay'], ['PC', 'Hippie'], ['IL', 'Israeli'], ['DM', 'Liberal'], ['RP', 'Libertarian'], ['MF', 'Muslim'], ['NZ', 'Nazi'], ['OB', 'Obama'], ['PR', 'Pirate'], ['RB', 'Rebel'], ['TP', 'Tea Partier'], ['TX', 'Texan'], ['TR', 'Tree Hugger'], ['WP', 'White Supremacist']];
|
||||||
|
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||||
|
flag = _ref[_i];
|
||||||
|
$.add(select, fn(flag));
|
||||||
|
}
|
||||||
|
return select;
|
||||||
|
},
|
||||||
|
flagsInput: function() {
|
||||||
|
var flag, nodes;
|
||||||
|
nodes = QR.nodes;
|
||||||
|
if (nodes.flagSelector) {
|
||||||
|
$.rm(nodes.flagSelector);
|
||||||
|
delete nodes.flagSelector;
|
||||||
|
}
|
||||||
|
if (g.BOARD.ID === 'pol') {
|
||||||
|
flag = QR.flags();
|
||||||
|
flag.dataset.name = 'flag';
|
||||||
|
flag.dataset["default"] = '0';
|
||||||
|
nodes.flag = flag;
|
||||||
|
return $.add(nodes.form, flag);
|
||||||
|
}
|
||||||
|
},
|
||||||
preSubmitHooks: [],
|
preSubmitHooks: [],
|
||||||
submit: function(e) {
|
submit: function(e) {
|
||||||
var challenge, err, extra, filetag, formData, hook, options, post, response, textOnly, thread, threadID, _i, _len, _ref, _ref1;
|
var challenge, err, extra, filetag, formData, hook, options, post, response, textOnly, thread, threadID, _i, _len, _ref, _ref1;
|
||||||
@ -15691,19 +15722,32 @@
|
|||||||
return QR.generatePostableThreadsList();
|
return QR.generatePostableThreadsList();
|
||||||
},
|
},
|
||||||
updateContext: function(view) {
|
updateContext: function(view) {
|
||||||
|
var oldView;
|
||||||
|
if (view === g.VIEW) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
$.rmClass(doc, g.VIEW);
|
$.rmClass(doc, g.VIEW);
|
||||||
$.addClass(doc, view);
|
$.addClass(doc, view);
|
||||||
|
oldView = g.VIEW;
|
||||||
g.VIEW = view;
|
g.VIEW = view;
|
||||||
switch (view) {
|
return {
|
||||||
case 'index':
|
index: function() {
|
||||||
|
if (oldView === g.VIEW) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
delete g.THREADID;
|
delete g.THREADID;
|
||||||
$.off(d, 'ThreadUpdate', QR.statusCheck);
|
$.off(d, 'ThreadUpdate', QR.statusCheck);
|
||||||
return $.on(d, 'IndexRefresh', QR.generatePostableThreadsList);
|
return $.on(d, 'IndexRefresh', QR.generatePostableThreadsList);
|
||||||
case 'thread':
|
},
|
||||||
|
thread: function() {
|
||||||
g.THREADID = +window.location.pathname.split('/')[3];
|
g.THREADID = +window.location.pathname.split('/')[3];
|
||||||
|
if (oldView === g.VIEW) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
$.on(d, 'ThreadUpdate', QR.statusCheck);
|
$.on(d, 'ThreadUpdate', QR.statusCheck);
|
||||||
return $.off(d, 'IndexRefresh', QR.generatePostableThreadsList);
|
return $.off(d, 'IndexRefresh', QR.generatePostableThreadsList);
|
||||||
}
|
}
|
||||||
|
}[g.VIEW]();
|
||||||
},
|
},
|
||||||
updateBoard: function(boardID) {
|
updateBoard: function(boardID) {
|
||||||
var fullBoardList, onload, req;
|
var fullBoardList, onload, req;
|
||||||
@ -15712,6 +15756,7 @@
|
|||||||
$.rmClass($('.current', fullBoardList), 'current');
|
$.rmClass($('.current', fullBoardList), 'current');
|
||||||
$.addClass($("a[href*='/" + boardID + "/']", fullBoardList), 'current');
|
$.addClass($("a[href*='/" + boardID + "/']", fullBoardList), 'current');
|
||||||
Header.generateBoardList(Conf['boardnav'].replace(/(\r\n|\n|\r)/g, ' '));
|
Header.generateBoardList(Conf['boardnav'].replace(/(\r\n|\n|\r)/g, ' '));
|
||||||
|
QR.flagsInput();
|
||||||
onload = function(e) {
|
onload = function(e) {
|
||||||
var aboard, board, err, _i, _len, _ref;
|
var aboard, board, err, _i, _len, _ref;
|
||||||
if (e.type === 'abort') {
|
if (e.type === 'abort') {
|
||||||
@ -15745,14 +15790,14 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Navigate.updateTitle(board);
|
Navigate.updateTitle(board);
|
||||||
return Navigate.updateFavicon(!!board.ws_board);
|
return Navigate.updateSFW(!!board.ws_board);
|
||||||
};
|
};
|
||||||
return req = $.ajax('//a.4cdn.org/boards.json', {
|
return req = $.ajax('//a.4cdn.org/boards.json', {
|
||||||
onabort: onload,
|
onabort: onload,
|
||||||
onloadend: onload
|
onloadend: onload
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
updateFavicon: function(sfw) {
|
updateSFW: function(sfw) {
|
||||||
var theme;
|
var theme;
|
||||||
Favicon.el.href = "//s.4cdn.org/image/favicon" + (sfw ? '-ws' : '') + ".ico";
|
Favicon.el.href = "//s.4cdn.org/image/favicon" + (sfw ? '-ws' : '') + ".ico";
|
||||||
$.add(d.head, Favicon.el);
|
$.add(d.head, Favicon.el);
|
||||||
@ -15771,7 +15816,6 @@
|
|||||||
theme = Themes[Conf[g.THEMESTRING] || (sfw ? 'Yotsuba B' : 'Yotsuba')] || Themes[Conf[g.THEMESTRING] = sfw ? 'Yotsuba B' : 'Yotsuba'];
|
theme = Themes[Conf[g.THEMESTRING] || (sfw ? 'Yotsuba B' : 'Yotsuba')] || Themes[Conf[g.THEMESTRING] = sfw ? 'Yotsuba B' : 'Yotsuba'];
|
||||||
Style.setTheme(theme);
|
Style.setTheme(theme);
|
||||||
}
|
}
|
||||||
mainStyleSheet.href = newStyleSheet.href;
|
|
||||||
return Main.setClass();
|
return Main.setClass();
|
||||||
},
|
},
|
||||||
updateTitle: function(_arg) {
|
updateTitle: function(_arg) {
|
||||||
@ -15815,26 +15859,30 @@
|
|||||||
pageNum = view;
|
pageNum = view;
|
||||||
view = 'index';
|
view = 'index';
|
||||||
}
|
}
|
||||||
if (view !== g.VIEW) {
|
if (view === g.VIEW && boardID === g.BOARD.ID) {
|
||||||
Navigate.disconnect();
|
|
||||||
Navigate.clean();
|
|
||||||
Navigate.updateContext(view);
|
Navigate.updateContext(view);
|
||||||
|
} else {
|
||||||
|
Navigate.disconnect();
|
||||||
|
Navigate.updateContext(view);
|
||||||
|
Navigate.clean();
|
||||||
Navigate.reconnect();
|
Navigate.reconnect();
|
||||||
}
|
}
|
||||||
if (view === 'index') {
|
if (boardID === g.BOARD.ID) {
|
||||||
if (boardID === g.BOARD.ID) {
|
Navigate.title = function() {
|
||||||
Navigate.title = function() {
|
if (view === 'index') {
|
||||||
return d.title = $('.boardTitle').textContent;
|
return d.title = $('.boardTitle').textContent;
|
||||||
};
|
}
|
||||||
} else {
|
};
|
||||||
g.BOARD = new Board(boardID);
|
} else {
|
||||||
Navigate.title = function() {
|
g.BOARD = new Board(boardID);
|
||||||
return Navigate.updateBoard(boardID);
|
Navigate.title = function() {
|
||||||
};
|
return Navigate.updateBoard(boardID);
|
||||||
}
|
};
|
||||||
|
}
|
||||||
|
if (view === 'index') {
|
||||||
return Index.update(pageNum);
|
return Index.update(pageNum);
|
||||||
} else {
|
} else {
|
||||||
Navigate.updateFavicon(Favicon.SFW);
|
Navigate.updateSFW(Favicon.SFW);
|
||||||
load = Navigate.load;
|
load = Navigate.load;
|
||||||
Navigate.req = $.ajax("//a.4cdn.org/" + boardID + "/res/" + threadID + ".json", {
|
Navigate.req = $.ajax("//a.4cdn.org/" + boardID + "/res/" + threadID + ".json", {
|
||||||
onabort: load,
|
onabort: load,
|
||||||
@ -15861,6 +15909,7 @@
|
|||||||
new Notice('warning', "Failed to load thread." + (req.status ? " " + req.status : ''));
|
new Notice('warning', "Failed to load thread." + (req.status ? " " + req.status : ''));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Navigate.title();
|
||||||
try {
|
try {
|
||||||
return Navigate.parse(JSON.parse(req.response).posts);
|
return Navigate.parse(JSON.parse(req.response).posts);
|
||||||
} catch (_error) {
|
} catch (_error) {
|
||||||
|
|||||||
@ -90,19 +90,24 @@ Navigate =
|
|||||||
QR.generatePostableThreadsList()
|
QR.generatePostableThreadsList()
|
||||||
|
|
||||||
updateContext: (view) ->
|
updateContext: (view) ->
|
||||||
|
return if view is g.VIEW
|
||||||
|
|
||||||
$.rmClass doc, g.VIEW
|
$.rmClass doc, g.VIEW
|
||||||
$.addClass doc, view
|
$.addClass doc, view
|
||||||
|
oldView = g.VIEW
|
||||||
g.VIEW = view
|
g.VIEW = view
|
||||||
|
{
|
||||||
switch view
|
index: ->
|
||||||
when 'index'
|
return if oldView is g.VIEW
|
||||||
delete g.THREADID
|
delete g.THREADID
|
||||||
$.off d, 'ThreadUpdate', QR.statusCheck
|
$.off d, 'ThreadUpdate', QR.statusCheck
|
||||||
$.on d, 'IndexRefresh', QR.generatePostableThreadsList
|
$.on d, 'IndexRefresh', QR.generatePostableThreadsList
|
||||||
when 'thread'
|
thread: ->
|
||||||
g.THREADID = +window.location.pathname.split('/')[3]
|
g.THREADID = +window.location.pathname.split('/')[3]
|
||||||
|
return if oldView is g.VIEW
|
||||||
$.on d, 'ThreadUpdate', QR.statusCheck
|
$.on d, 'ThreadUpdate', QR.statusCheck
|
||||||
$.off d, 'IndexRefresh', QR.generatePostableThreadsList
|
$.off d, 'IndexRefresh', QR.generatePostableThreadsList
|
||||||
|
}[g.VIEW]()
|
||||||
|
|
||||||
updateBoard: (boardID) ->
|
updateBoard: (boardID) ->
|
||||||
req = null
|
req = null
|
||||||
@ -112,6 +117,8 @@ Navigate =
|
|||||||
$.addClass $("a[href*='/#{boardID}/']", fullBoardList), 'current'
|
$.addClass $("a[href*='/#{boardID}/']", fullBoardList), 'current'
|
||||||
Header.generateBoardList Conf['boardnav'].replace /(\r\n|\n|\r)/g, ' '
|
Header.generateBoardList Conf['boardnav'].replace /(\r\n|\n|\r)/g, ' '
|
||||||
|
|
||||||
|
QR.flagsInput()
|
||||||
|
|
||||||
onload = (e) ->
|
onload = (e) ->
|
||||||
if e.type is 'abort'
|
if e.type is 'abort'
|
||||||
req.onloadend = null
|
req.onloadend = null
|
||||||
@ -133,13 +140,13 @@ Navigate =
|
|||||||
|
|
||||||
return unless board
|
return unless board
|
||||||
Navigate.updateTitle board
|
Navigate.updateTitle board
|
||||||
Navigate.updateFavicon !!board.ws_board
|
Navigate.updateSFW !!board.ws_board
|
||||||
|
|
||||||
req = $.ajax '//a.4cdn.org/boards.json',
|
req = $.ajax '//a.4cdn.org/boards.json',
|
||||||
onabort: onload
|
onabort: onload
|
||||||
onloadend: onload
|
onloadend: onload
|
||||||
|
|
||||||
updateFavicon: (sfw) ->
|
updateSFW: (sfw) ->
|
||||||
# TODO: think of a better name for this. Changes style, too.
|
# TODO: think of a better name for this. Changes style, too.
|
||||||
Favicon.el.href = "//s.4cdn.org/image/favicon#{if sfw then '-ws' else ''}.ico"
|
Favicon.el.href = "//s.4cdn.org/image/favicon#{if sfw then '-ws' else ''}.ico"
|
||||||
$.add d.head, Favicon.el # Changing the href alone doesn't update the icon on Firefox
|
$.add d.head, Favicon.el # Changing the href alone doesn't update the icon on Firefox
|
||||||
@ -148,7 +155,7 @@ Navigate =
|
|||||||
|
|
||||||
Favicon.SFW = sfw
|
Favicon.SFW = sfw
|
||||||
Favicon.update()
|
Favicon.update()
|
||||||
|
|
||||||
g.TYPE = if sfw then 'sfw' else 'nsfw'
|
g.TYPE = if sfw then 'sfw' else 'nsfw'
|
||||||
if Conf["NSFW/SFW Mascots"]
|
if Conf["NSFW/SFW Mascots"]
|
||||||
Main.setMascotString()
|
Main.setMascotString()
|
||||||
@ -159,8 +166,6 @@ Navigate =
|
|||||||
theme = Themes[Conf[g.THEMESTRING] or if sfw then 'Yotsuba B' else 'Yotsuba'] or Themes[Conf[g.THEMESTRING] = if sfw then 'Yotsuba B' else 'Yotsuba']
|
theme = Themes[Conf[g.THEMESTRING] or if sfw then 'Yotsuba B' else 'Yotsuba'] or Themes[Conf[g.THEMESTRING] = if sfw then 'Yotsuba B' else 'Yotsuba']
|
||||||
Style.setTheme theme
|
Style.setTheme theme
|
||||||
|
|
||||||
mainStyleSheet.href = newStyleSheet.href
|
|
||||||
|
|
||||||
Main.setClass()
|
Main.setClass()
|
||||||
|
|
||||||
updateTitle: ({board, title}) ->
|
updateTitle: ({board, title}) ->
|
||||||
@ -195,24 +200,26 @@ Navigate =
|
|||||||
pageNum = view
|
pageNum = view
|
||||||
view = 'index' # path is "/boardID/". See the problem?
|
view = 'index' # path is "/boardID/". See the problem?
|
||||||
|
|
||||||
if view isnt g.VIEW
|
if view is g.VIEW and boardID is g.BOARD.ID
|
||||||
Navigate.disconnect()
|
|
||||||
Navigate.clean()
|
|
||||||
Navigate.updateContext view
|
Navigate.updateContext view
|
||||||
|
else # We've navigated somewhere we weren't before!
|
||||||
|
Navigate.disconnect()
|
||||||
|
Navigate.updateContext view
|
||||||
|
Navigate.clean()
|
||||||
Navigate.reconnect()
|
Navigate.reconnect()
|
||||||
|
|
||||||
if view is 'index'
|
if boardID is g.BOARD.ID
|
||||||
if boardID is g.BOARD.ID
|
Navigate.title = -> d.title = $('.boardTitle').textContent if view is 'index'
|
||||||
Navigate.title = -> d.title = $('.boardTitle').textContent
|
else
|
||||||
else
|
g.BOARD = new Board boardID
|
||||||
g.BOARD = new Board boardID
|
Navigate.title = -> Navigate.updateBoard boardID
|
||||||
Navigate.title = -> Navigate.updateBoard boardID
|
|
||||||
|
|
||||||
|
if view is 'index'
|
||||||
Index.update pageNum
|
Index.update pageNum
|
||||||
|
|
||||||
# Moving from index to thread or thread to thread
|
# Moving from index to thread or thread to thread
|
||||||
else
|
else
|
||||||
Navigate.updateFavicon Favicon.SFW
|
Navigate.updateSFW Favicon.SFW
|
||||||
{load} = Navigate
|
{load} = Navigate
|
||||||
Navigate.req = $.ajax "//a.4cdn.org/#{boardID}/res/#{threadID}.json",
|
Navigate.req = $.ajax "//a.4cdn.org/#{boardID}/res/#{threadID}.json",
|
||||||
onabort: load
|
onabort: load
|
||||||
@ -235,6 +242,8 @@ Navigate =
|
|||||||
new Notice 'warning', "Failed to load thread.#{if req.status then " #{req.status}" else ''}"
|
new Notice 'warning', "Failed to load thread.#{if req.status then " #{req.status}" else ''}"
|
||||||
return
|
return
|
||||||
|
|
||||||
|
Navigate.title()
|
||||||
|
|
||||||
try
|
try
|
||||||
Navigate.parse JSON.parse(req.response).posts
|
Navigate.parse JSON.parse(req.response).posts
|
||||||
catch err
|
catch err
|
||||||
|
|||||||
@ -180,7 +180,7 @@ class Post
|
|||||||
# Get quotelinks/backlinks to this post
|
# Get quotelinks/backlinks to this post
|
||||||
# and paint them (Dead).
|
# and paint them (Dead).
|
||||||
for quotelink in Get.allQuotelinksLinkingTo @ when not $.hasClass quotelink, 'deadlink'
|
for quotelink in Get.allQuotelinksLinkingTo @ when not $.hasClass quotelink, 'deadlink'
|
||||||
$.add quotelink, $.tn '\u00A0(Dead)'
|
quotelink.textContent = quotelink.textContent + '\u00A0(Dead)'
|
||||||
$.addClass quotelink, 'deadlink'
|
$.addClass quotelink, 'deadlink'
|
||||||
return
|
return
|
||||||
# XXX tmp fix for 4chan's racing condition
|
# XXX tmp fix for 4chan's racing condition
|
||||||
|
|||||||
@ -60,11 +60,12 @@ QR =
|
|||||||
$.on d, 'dragover', QR.dragOver
|
$.on d, 'dragover', QR.dragOver
|
||||||
$.on d, 'drop', QR.dropFile
|
$.on d, 'drop', QR.dropFile
|
||||||
$.on d, 'dragstart dragend', QR.drag
|
$.on d, 'dragstart dragend', QR.drag
|
||||||
switch g.VIEW
|
{
|
||||||
when 'index'
|
index: ->
|
||||||
$.on d, 'IndexRefresh', QR.generatePostableThreadsList
|
$.on d, 'IndexRefresh', QR.generatePostableThreadsList
|
||||||
when 'thread'
|
thread: ->
|
||||||
$.on d, 'ThreadUpdate', QR.statusCheck
|
$.on d, 'ThreadUpdate', QR.statusCheck
|
||||||
|
}[g.VIEW]()
|
||||||
|
|
||||||
statusCheck: ->
|
statusCheck: ->
|
||||||
if g.DEAD
|
if g.DEAD
|
||||||
@ -407,11 +408,8 @@ QR =
|
|||||||
"""
|
"""
|
||||||
nodes.flashTag.dataset.default = '4'
|
nodes.flashTag.dataset.default = '4'
|
||||||
$.add nodes.form, nodes.flashTag
|
$.add nodes.form, nodes.flashTag
|
||||||
if flagSelector = $ '.flagSelector'
|
|
||||||
nodes.flag = flagSelector.cloneNode true
|
QR.flagsInput()
|
||||||
nodes.flag.dataset.name = 'flag'
|
|
||||||
nodes.flag.dataset.default = '0'
|
|
||||||
$.add nodes.form, nodes.flag
|
|
||||||
|
|
||||||
$.on nodes.filename.parentNode, 'click keydown', QR.openFileInput
|
$.on nodes.filename.parentNode, 'click keydown', QR.openFileInput
|
||||||
|
|
||||||
@ -487,6 +485,54 @@ QR =
|
|||||||
if check and !@.className.match "\\btripped\\b" then $.addClass @, 'tripped'
|
if check and !@.className.match "\\btripped\\b" then $.addClass @, 'tripped'
|
||||||
else if !check and @.className.match "\\btripped\\b" then $.rmClass @, 'tripped'
|
else if !check and @.className.match "\\btripped\\b" then $.rmClass @, 'tripped'
|
||||||
|
|
||||||
|
flags: ->
|
||||||
|
fn = (val) -> $.el 'option',
|
||||||
|
value: val[0]
|
||||||
|
textContent: val[1]
|
||||||
|
select = $.el 'select',
|
||||||
|
name: 'flag'
|
||||||
|
className: 'flagSelector'
|
||||||
|
|
||||||
|
$.add select, fn flag for flag in [
|
||||||
|
['0', 'None']
|
||||||
|
['US', 'American']
|
||||||
|
['KP', 'Best Korean']
|
||||||
|
['BL', 'Black Nationalist']
|
||||||
|
['CM', 'Communist']
|
||||||
|
['CF', 'Confederate']
|
||||||
|
['RE', 'Conservative']
|
||||||
|
['EU', 'European']
|
||||||
|
['GY', 'Gay']
|
||||||
|
['PC', 'Hippie']
|
||||||
|
['IL', 'Israeli']
|
||||||
|
['DM', 'Liberal']
|
||||||
|
['RP', 'Libertarian']
|
||||||
|
['MF', 'Muslim']
|
||||||
|
['NZ', 'Nazi']
|
||||||
|
['OB', 'Obama']
|
||||||
|
['PR', 'Pirate']
|
||||||
|
['RB', 'Rebel']
|
||||||
|
['TP', 'Tea Partier']
|
||||||
|
['TX', 'Texan']
|
||||||
|
['TR', 'Tree Hugger']
|
||||||
|
['WP', 'White Supremacist']
|
||||||
|
]
|
||||||
|
|
||||||
|
select
|
||||||
|
|
||||||
|
flagsInput: ->
|
||||||
|
{nodes} = QR
|
||||||
|
if nodes.flagSelector
|
||||||
|
$.rm nodes.flagSelector
|
||||||
|
delete nodes.flagSelector
|
||||||
|
|
||||||
|
if g.BOARD.ID is 'pol'
|
||||||
|
flag = QR.flags()
|
||||||
|
flag.dataset.name = 'flag'
|
||||||
|
flag.dataset.default = '0'
|
||||||
|
nodes.flag = flag
|
||||||
|
$.add nodes.form, flag
|
||||||
|
|
||||||
preSubmitHooks: []
|
preSubmitHooks: []
|
||||||
|
|
||||||
submit: (e) ->
|
submit: (e) ->
|
||||||
|
|||||||
@ -42,7 +42,7 @@ QuoteBacklink =
|
|||||||
$.on link, 'mouseover', QuotePreview.mouseover
|
$.on link, 'mouseover', QuotePreview.mouseover
|
||||||
if Conf['Quote Inlining']
|
if Conf['Quote Inlining']
|
||||||
$.on link, 'click', QuoteInline.toggle
|
$.on link, 'click', QuoteInline.toggle
|
||||||
nodes.push.apply nodes, QuoteInline.qiQuote link, $.hasClass link, 'filtered' if Conf['Quote Hash Navigation']
|
nodes.push QuoteInline.qiQuote link, $.hasClass link, 'filtered' if Conf['Quote Hash Navigation']
|
||||||
$.add container, nodes
|
$.add container, nodes
|
||||||
return
|
return
|
||||||
secondNode: ->
|
secondNode: ->
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user