<commit_before>console.log("SW startup");

self.addEventListener('fetch', function(event) {

	// console.log("Fetch event", event);
	// console.log(".request", event.request);
	// console.log(".respondWith", event.respondWith);
	// console.log(".default", event.default);

	if (event.request.url.indexOf("bigJson.js") != -1) {


		if (event.request.url.indexOf("fake") != -1) {

			event.respondWith(fetch(event.request));
		} else {
			event.respondWith(fetch(event.request));			
		}

	}
});<commit_msg>兼容log<commit_after>console.log("SW startup");

self.addEventListener('fetch', function(event) {

	// console.log("Fetch event", event);
	// console.log(".request", event.request);
	// console.log(".respondWith", event.respondWith);
	// console.log(".default", event.default);

	if (event.request.url.indexOf("jsonBig.json") != -1) {


		if (event.request.url.indexOf("fake") != -1) {

			event.respondWith(new Response("Hello world!"));
		} else {
			event.respondWith(fetch(event.request));			
		}

	}
});



var PRECACHE = "fake";


const PRECACHE_URLS = [
  'jsonBig.json',
];

// The install handler takes care of precaching the resources we always need.
self.addEventListener('install', event => {
  event.waitUntil(
    caches.open(PRECACHE)
      .then(cache => cache.addAll(PRECACHE_URLS))
      .then(self.skipWaiting())
  );
});

{'fraction_non_alphanumeric': 0.19583023082650783, 'fraction_numerical': 0.0029784065524944155, 'mean_word_length': 3.996282527881041, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '7017894', 'n_tokens_mistral': 471, 'n_tokens_neox': 438, 'n_words': 71}