aboutsummaryrefslogtreecommitdiff
path: root/html/repo_query.js
diff options
context:
space:
mode:
Diffstat (limited to 'html/repo_query.js')
-rw-r--r--html/repo_query.js22
1 files changed, 19 insertions, 3 deletions
diff --git a/html/repo_query.js b/html/repo_query.js
index 7cfd6fe..601a0aa 100644
--- a/html/repo_query.js
+++ b/html/repo_query.js
@@ -160,11 +160,20 @@ function RepoEntry(query_view, repo_url) {
const container_ids = ["repos_list_container", "install_view_container"];
-function RepoQueryView(tab_id, on_view_show, on_view_hide) {
+function RepoQueryView(tab, on_view_show, on_view_hide) {
Showable.call(this, on_view_show, on_view_hide);
Object.assign(this, clone_template("repo_query"));
- this.tab_id = tab_id;
+ this.tab_id = tab.id;
+#IF MOZILLA
+ this.incognito = tab.incognito;
+ if (this.incognito) {
+ [...this.top_text.childNodes].forEach(n => n.remove());
+ this.top_text.append(
+ clone_template("repo_query_private_mode_error").main_span
+ );
+ }
+#ENDIF
const show_container = name => {
for (const cid of container_ids) {
@@ -175,7 +184,7 @@ function RepoQueryView(tab_id, on_view_show, on_view_hide) {
}
this.install_view = new InstallView(
- tab_id,
+ this.tab_id,
() => show_container("install_view_container"),
() => show_container("repos_list_container")
);
@@ -186,6 +195,13 @@ function RepoQueryView(tab_id, on_view_show, on_view_hide) {
if (!show_super())
return;
+#IF MOZILLA
+ if (this.incognito) {
+ this.repo_entries = [];
+ return;
+ }
+#ENDIF
+
this.url = url;
this.url_span.innerText = url;