Don't depend on prototype.toString()
This commit is contained in:
parent
baf5a4ec13
commit
5dcff904a8
@ -532,11 +532,6 @@
|
|||||||
callbacks: [],
|
callbacks: [],
|
||||||
init: function() {
|
init: function() {
|
||||||
var filter, key, m, regx, _i, _len;
|
var filter, key, m, regx, _i, _len;
|
||||||
HTMLBlockquoteElement.prototype.toString = function() {
|
|
||||||
return ($.el('a', {
|
|
||||||
innerHTML: this.innerHTML.replace(/<br>/g, '\n')
|
|
||||||
})).textContent;
|
|
||||||
};
|
|
||||||
for (key in config.filter) {
|
for (key in config.filter) {
|
||||||
if (!(m = conf[key].match(/(.+)/g))) {
|
if (!(m = conf[key].match(/(.+)/g))) {
|
||||||
continue;
|
continue;
|
||||||
@ -616,7 +611,9 @@
|
|||||||
},
|
},
|
||||||
com: function(root) {
|
com: function(root) {
|
||||||
var com;
|
var com;
|
||||||
if (com = $('blockquote', root).toString()) {
|
if (com = ($.el('a', {
|
||||||
|
innerHTML: $('blockquote', root).innerHTML.replace(/<br>/g, '\n')
|
||||||
|
})).textContent) {
|
||||||
return filter.test('com', com);
|
return filter.test('com', com);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@ -388,13 +388,6 @@ filter =
|
|||||||
regexps: {}
|
regexps: {}
|
||||||
callbacks: []
|
callbacks: []
|
||||||
init: ->
|
init: ->
|
||||||
HTMLQuoteElement.prototype.toString = ->
|
|
||||||
return ($.el 'a', innerHTML: @innerHTML.replace /<br>/g, '\n').textContent
|
|
||||||
#to remove when both chrom, ff and oprah will define blockquotes as HTMLQuoteElement
|
|
||||||
if HTMLBlockquoteElement
|
|
||||||
HTMLBlockquoteElement.prototype.toString = ->
|
|
||||||
return ($.el 'a', innerHTML: @innerHTML.replace /<br>/g, '\n').textContent
|
|
||||||
|
|
||||||
for key of config.filter
|
for key of config.filter
|
||||||
unless m = conf[key].match /(.+)/g
|
unless m = conf[key].match /(.+)/g
|
||||||
continue
|
continue
|
||||||
@ -436,7 +429,7 @@ filter =
|
|||||||
if (sub = if root.className is 'op' then $('.filetitle', root).textContent else $('.replytitle', root).textContent)
|
if (sub = if root.className is 'op' then $('.filetitle', root).textContent else $('.replytitle', root).textContent)
|
||||||
filter.test 'sub', sub
|
filter.test 'sub', sub
|
||||||
com: (root) ->
|
com: (root) ->
|
||||||
if com = $('blockquote', root).toString()
|
if com = ($.el 'a', innerHTML: $('blockquote', root).innerHTML.replace /<br>/g, '\n').textContent
|
||||||
filter.test 'com', com
|
filter.test 'com', com
|
||||||
file: (root) ->
|
file: (root) ->
|
||||||
if file = $ '.filesize span', root
|
if file = $ '.filesize span', root
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user