Author Topic: Web widget broken?  (Read 1220 times)

0 Members and 1 Guest are viewing this topic.

Offline miraculon

  • Sunrise Side Weather
  • Forecaster
  • *****
  • Posts: 3051
  • KE8DAF
    • Sunrise Side Weather in Rogers City MI USA
Web widget broken?
« on: October 19, 2015, 02:48:12 PM »
My web widget on my site no longer seems to function.

http://miraculon.net/widget.html

It has been a while, but looking at the page source it seems to be Java based.

Did Java break it, is the web widget no longer supported, or what?

It seems to be driven by this:

Code: [Select]
<script type="text/javascript">
    function getWidget() {
        var req = new XMLHttpRequest;
        req.overrideMimeType('text/plain; charset=x-user-defined');
        req.open('GET', 'http://wbwidget.us.to/widget.php?city=MI-Rogers_City&station=p21130', !1); //Change image URL here
        req.send(null);
        for (var responseText = req.responseText, responseTextLen = responseText.length, binary = '', i = 0; i < responseTextLen; ++i) {
            binary += String.fromCharCode(responseText.charCodeAt(i) & 255)
        }
        document.getElementById('widget').src = 'data:image/png;base64,' + window.btoa(binary);
    }
    getWidget();
    setInterval('getWidget()', 300000); //Change desired refresh time here (value is in milliseconds, one second = 1000)
</script>

Greg H.


Blitzortung Stations #706 and #1682
CoCoRaHS: MI-PI-1
CWOP: CW4114 and KE8DAF-13
WU: KMIROGER7
Amateur Radio Callsign: KE8DAF

Offline parkernathan

  • Moderator
  • Forecaster
  • *****
  • Posts: 466
    • WeatherTogether
Re: Web widget broken?
« Reply #1 on: October 20, 2015, 12:53:38 AM »
My web widget on my site no longer seems to function.

http://miraculon.net/widget.html

It has been a while, but looking at the page source it seems to be Java based.

Did Java break it, is the web widget no longer supported, or what?
:-
It seems to be driven by this:

Code: [Select]
<script type="text/javascript">
    function getWidget() {
        var req = new XMLHttpRequest;
        req.overrideMimeType('text/plain; charset=x-user-defined');
        req.open('GET', 'http://wbwidget.us.to/widget.php?city=MI-Rogers_City&station=p21130', !1); //Change image URL here
        req.send(null);
        for (var responseText = req.responseText, responseTextLen = responseText.length, binary = '', i = 0; i < responseTextLen; ++i) {
            binary += String.fromCharCode(responseText.charCodeAt(i) & 255)
        }
        document.getElementById('widget').src = 'data:image/png;base64,' + window.btoa(binary);
    }
    getWidget();
    setInterval('getWidget()', 300000); //Change desired refresh time here (value is in milliseconds, one second = 1000)
</script>

Greg H.

Are you the developer of the widget? Our API has recently changed. We need to provide the developer with an updated API.
Nathan Parker

Visit my blog at http://weathertogether.net

Offline miraculon

  • Sunrise Side Weather
  • Forecaster
  • *****
  • Posts: 3051
  • KE8DAF
    • Sunrise Side Weather in Rogers City MI USA
Re: Web widget broken?
« Reply #2 on: October 20, 2015, 08:14:12 AM »
Quote
Are you the developer of the widget?
Negative. I don't even remember where I got it, but I think it was somewhere on WeatherBug...

Greg H.


Blitzortung Stations #706 and #1682
CoCoRaHS: MI-PI-1
CWOP: CW4114 and KE8DAF-13
WU: KMIROGER7
Amateur Radio Callsign: KE8DAF

Offline parkernathan

  • Moderator
  • Forecaster
  • *****
  • Posts: 466
    • WeatherTogether
Re: Web widget broken?
« Reply #3 on: October 20, 2015, 05:46:52 PM »
Quote
Are you the developer of the widget?
Negative. I don't even remember where I got it, but I think it was somewhere on WeatherBug...

Greg H.

I remember who the programmer is now. I just forgot how to reach him! Let me email one of his other contacts and see if I can get somewhere.
Nathan Parker

Visit my blog at http://weathertogether.net

Offline parkernathan

  • Moderator
  • Forecaster
  • *****
  • Posts: 466
    • WeatherTogether
Re: Web widget broken?
« Reply #4 on: October 21, 2015, 03:18:11 PM »
We are getting the new API over to the developer, so this should be resolved before too long.

Note that we are having a major issue with PWS right now, and it is affected in the feed he will have access to:
http://backyard.weatherbug.com/group/backyardstations/forum/topics/please-read-major-impact-to-pws-users-due-to-new-weatherbug-com-l
Nathan Parker

Visit my blog at http://weathertogether.net

 

anything