Created
October 3, 2014 00:38
-
-
Save jdoxey/08174620af3a13ee3880 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Pebble.addEventListener("ready", function(event) { | |
var request = new XMLHttpRequest(); | |
request.onreadystatechange = function() { | |
if (request.readyState == 4 && request.status == 200) { | |
var firstMin = request.response.match(/class="min">([0-9]+)</)[1]; | |
Pebble.sendAppMessage({ 0: firstMin }); | |
} | |
}; | |
request.open("GET", "http://www.bom.gov.au/vic/forecasts/melbourne.shtml", true); | |
request.send(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment