<commit_before>self.addEventListener('install', (e) => {
	e.waitUntil(caches.open('default').then((cache) => cache.add('offline.html')));
});

self.addEventListener('fetch', (e) => {
	if (e.request.method !== 'GET') return;
	
	// Send offline page if page timed out.
	if (e.request.mode === 'navigate') return void e.respondWith(Promise.race([
		new Promise((resolve) => {
			setTimeout(() => {
				resolve(caches.match('offline.html'));
			}, 3000);
		}),
		fetch(e.request).catch(() => caches.match('offline.html'))
	]));
	
	// Workaround for PWA support.
	e.respondWith(Promise.race([
		new Promise((resolve) => {
			setTimeout(() => {
				resolve(new Response(null, { status: 408 }));
			}, 3000);
		}),
		fetch(e.request).catch(() => new Response(null, { status: 408 }))
	]));<commit_msg>Remove all handler from service worker<commit_after>self.addEventListener('install', (e) => {
	e.waitUntil(caches.open('default').then((cache) => cache.add('offline.html')));
});

self.addEventListener('fetch', (e) => {
	if (e.request.method !== 'GET') return;
	
	// Send offline page if page timed out.
	if (e.request.mode === 'navigate') return void e.respondWith(Promise.race([
		new Promise((resolve) => {
			setTimeout(() => {
				resolve(caches.match('offline.html'));
			}, 3000);
		}),
		fetch(e.request).catch(() => caches.match('offline.html'))
	]));
{'fraction_non_alphanumeric': 0.22320768662232077, 'fraction_numerical': 0.013303769401330377, 'mean_word_length': 4.437751004016064, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 18, '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': '6471512', 'n_tokens_mistral': 503, 'n_tokens_neox': 442, 'n_words': 83}