write current hash when history is toggled on #934
This commit is contained in:
		| @@ -1859,6 +1859,9 @@ | |||||||
| 		// Re-create the slide backgrounds | 		// Re-create the slide backgrounds | ||||||
| 		createBackgrounds(); | 		createBackgrounds(); | ||||||
|  |  | ||||||
|  | 		// Write the current hash to the URL | ||||||
|  | 		writeURL(); | ||||||
|  |  | ||||||
| 		sortAllFragments(); | 		sortAllFragments(); | ||||||
|  |  | ||||||
| 		updateControls(); | 		updateControls(); | ||||||
| @@ -2641,7 +2644,7 @@ | |||||||
| 			if( typeof delay === 'number' ) { | 			if( typeof delay === 'number' ) { | ||||||
| 				writeURLTimeout = setTimeout( writeURL, delay ); | 				writeURLTimeout = setTimeout( writeURL, delay ); | ||||||
| 			} | 			} | ||||||
| 			else { | 			else if( currentSlide ) { | ||||||
| 				var url = '/'; | 				var url = '/'; | ||||||
|  |  | ||||||
| 				// Attempt to create a named link based on the slide's ID | 				// Attempt to create a named link based on the slide's ID | ||||||
| @@ -2652,7 +2655,7 @@ | |||||||
| 				} | 				} | ||||||
|  |  | ||||||
| 				// If the current slide has an ID, use that as a named link | 				// If the current slide has an ID, use that as a named link | ||||||
| 				if( currentSlide && typeof id === 'string' && id.length ) { | 				if( typeof id === 'string' && id.length ) { | ||||||
| 					url = '/' + id; | 					url = '/' + id; | ||||||
| 				} | 				} | ||||||
| 				// Otherwise use the /h/v index | 				// Otherwise use the /h/v index | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user