the original-author forgot to judge  whether ssl

hi，in this js file , you forgot to judge whether it is ssl ,and it really sucks me .. 
i add it