add missing JS to permalink pages