Replace × and \u00d7 by ×.

This commit is contained in:
Nicolas Stepien 2012-06-26 17:51:02 +02:00
parent 4cc2e73306
commit c8176435fb
2 changed files with 14 additions and 17 deletions

View File

@ -850,13 +850,13 @@
a = $('.summary', thread);
switch (a.textContent[0]) {
case '+':
a.textContent = a.textContent.replace('+', '\u00d7 Loading...');
a.textContent = a.textContent.replace('+', '× Loading...');
$.cache(pathname, function() {
return ExpandThread.parse(this, thread, a);
});
break;
case '\u00d7':
a.textContent = a.textContent.replace('\u00d7 Loading...', '+');
case '×':
a.textContent = a.textContent.replace('× Loading...', '+');
$.cache.requests[pathname].abort();
break;
case '-':
@ -887,7 +887,7 @@
$.off(a, 'click', ExpandThread.cb.toggle);
return;
}
a.textContent = a.textContent.replace('\u00d7 Loading...', '-');
a.textContent = a.textContent.replace('× Loading...', '-');
doc = d.implementation.createHTMLDocument('');
doc.documentElement.innerHTML = req.response;
threadID = thread.id.slice(1);
@ -1770,7 +1770,7 @@
className: 'thumbnail',
draggable: true,
href: 'javascript:;',
innerHTML: '<a class=remove>&times;</a><label hidden><input type=checkbox> Spoiler</label><span></span>'
innerHTML: '<a class=remove>×</a><label hidden><input type=checkbox> Spoiler</label><span></span>'
});
$('input', this.el).checked = this.spoiler;
$.on(this.el, 'click', function() {
@ -2052,7 +2052,7 @@
QR.el = UI.dialog('qr', 'top:0;right:0;', '\
<div class=move>\
Quick Reply <input type=checkbox id=autohide title=Auto-hide>\
<span> <a class=close title=Close>&times;</a></span>\
<span> <a class=close title=Close>×</a></span>\
</div>\
<form>\
<div><input id=dump type=button title="Dump list" value=+ class=field><input name=name title=Name placeholder=Name class=field size=1><input name=email title=E-mail placeholder=E-mail class=field size=1><input name=sub title=Subject placeholder=Subject class=field size=1></div>\
@ -2834,7 +2834,7 @@
for (id in _ref) {
props = _ref[id];
x = $.el('a', {
textContent: '\u00d7',
textContent: '×',
href: 'javascript:;'
});
$.on(x, 'click', Watcher.cb.x);

View File

@ -649,15 +649,13 @@ ExpandThread =
pathname = "/#{g.BOARD}/res/#{thread.id[1..]}"
a = $ '.summary', thread
# \u00d7 is &times;
switch a.textContent[0]
when '+'
a.textContent = a.textContent.replace '+', '\u00d7 Loading...'
a.textContent = a.textContent.replace '+', '× Loading...'
$.cache pathname, -> ExpandThread.parse @, thread, a
when '\u00d7'
a.textContent = a.textContent.replace '\u00d7 Loading...', '+'
when '×'
a.textContent = a.textContent.replace '× Loading...', '+'
$.cache.requests[pathname].abort()
when '-'
@ -679,7 +677,7 @@ ExpandThread =
$.off a, 'click', ExpandThread.cb.toggle
return
a.textContent = a.textContent.replace '\u00d7 Loading...', '-'
a.textContent = a.textContent.replace '× Loading...', '-'
doc = d.implementation.createHTMLDocument ''
doc.documentElement.innerHTML = req.response
@ -1328,7 +1326,7 @@ QR =
className: 'thumbnail'
draggable: true
href: 'javascript:;'
innerHTML: '<a class=remove>&times;</a><label hidden><input type=checkbox> Spoiler</label><span></span>'
innerHTML: '<a class=remove>×</a><label hidden><input type=checkbox> Spoiler</label><span></span>'
$('input', @el).checked = @spoiler
$.on @el, 'click', => @select()
$.on $('.remove', @el), 'click', (e) =>
@ -1533,7 +1531,7 @@ QR =
QR.el = UI.dialog 'qr', 'top:0;right:0;', '
<div class=move>
Quick Reply <input type=checkbox id=autohide title=Auto-hide>
<span> <a class=close title=Close>&times;</a></span>
<span> <a class=close title=Close>×</a></span>
</div>
<form>
<div><input id=dump type=button title="Dump list" value=+ class=field><input name=name title=Name placeholder=Name class=field size=1><input name=email title=E-mail placeholder=E-mail class=field size=1><input name=sub title=Subject placeholder=Subject class=field size=1></div>
@ -2233,8 +2231,7 @@ Watcher =
for board of watched
for id, props of watched[board]
x = $.el 'a',
# \u00d7 is &times;
textContent: '\u00d7'
textContent: '×'
href: 'javascript:;'
$.on x, 'click', Watcher.cb.x
link = $.el 'a', props