replace once

This commit is contained in:
Nicolas Stepien 2011-08-28 03:30:11 +02:00
parent baac2a1bcd
commit 226665a16f
3 changed files with 8 additions and 2 deletions

View File

@ -2117,6 +2117,9 @@
};
quoteBacklink = {
init: function() {
var format;
format = conf['backlink'].replace(/%id/, "' + id + '");
quoteBacklink.funk = Function('id', "return'" + format + "'");
return g.callbacks.push(function(root) {
var container, el, id, link, qid, quote, quotes, _i, _len, _ref, _results;
if (/inline/.test(root.className)) {
@ -2143,7 +2146,7 @@
link = $.el('a', {
href: "#" + id,
className: 'backlink',
textContent: conf['backlink'].replace(/%id/, id)
textContent: quoteBacklink.funk(id)
});
if (conf['Quote Preview']) {
$.bind(link, 'mouseover', quotePreview.mouseover);

View File

@ -2,6 +2,7 @@ master
- mayhem
fix updater refreshing 404'd threads
distinguishable unread favicons on white backgrounds
backlink formatting
2.18.3
- mayhem

View File

@ -1678,6 +1678,8 @@ titlePost =
quoteBacklink =
init: ->
format = conf['backlink'].replace /%id/, "' + id + '"
quoteBacklink.funk = Function 'id', "return'#{format}'"
g.callbacks.push (root) ->
return if /inline/.test root.className
# op or reply
@ -1695,7 +1697,7 @@ quoteBacklink =
link = $.el 'a',
href: "##{id}"
className: 'backlink'
textContent: conf['backlink'].replace /%id/, id
textContent: quoteBacklink.funk id
if conf['Quote Preview']
$.bind link, 'mouseover', quotePreview.mouseover
$.bind link, 'mousemove', ui.hover