Explorar o código

moved warning

Gildas %!s(int64=7) %!d(string=hai) anos
pai
achega
c57137985a
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      extension/core/content/content-autosave.js

+ 1 - 1
extension/core/content/content-autosave.js

@@ -35,7 +35,6 @@ this.singlefile.autosave = this.singlefile.autosave || (async () => {
 		}
 	});
 	if (document instanceof HTMLDocument) {
-		console.warn("SingleFile is hooking the history.pushState API to detect navigation."); // eslint-disable-line no-console		
 		const scriptElement = document.createElement("script");
 		scriptElement.textContent = `(${hookPushState.toString()})()`;
 		document.documentElement.appendChild(scriptElement);
@@ -125,6 +124,7 @@ this.singlefile.autosave = this.singlefile.autosave || (async () => {
 	}
 
 	function hookPushState() {
+		console.warn("SingleFile is hooking the history.pushState API to detect navigation."); // eslint-disable-line no-console
 		const pushState = history.pushState;
 		history.pushState = function (state, title, url) {
 			dispatchEvent(new CustomEvent("single-file-push-state", { detail: { state, title, url } }));