js-hack for https