"use strict";

define(
		[	'src/SearchByName',
			'src/urlUtils',
			'../src/styleUtils',
			'../src/errorHandler'
		],
		function (
			CSLEDIT_SearchByName,
			CSLEDIT_urlUtils,
			styleUtils,
			errorHandler
		) {
	$(document).ready(function () {
		var styleQuery = CSLEDIT_urlUtils.getUrlVar('style');

		if ("pushState" in window.history) {
			window.history.pushState({}, document.title,
				CSLEDIT_urlUtils.removeQueryParam(window.location.href, 'style'));
		}

		var searchByName = new CSLEDIT_SearchByName($('#mainContainer'), {
			editStyle_func : function (styleURL) {
				styleUtils.editStyle(styleURL, "../visualEditor");
			},
			initialSearchQuery : styleQuery
		});
	});
});

@@ -306,20 +306,23 @@
 %0A%09%09if (%22
-push
+replace
 State%22 i
@@ -363,12 +363,15 @@
 ory.
-push
+replace
 Stat

use replaceState instead of pushState