Ver Fonte

removed obsolete code

Former-commit-id: 4259dd6fa1c82a313b1ce35978cedea0418e5e81
Gildas há 5 anos atrás
pai
commit
66489cd884
1 ficheiros alterados com 0 adições e 7 exclusões
  1. 0 7
      extension/core/content/content-bootstrap.js

+ 0 - 7
extension/core/content/content-bootstrap.js

@@ -28,7 +28,6 @@ this.singlefile.extension.core.content.bootstrap = this.singlefile.extension.cor
 	const singlefile = this.singlefile;
 
 	const MAX_CONTENT_SIZE = 32 * (1024 * 1024);
-	const PUSH_STATE_NOTIFICATION_EVENT_NAME = "single-file-push-state";
 
 	let unloadListenerAdded, options, autoSaveEnabled, autoSaveTimeout, autoSavingPage, pageAutoSaved;
 	singlefile.extension.core.content.updatedResources = {};
@@ -52,10 +51,6 @@ this.singlefile.extension.core.content.bootstrap = this.singlefile.extension.cor
 	});
 	browser.runtime.sendMessage({ method: "tabs.init" });
 	browser.runtime.sendMessage({ method: "ui.processInit" });
-	addEventListener(PUSH_STATE_NOTIFICATION_EVENT_NAME, () => {
-		browser.runtime.sendMessage({ method: "tabs.init" });
-		browser.runtime.sendMessage({ method: "ui.processInit" });
-	});
 	return {};
 
 	async function onMessage(message) {
@@ -128,12 +123,10 @@ this.singlefile.extension.core.content.bootstrap = this.singlefile.extension.cor
 		if (autoSaveEnabled && options && (options.autoSaveUnload || options.autoSaveLoadOrUnload)) {
 			if (!unloadListenerAdded) {
 				addEventListener("unload", onUnload);
-				addEventListener(PUSH_STATE_NOTIFICATION_EVENT_NAME, onUnload);
 				unloadListenerAdded = true;
 			}
 		} else {
 			removeEventListener("unload", onUnload);
-			removeEventListener(PUSH_STATE_NOTIFICATION_EVENT_NAME, onUnload);
 			unloadListenerAdded = false;
 		}
 	}