importScripts('../twix.min.js');

getTime();
setInterval(getTime, 1000);

function getTime() { 
    Twix.ajax({
        url: "http://neilcowburn.com/api/time.php",
        success: function(data) {
            postMessage(data);
        }
    });
}
importScripts('../twix.min.js');

getTime();
setInterval(getTime, 1000);

function getTime() { 
    Twix.ajax({
        url: "https://neilcowburn.com/api/time.php",
        success: function(data) {
            postMessage(data);
        }
    });
}

Update URL to use HTTPS in worker.js