// Hook into the hot-reload to
// 1) wait until the application has resumed to reload the app
// 2) show the splashscreen while the app is reloading

var hasResumed = false;
var retryReloadFunc = null;

var retryReloadOnResume = function () {
  // Set resumed to true so _onMigrate performs the reload
  hasResumed = true;

  // Show the splashscreen during the reload
  // it will be hidden when the app starts
  navigator.splashscreen.show();

  // Re-run the onMigrate hooks
  retryReloadFunc();
};

Reload._onMigrate(function (retryReload) {
  retryReloadFunc = retryReload;

  // Prevent duplicate listeners in case _onMigrate is called multiple times
  document.removeEventListener("resume", retryReloadOnResume, false);

  if (!hasResumed) {
    document.addEventListener("resume", retryReloadOnResume, false);
  }

  // Reload the app if we have resumed
  return [hasResumed];
});

@@ -245,17 +245,20 @@
  // Set 
-r
+hasR
 esumed t
@@ -382,17 +382,12 @@
 ill 
-be hidden
+hide
  whe
@@ -403,16 +403,50 @@
  starts%0A
+  if (navigator.splashscreen) %7B%0A  
   naviga
@@ -469,16 +469,20 @@
 .show();
+%0A  %7D
 %0A%0A  // R
@@ -565,22 +565,16 @@
 n (retry
-Reload
 ) %7B%0A  re
@@ -594,22 +594,16 @@
  = retry
-Reload
 ;%0A%0A  // 
@@ -870,13 +870,8 @@
  we 
-have 
 resu

Add check around splashscreen object