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) ->
for node in $$ '.mobile', root
$.rm node
for node in $$ '[id]', post
if node.className isnt 'exif'
node.removeAttribute 'id'
for node in $$ '[id]:not(.exif)', post
node.removeAttribute 'id'
for node in $$ '.desktop', root
$.rmClass node, 'desktop'
return