From 62630908ffc55440e74cda51004b152f9a6d1b9d Mon Sep 17 00:00:00 2001 From: Croydon Date: Tue, 11 Apr 2017 15:37:26 +0200 Subject: [PATCH] WebExt: Show initially pinned tab status (#13) --- webextension/lib.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/webextension/lib.js b/webextension/lib.js index 1716b3c..7984913 100644 --- a/webextension/lib.js +++ b/webextension/lib.js @@ -149,7 +149,7 @@ var VerticalTabsReloaded = class VerticalTabsReloaded let id = tab.id; let url = tab.url; let title = tab.title || "Connecting..."; - let pinned = false; + let pinned = tab.pinned; let div = document.createElement("div"); div.className = "tabbrowser-tab"; @@ -161,8 +161,17 @@ var VerticalTabsReloaded = class VerticalTabsReloaded a.innerText = this.url; a.href = this.url;*/ + if(pinned == true) + { + var pinnedHTML = 'pinned="true"'; + } + else + { + var pinnedHTML = ''; + } + // Check: fadein="true" context="tabContextMenu" linkedpanel="panel-3-77" pending="true" image="" iconLoadingPrincipal="" align="stretch" - this.tabbrowser.insertAdjacentHTML("beforeend", `
${title}
`); + this.tabbrowser.insertAdjacentHTML("beforeend", `
${title}
`); //setTimeout(function(){}, 0); // workaround