izuemon commited on
Commit
90f79d1
·
verified ·
1 Parent(s): f2881e8

Update p1/index.html

Browse files
Files changed (1) hide show
  1. p1/index.html +2 -16
p1/index.html CHANGED
@@ -4008,21 +4008,7 @@ if (video) {
4008
  console.log('⏩ Video SEEKED to', video.currentTime.toFixed(2), 'Paused:', video.paused);
4009
  });
4010
  }
4011
- window.addEventListener('load', async () => {
4012
- const registerBtn = document.getElementById('sw-register-btn');
4013
- if (registerBtn) {
4014
- registerBtn.disabled = false;
4015
- registerBtn.addEventListener('click', async () => {
4016
- registerBtn.disabled = true;
4017
- try {
4018
- await navigator.serviceWorker.register('/sw.js');
4019
- registerBtn.textContent = '登録完了';
4020
- } catch (e) {
4021
- registerBtn.textContent = '失敗';
4022
- }
4023
- });
4024
- }
4025
- });
4026
  const CACHE_NAME = 'p-cache-v1';
4027
 
4028
 
@@ -4099,7 +4085,7 @@ async function registerSW() {
4099
  return;
4100
  }
4101
 
4102
- await navigator.serviceWorker.register('/p/sw.js');
4103
  }
4104
 
4105
 
 
4008
  console.log('⏩ Video SEEKED to', video.currentTime.toFixed(2), 'Paused:', video.paused);
4009
  });
4010
  }
4011
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4012
  const CACHE_NAME = 'p-cache-v1';
4013
 
4014
 
 
4085
  return;
4086
  }
4087
 
4088
+ await navigator.serviceWorker.register('/p1/sw.js');
4089
  }
4090
 
4091