Skip to content

Instantly share code, notes, and snippets.

@EragonJ
Created December 16, 2013 13:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EragonJ/7986909 to your computer and use it in GitHub Desktop.
Save EragonJ/7986909 to your computer and use it in GitHub Desktop.
if (this.currentStep > this.numTutorialSteps) {
Tutorial.tutorialScreen.classList.remove('show');
Tutorial.tutorialFinish.classList.add('show');
// for large devices, we have to use IAC to tell system ftu is done
if (this.layout !== 'tiny') {
navigator.mozApps.getSelf().onsuccess = function(evt) {
var app = evt.target.result;
app.connect('ftucomms').then(function onConnAccepted(ports) {
ports.forEach(function(port) {
port.postMessage('done');
});
}, function onConnRejected(reason) {
console.log('FTU is rejected');
console.log(reason);
});
};
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment