function getProtocol() { if (location.protocol.indexOf('https') > -1) { return 'https:' } else { return 'http:'; } } function createWidget4170(){ var proto = getProtocol(); codeSnippet = "