Use an elegant selector instead of a condition

This commit is contained in:
Matěj Grabovský 2014-04-23 21:58:14 +02:00
parent 373766e91a
commit 20a5b89757

View File

@ -152,9 +152,8 @@ class Post
cleanup: (root, post) -> cleanup: (root, post) ->
for node in $$ '.mobile', root for node in $$ '.mobile', root
$.rm node $.rm node
for node in $$ '[id]', post for node in $$ '[id]:not(.exif)', post
if node.className isnt 'exif' node.removeAttribute 'id'
node.removeAttribute 'id'
for node in $$ '.desktop', root for node in $$ '.desktop', root
$.rmClass node, 'desktop' $.rmClass node, 'desktop'
return return