From 776b500142fe3b1e96ad42a4b895eacc0cfaa53b Mon Sep 17 00:00:00 2001
From: Evan Hahn <69474926+EvanHahn-Signal@users.noreply.github.com>
Date: Wed, 7 Oct 2020 16:49:21 -0500
Subject: [PATCH] Ensure that clicking a link does not close the conversation
---
background.html | 1 -
js/chromium.js | 13 -------------
ts/views/conversation_view.ts | 4 ----
ts/window.d.ts | 1 -
4 files changed, 19 deletions(-)
delete mode 100644 js/chromium.js
diff --git a/background.html b/background.html
index 92a2e229b..dc9aed074 100644
--- a/background.html
+++ b/background.html
@@ -346,7 +346,6 @@
-
diff --git a/js/chromium.js b/js/chromium.js
deleted file mode 100644
index a44c52ed2..000000000
--- a/js/chromium.js
+++ /dev/null
@@ -1,13 +0,0 @@
-/* global extension: false */
-
-// eslint-disable-next-line func-names
-(function() {
- // Browser specific functions for Chrom*
- window.extension = window.extension || {};
-
- extension.windows = {
- onClosed(callback) {
- window.addEventListener('beforeunload', callback);
- },
- };
-})();
diff --git a/ts/views/conversation_view.ts b/ts/views/conversation_view.ts
index d6d31e1c3..554730146 100644
--- a/ts/views/conversation_view.ts
+++ b/ts/views/conversation_view.ts
@@ -377,10 +377,6 @@ Whisper.ConversationView = Whisper.View.extend({
props: this.getPropsForAttachmentList(),
});
- window.extension.windows.onClosed(() => {
- this.unload('windows closed');
- });
-
this.setupHeader();
this.setupTimeline();
this.setupCompositionArea({ attachmentListEl: attachmentListEl[0] });
diff --git a/ts/window.d.ts b/ts/window.d.ts
index 785e23831..7da4eb3e3 100644
--- a/ts/window.d.ts
+++ b/ts/window.d.ts
@@ -49,7 +49,6 @@ declare global {
_: typeof Underscore;
$: typeof jQuery;
- extension: any;
moment: any;
imageToBlurHash: any;
autoOrientImage: any;