Skip to content
This repository has been archived by the owner on Feb 24, 2018. It is now read-only.

Commit

Permalink
WebExt: Show initially pinned tab status (darrinhenein#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
Croydon committed Apr 30, 2017
1 parent c31701a commit 6263090
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions webextension/lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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", `<div id="tab-${id}" label="${title}" class="tabbrowser-tab" fadein="true" context="tabContextMenu" linkedpanel="panel-3-77" pending="true" image="" iconLoadingPrincipal="" align="stretch" maxwidth="65000" minwidth="0"> <span id="tab-title-${id}" class="tab-label tab-text">${title}</span> </div>`);
this.tabbrowser.insertAdjacentHTML("beforeend", `<div id="tab-${id}" class="tabbrowser-tab" label="${title}" ${pinnedHTML} fadein="true" context="tabContextMenu" linkedpanel="panel-3-77" pending="true" image="" iconLoadingPrincipal="" align="stretch" maxwidth="65000" minwidth="0"> <span id="tab-title-${id}" class="tab-label tab-text">${title}</span> </div>`);

//setTimeout(function(){}, 0); // workaround

Expand Down

0 comments on commit 6263090

Please sign in to comment.