function getProtocol() { if (location.protocol.indexOf('https') > -1) { return 'https:' } else { return 'http:'; } } function createWidget4882(){ var proto = getProtocol(); codeSnippet = "
"; document.write(codeSnippet); codeSnippet2= "
Put this widget on your site. © Buoyweather.com
"; document.write(codeSnippet2); } createWidget4882();