Update URL and delete state when going back to editor
This commit is contained in:
		@ -99,7 +99,7 @@
 | 
			
		||||
				<h1></h1>
 | 
			
		||||
				<h3 class="totaltimer">0:00</h3>
 | 
			
		||||
				<input type="button" value="Restart" onclick="reStartQuiz()" class="center">
 | 
			
		||||
				<input type="button" value="Create New Quiz" onclick="changeView('spreadsheet')" class="center">
 | 
			
		||||
				<input type="button" value="Create New Quiz" onclick="deleteQuiz()" class="center">
 | 
			
		||||
			</div>
 | 
			
		||||
 | 
			
		||||
		</main>
 | 
			
		||||
 | 
			
		||||
@ -372,6 +372,15 @@ function abortQuiz() {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
function deleteQuiz() {
 | 
			
		||||
 | 
			
		||||
	clearState()
 | 
			
		||||
	removeLink()
 | 
			
		||||
	changeView('spreadsheet')
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
window.onload = async function() {
 | 
			
		||||
 | 
			
		||||
	var browserWarning = document.getElementById('browserwarning')
 | 
			
		||||
 | 
			
		||||
@ -14,6 +14,9 @@ function showLink() {
 | 
			
		||||
 | 
			
		||||
function removeLink() {
 | 
			
		||||
 | 
			
		||||
	var link = location.origin
 | 
			
		||||
	history.pushState('', '', link)
 | 
			
		||||
 | 
			
		||||
	var linkEl = document.getElementById('shareLink')
 | 
			
		||||
	linkEl.href = ''
 | 
			
		||||
	linkEl.innerHTML = ''
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user