make the noscript version of galleries work again for graceful degradation (#1158)