Detect conflicts with 4chan X v2. #676

This commit is contained in:
ccd0 2016-06-05 13:28:16 -07:00
parent bee2467283
commit 12109375b5

View File

@ -346,6 +346,11 @@ Main =
softTask()
handleErrors: (errors) ->
# Detect conflicts with 4chan X v2
if d.body and $.hasClass(d.body, 'fourchan_x') and not $.hasClass(doc, 'tainted')
new Notice 'error', 'Error: Multiple copies of 4chan X are enabled.'
$.addClass doc, 'tainted'
unless errors instanceof Array
error = errors
else if errors.length is 1