<commit_before>'use strict';

if (!waitlist) {
	var waitlist = {};
}

waitlist.gong = (function() {

	const displayMessage = waitlist.base.displayMessage;
	const addListener = waitlist.sse.addEventListener;
	const storage = sessionStorage;
	var gongbutton;
	var sound;

	function playGong() {
		if (gongbutton.checked) {
			sound.currentTime = 0;
			sound.play();
		}
	}

	function gongClicked() {
		if (gongbutton.checked) {
			sound.removeAttribute("hidden");
			storage["gong"] = "open";
		} else {
			sound.setAttribute("hidden", "");
			sound.pause();
			storage.removeItem("gong");
		}
	}

	function disableGong() {
		gongbutton.checked = false;
		gongClicked();
		document.getElementById("gong").remove();
	}

	function gongSetup() {
		// Setup SSE invite-send event
		addListener("invite-send", playGong);
		gongbutton.addEventListener("click", gongClicked);
		sound.volume = 0.5;
		// Checks storage for gong info if not found alert to please enable notification
		if (storage.getItem("gong")) {
			gongbutton.checked = true;
			gongClicked();
		} else {
			displayMessage("To get informed when you are invited please enable browser notifications in the top right.", "info");
		}
	}
<commit_msg>gong storage cleanup & swap to localStorage.<commit_after>'use strict';

if (!waitlist) {
	var waitlist = {};
}

waitlist.gong = (function() {

	const displayMessage = waitlist.base.displayMessage;
	const addListener = waitlist.sse.addEventListener;
	var gongbutton;
	var sound;
	const storage = localStorage;

	function playGong() {
		if (gongbutton.checked) {
			sound.currentTime = 0;
			sound.play();
		}
	}

	function gongClicked() {
		if (gongbutton.checked) {
			sound.removeAttribute("hidden");
			storage["gong"] = "open";
		} else {
			sound.setAttribute("hidden", "");
			sound.pause();
			storage.removeItem("gong");
		}
	}

	function disableGong() {
		gongbutton.checked = false;
		gongClicked();
		document.getElementById("gong").remove();
	}

	function gongSetup() {
		// Setup SSE invite-send event
		addListener("invite-send", playGong);
		gongbutton.addEventListener("click", gongClicked);
		sound.volume = 0.5;
		// Checks storage for gong info if not found alert to please enable notification
		if (storage["gong"]) {
			gongbutton.checked = true;
			gongClicked();
		} else {
			displayMessage("To get informed when you are invited please enable browser notifications in the top right.", "info");
		}
	}

{'fraction_non_alphanumeric': 0.13627006998764923, 'fraction_numerical': 0.002470152326060107, 'mean_word_length': 4.031055900621118, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2801792', 'n_tokens_mistral': 861, 'n_tokens_neox': 777, 'n_words': 189}