Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
105 lines (95 sloc) 4.06 KB
<!DOCTYPE html>
<html>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>About Tabs</title>
<script src="resource://tabstats/template.js"></script>
<script src="resource://tabstats/util.js"></script>
<script src="resource://tabstats/abouttabs.js"></script>
<link rel="stylesheet" type="text/css" href="resource://tabstats/abouttabs.css"></link>
</head>
<body>
<template id="main">
<div id="top">
<h1>${tabCount}_tab</h1>
<button event-click="refresh()">Refresh</button>
</div>
<div id="bar">
<span>${windowsCount}_window</span>
<span>${tabGroupsCount}_tab_group</span>
</div>
<ul id="stats">
<li>${loadedTabs}_tab ${loadedTabs}?(has|have) been loaded</li>
<li class="schemes" template="schemes" template-data="${schemes.byKey}"></li>
<li template-if="${blankTabs}">${blankTabs}_empty_tab</li>
<apply template="main_group" template-data="${groups}"></apply>
</ul>
</template>
<template id="schemes">
<span>${value} ${key}:</span>
</template>
<template id="main_group">
<li template-if="${numDupes}" class="group">
<span event-click="toggle(this.parentNode)">${length}_unique_${what}</span>
<ul template="main_group_with_dupes"></ul>
</li>
<li template-if="${!numDupes}" class="group closed">
<span event-click="toggle(this.parentNode)">${numUnique}_unique_${what}</span>
<ul class="${what}" template-delay="item" template-data="${unique.byLastAccessed}"></ul>
</li>
</template>
<template id="main_group_with_dupes">
<li class="group">
<span event-click="toggle(this.parentNode)">${numDupes}_${what} in more than 1 tab</span>
<span class="actions">
<a href="#" event-click="${dupes.dedup}" template-if="${dupes.dedup}">[Dedup]</a>
<a href="#" event-click="${dupes.close}">[Close]</a>
</span>
<ul class="${what}" template="item" template-data="${dupes.byLength}"></ul>
</li>
<li class="group closed">
<span event-click="toggle(this.parentNode)">${numUnique}_other_${what}</span>
<ul class="${what}" template-delay="item" template-data="${unique.byLastAccessed}"></ul>
</li>
</template>
<template id="item">
<li class="closed">
<div>
<xul:image validate="never" template-if="${favicon}" src="${favicon}"></xul:image>
<xul:image validate="never" template-if="${!favicon}" src="chrome://mozapps/skin/places/defaultFavicon.png"></xul:image>
<div class="title" template-if="${title}">${title}</div>
<div class="title" template-if="${!title}">${url}</div>
<div class="actions">
<a href="#" template-if="${length}" event-click="toggle(this.parentNode.parentNode.parentNode)">(${length}_tab)</a>
<a href="#" event-click="${dedup}" template-if="${dedup}">[Dedup]</a>
<a href="#" event-click="${switchTo}" template-if="${!length}">[Switch to]</a>
<a href="#" event-click="${close}">[Close]</a>
</div>
</div>
<div class="extra" template-if="${url && title}">${url}</div>
<div class="extra" template-if="${!length && url}" template="last_accessed"></div>
<ul template-if="${dedup}" template-delay="select_dedup" template-data="${byLastAccessed}"></ul>
<ul class="subgroup" template-if="${!dedup}" template-delay="subgroup_with_dupes" template-data="${collectionByAddress}"></ul>
</li>
</template>
<template id="subgroup_with_dupes">
<apply template-if="${numDupes}" template="main_group_with_dupes"></apply>
<apply template-if="${!numDupes}" template="item" template-data="${unique.byLastAccessed}"></apply>
</template>
<template id="select_dedup">
<li>
<span template="last_accessed"></span>
<span class="actions">
<a href="#" event-click="${switchTo}">[Switch to]</a>
<a href="#" event-click="${close}">[Close]</a>
</span>
</li>
</template>
<template id="last_accessed">Last accessed
<abbr title="${lastAccessedDate}">${lastAccessedAgo}</abbr>
</template>
</body>
</html>