<commit_before>const APP_VERSION = "1.4";

var sunTimes;

var locationOptions = {
    enableHighAccuracy: false,
    maximumAge: 10000,
    timeout: 10000
}

function locationSuccess(pos) {
    console.log("lat: " + pos.coords.latitude + " lon: " + pos.coords.longitude);
    sunTimes = SunCalc.getTimes(new Date(), pos.coords.latitude, pos.coords.longitude);
    console.log("Sunrise: " + sunTimes.sunrise.getHours() + ":" + sunTimes.sunrise.getMinutes());
    console.log("Sunset: " + sunTimes.sunset.getHours() + ":" + sunTimes.sunset.getMinutes());
}

function locationError(err) {
    console.log("Location error (" + err.code + "): " + err, message);
}

var updateLocation = function () {
    navigator.geolocation.getCurrentPosition(locationSuccess, locationError, locationOptions);
}

Pebble.addEventListener("ready",
						function (e) {
						    console.log("PebbleKit JS ready!");
						    updateLocation();
						});

Pebble.addEventListener("showConfiguration",
						function (e) {
						    //Load the remote config page
						    Pebble.openURL("http://geekjosh.github.io/Pebble-Gaptime/appconfig.html?version=" + APP_VERSION);
						});

Pebble.addEventListener("webviewclosed",
						function (e) {
						    //Get JSON dictionary
						    var configuration = JSON.parse(decodeURIComponent(e.response));
						    console.log("Configuration window returned: " + JSON.stringify(configuration));

						    //Send to Pebble, persist there
						    Pebble.sendAppMessage(
								{
								    "KEY_TEXT_TIME": configuration.textTime,
								    "KEY_HAND_ORDER": configuration.handOrder,
								    "KEY_INVERT": configuration.invert,
								    "KEY_INVERT_START": configuration.invertStart,
								    "KEY_INVERT_END": configuration.invertEnd
								},
								function (e) {
								    console.log("Sending settings data...");
								},
								function (e) {
								    console.log("Settings feedback failed!");
								});
						});

Pebble.addEventListener("appmessage",
    function (e) {
        console.log(JSON.stringify(e.payload));
    });
<commit_msg>Fix "unexpected end of input" - hopefully.<commit_after>const APP_VERSION = "1.4";

var sunTimes;

var locationOptions = {
    enableHighAccuracy: false,
    maximumAge: 10000,
    timeout: 10000
}

function locationSuccess(pos) {
    console.log("lat: " + pos.coords.latitude + " lon: " + pos.coords.longitude);
    sunTimes = SunCalc.getTimes(new Date(), pos.coords.latitude, pos.coords.longitude);
    console.log("Sunrise: " + sunTimes.sunrise.getHours() + ":" + sunTimes.sunrise.getMinutes());
    console.log("Sunset: " + sunTimes.sunset.getHours() + ":" + sunTimes.sunset.getMinutes());
}

function locationError(err) {
    console.log("Location error (" + err.code + "): " + err, message);
}

function updateLocation() {
    navigator.geolocation.getCurrentPosition(locationSuccess, locationError, locationOptions);
}

Pebble.addEventListener("ready",
						function (e) {
						    console.log("PebbleKit JS ready!");
						    updateLocation();
						});

Pebble.addEventListener("showConfiguration",
						function (e) {
						    //Load the remote config page
						    Pebble.openURL("http://geekjosh.github.io/Pebble-Gaptime/appconfig.html?version=" + APP_VERSION);
						});

Pebble.addEventListener("webviewclosed",
						function (e) {
						    //Get JSON dictionary
						    var configuration = JSON.parse(decodeURIComponent(e.response));
						    console.log("Configuration window returned: " + JSON.stringify(configuration));

						    //Send to Pebble, persist there
						    Pebble.sendAppMessage(
								{
								    "KEY_TEXT_TIME": configuration.textTime,
								    "KEY_HAND_ORDER": configuration.handOrder,
								    "KEY_INVERT": configuration.invert,
								    "KEY_INVERT_START": configuration.invertStart,
								    "KEY_INVERT_END": configuration.invertEnd
								},
								function (e) {
								    console.log("Sending settings data...");
								},
								function (e) {
								    console.log("Settings feedback failed!");
								});
						});

Pebble.addEventListener("appmessage",
    function (e) {
        console.log(JSON.stringify(e.payload));
    });

{'fraction_non_alphanumeric': 0.13711977186311788, 'fraction_numerical': 0.005703422053231939, 'mean_word_length': 2.882841328413284, 'pattern_counts': {'":': 14, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4763871', 'n_tokens_mistral': 1622, 'n_tokens_neox': 1233, 'n_words': 210}