LB-1219: Different button behavior for show hidden posts in sms and chain

Moved the code in a block and removed the duplicate code. Nikola still need to do some css changes.