Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Debug/addons/addressbar/config.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<TablacusExplorer>
<General>
<Version>1.71</Version>
<MinVersion>2022.1.12</MinVersion>
<pubDate>Mon, 22 May 2023 00:00:00 GMT</pubDate>
<Version>1.72</Version>
<MinVersion>2023.5.26</MinVersion>
<pubDate>Fri, 26 May 2023 00:00:00 GMT</pubDate>
<Options>Common:0,6,7,8,9:0</Options>
<Level>2</Level>
<Creator>Gaku</Creator>
Expand Down
16 changes: 9 additions & 7 deletions Debug/addons/addressbar/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,20 +49,20 @@ if (window.Addon == 1) {
const oImg = document.getElementById("addr_img");
const oPopup = document.getElementById("addressbarselect");
const width = oAddr.offsetWidth - oImg.offsetWidth + oPopup.offsetWidth - 2;
const height = oAddr.offsetHeight - 6;
const height = oAddr.offsetHeight - 11;
if (Addons.AddressBar.XP) {
oAddr.style.color = "";
} else {
const arHTML = [];
o.style.height = (oAddr.offsetHeight - 3) + "px";
o.style.height = "auto";
const bRoot = api.ILIsEmpty(FolderItem);
const Items = JSON.parse(await Sync.AddressBar.SplitPath(FolderItem));
o.style.width = "auto";
let bEmpty = true, n;
o.innerHTML = "";
for (n = 0; n < Items.length; ++n) {
if (Items[n].next) {
arHTML.unshift('<span id="addressbar' + n + '" class="button" style="line-height: ' + height + 'px; vertical-align: middle" onclick="Addons.AddressBar.Popup(this,' + n + ')" onmouseover="MouseOver(this)" onmouseout="MouseOut()" oncontextmenu="Addons.AddressBar.Exec(); return false;">' + BUTTONS.next + '</span>');
arHTML.unshift('<span id="addressbar' + n + '" class="button" style="line-height: ' + height + 'px" onclick="Addons.AddressBar.Popup(this,' + n + ')" onmouseover="MouseOver(this)" onmouseout="MouseOut()" oncontextmenu="Addons.AddressBar.Exec(); return false;">' + BUTTONS.next + '</span>');
o.insertAdjacentHTML("afterbegin", arHTML[0]);
}
arHTML.unshift('<span id="addressbar' + n + '_" class="button" style="line-height: ' + height + 'px" onmouseover="MouseOver(this)" onmouseout="MouseOut()" oncontextmenu="Addons.AddressBar.Exec(); return false;" ondragstart="Addons.AddressBar.Drag(event,' + n + '); return false" draggable="true">' + EncodeSC(Items[n].name) + '</span>');
Expand All @@ -85,9 +85,8 @@ if (window.Addon == 1) {
}
Addons.AddressBar.nLevel = n;
}
oPopup.style.left = (oAddr.offsetWidth - oPopup.offsetWidth - 1) + "px";
oPopup.style.lineHeight = Math.abs(oAddr.offsetHeight - 6) + "px";
oImg.style.top = Math.abs(oAddr.offsetHeight - oImg.offsetHeight) / 2 + "px";
oPopup.style.left = (oAddr.offsetWidth - oPopup.offsetWidth - 2) + "px";
oPopup.style.lineHeight = Math.abs(height) + "px";
}
},

Expand Down Expand Up @@ -355,7 +354,10 @@ if (window.Addon == 1) {
s = "100%";
}
const z = screen.deviceYDPI / 96;
s = ['<div style="position: relative; overflow: hidden"><div id="breadcrumbbuttons" class="breadcrumb" style="position: absolute; left: 1px; top: 1px; padding-left: ', 16 * z + 4, 'px" onclick="Addons.AddressBar.Click1(event)" oncontextmenu="Addons.AddressBar.Popup1(event); return false;" onmousedown="Addons.AddressBar.Down1(event)" onmouseup="return Addons.AddressBar.Up1(event); return false"></div><input id="addressbar" type="text" autocomplate="on" list="AddressList" onkeydown="return Addons.AddressBar.KeyDown(event, this)" onfocus="Addons.AddressBar.Focus()" onblur="Addons.AddressBar.Blur()" onresize="Addons.AddressBar.Resize()" oninput="AdjustAutocomplete(this.value)" oncontextmenu="Addons.AddressBar.ContextMenu(this)" style="width: ', EncodeSC(s), '; vertical-align: middle; padding-left: ', 16 * z + 4, 'px; padding-right: 16px"><div class="breadcrumb"><div id="addressbarselect" class="button" style="position: absolute; top: 1px" onmouseover="MouseOver(this);" onmouseout="MouseOut()" onclick="Addons.AddressBar.Popup3(this)">', BUTTONS.dropdown, '</div></div>'];
s = ['<div style="position: relative; overflow: hidden">',
'<div id="breadcrumbbuttons" class="breadcrumb" style="vertical-align: middle; position: absolute; margin-top:1px; margin-bottom:1px; top:1px; bottom: 1px; left: 1px; padding-left: ', 16 * z + 4, 'px" onclick="Addons.AddressBar.Click1(event)" oncontextmenu="Addons.AddressBar.Popup1(event); return false;" onmousedown="Addons.AddressBar.Down1(event)" onmouseup="return Addons.AddressBar.Up1(event); return false"></div>',
'<input id="addressbar" type="text" autocomplate="on" list="AddressList" onkeydown="return Addons.AddressBar.KeyDown(event, this)" onfocus="Addons.AddressBar.Focus()" onblur="Addons.AddressBar.Blur()" onresize="Addons.AddressBar.Resize()" oninput="AdjustAutocomplete(this.value)" oncontextmenu="Addons.AddressBar.ContextMenu(this)" style="width: ', EncodeSC(s), '; vertical-align: middle; padding-left: ', 16 * z + 4, 'px; padding-top:2px;padding-bottom:2px; padding-right: 16px">',
'<div class="breadcrumb"><div id="addressbarselect" class="button" style="vertical-align: middle; position: absolute; margin-top:1px; margin-bottom:1px; top: 1px; bottom: 1px; " onmouseover="MouseOver(this);" onmouseout="MouseOut()" onclick="Addons.AddressBar.Popup3(this)">', BUTTONS.dropdown, '</div></div>'];

s.push('<img id="addr_img"');
if (ui_.IEVer < 8) {
Expand Down
19 changes: 18 additions & 1 deletion Debug/addons/tabplus/options.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<div class="panel" style="display: block;">
<div class="panel" style="display: block;">
<label>View</label>
<br>
<label><input type="checkbox" id="Icon">Icon</label><br>
<input type="checkbox" id="Drive"><label for="Drive" id="_Drive">Drive</label><br>
<label><input type="checkbox" id="Close">Close Tab</label><br>
<label><input type="checkbox" id="CloseAll">Close all tabs</label><br>
<label><input type="checkbox" id="!NoLock">Lock</label><br>
<label><input type="checkbox" id="Protected">@wmploc.dll,-1714[Protected]</label><br>
<label><input type="checkbox" id="New">New Tab</label><br>
Expand Down Expand Up @@ -78,6 +79,22 @@
<input type="text" name="IconProtect" onchange="SetImage();" class="full">
</td>
</tr>
<tr>
<td class="full" style="vertical-align: bottom">
<label>New tab</label>
</td>
<td style="white-space: nowrap">
<button onclick="ShowIcon(document.F.NewTab, 'List');">Select</button>
</td>
<td style="white-space: nowrap">
<button onclick="RefX('NewTab');">Browse...</button>
</td>
</tr>
<tr>
<td class="full" colspan="3">
<input type="text" name="NewTab" onchange="SetImage();" class="full">
</td>
</tr>
</table>
</div>
<div class="panel" style="display: block;">
Expand Down
62 changes: 55 additions & 7 deletions Debug/addons/tabplus/script.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const Addon_Id = "tabplus";
const Addon_Id = "tabplus";
let item = GetAddonElement(Addon_Id);
if (!item.getAttribute("Set")) {
item.setAttribute("Icon", 1);
Expand All @@ -23,6 +23,19 @@ if (window.Addon == 1) {
tids: [],
nSelected: [],

IsWin10OrLater: async function () {
let appVer, res, osVer;
appVer = await navigator.appVersion.split(';');
if (appVer[2]) {
res = /^\s*Windows NT\s+(\d+\.\d+)/i.exec(appVer[2]);
if (res && res[1] && parseFloat(res[1]) >= 10) {
return 1;
}
}

return 0;
},

Arrange: async function (Id, bWait) {
delete Addons.TabPlus.tids[Id];
const o = document.getElementById("tabplus_" + Id);
Expand All @@ -36,6 +49,9 @@ if (window.Addon == 1) {
if (o.lastChild && Addons.TabPlus.opt.New) {
o.removeChild(o.lastChild);
}
if (o.lastChild && Addons.TabPlus.opt.CloseAll) {
o.removeChild(o.lastChild);
}
let nDisp = o.getElementsByTagName("li").length;
while (nDisp > nCount) {
o.removeChild(o.lastChild);
Expand All @@ -60,7 +76,15 @@ if (window.Addon == 1) {
if (Addons.TabPlus.opt.Align > 1 && Addons.TabPlus.opt.Width) {
s.push(' style="text-align: center; width: 100%"');
}
s.push('>+</li>');
s.push('>', Addons.TabPlus.ImgNewTab, '</li>');
o.insertAdjacentHTML("beforeend", s.join(""));
}
if (Addons.TabPlus.opt.CloseAll) {
let s = ['<li class="tab3" onclick="Addons.TabPlus.CloseAll(', Id, ');return false"'];
if (Addons.TabPlus.opt.Align > 1 && Addons.TabPlus.opt.Width) {
s.push(' style="text-align: center; width: 100%"');
}
s.push('>', Addons.TabPlus.ImgCloseAll, '</li>');
o.insertAdjacentHTML("beforeend", s.join(""));
}
Addons.TabPlus.SetActiveColor(Id);
Expand Down Expand Up @@ -109,6 +133,15 @@ if (window.Addon == 1) {
}
},

CloseAll: async function (Id) {
const TC = await te.Ctrl(CTRL_TC, Id);
if (TC) {
for (var i = TC.Count; i--;) {
TC[i].Close();
}
}
},

Style: async function (TC, i, bRedraw, wait) {
let r = await Promise.all([TC[i], TC.Id]);
const FV = r[0];
Expand Down Expand Up @@ -511,6 +544,11 @@ if (window.Addon == 1) {

$.importScript("addons\\" + Addon_Id + "\\sync.js");

let newTabImage = "font:Segoe UI Emoji,0x271a";
if (Addons.TabPlus.IsWin10OrLater()) {
newTabImage = "font:Segoe UI Symbol,0xe109";
}

AddEvent("PanelCreated", async function (Ctrl, Id) {
const s = ['<ul id="tabplus_', Id, '" class="tab0" oncontextmenu="Addons.TabPlus.Popup(event,', Id, ');return false"'];
s.push(' ondblclick="Addons.TabPlus.DblClick(event,', Id, ');return false" onmousewheel="Addons.TabPlus.Wheel(event,', Id, ')" onresize="Resize();"');
Expand Down Expand Up @@ -581,7 +619,7 @@ if (window.Addon == 1) {
await Addons.TabPlus.Style(TC, i, true)
o = document.getElementById("tabplus_" + Id);
if (o) {
if (await TC.Count + (Addons.TabPlus.opt.New ? 1 : 0) != o.getElementsByTagName("li").length) {
if (await TC.Count + (Addons.TabPlus.opt.New ? 1 : 0) + (Addons.TabPlus.opt.CloseAll ? 1 : 0) != o.getElementsByTagName("li").length) {
o = null;
}
}
Expand Down Expand Up @@ -626,18 +664,28 @@ if (window.Addon == 1) {
onmouseout: "MouseOut()",
src: Addons.TabPlus.opt.IconClose || "font:Marlett,0x72"
}, r0),
GetImgTag({
draggable: "false",
"class": "button",
title: await GetText("Close all tabs"),
src: Addons.TabPlus.opt.IconClose || "font:Marlett,0x72"
}, r0),
GetImgTag({
draggable: "false",
src: Addons.TabPlus.opt.IconProtect || GetWinIcon(0xa00, "font:Segoe MDL2 Assets,0xea18", 0x602, "font:Segoe UI Emoji,0x26c9", 0, "font:Webdings,0x64")
}, r0),
GetImgTag({
draggable: "false",
"class": "button",
title: await GetText("New tab"),
src: Addons.TabPlus.opt.NewTab || newTabImage
}, r0)];
if (Addons.TabPlus.opt.New) {
r.push(GetText("New tab"));
}
Promise.all(r).then(function (r) {
Addons.TabPlus.ImgLock2 = r.shift();
Addons.TabPlus.ImgClose = r.shift();
Addons.TabPlus.ImgCloseAll = r.shift();
Addons.TabPlus.ImgProtect = r.shift();
Addons.TabPlus.str.NewTab = r.shift();
Addons.TabPlus.ImgNewTab = r.shift();
});
delete item;
} else {
Expand Down
7 changes: 5 additions & 2 deletions Debug/addons/undoclosetab/config.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<TablacusExplorer>
<General>
<Version>1.16</Version>
<Version>1.17</Version>
<MinVersion>2021.12.18</MinVersion>
<pubDate>Sun, 26 Dec 2021 00:00:00 GMT</pubDate>
<pubDate>2024-05-27 00:00:00 GMT</pubDate>
<Options>Common:0,5,6,7,8,9:0</Options>
<Level>2</Level>
<Creator>Gaku</Creator>
Expand All @@ -24,4 +24,7 @@
<zh>
<Name>復原已關閉分頁</Name>
</zh>
<zh_cn>
<Name>恢复已关闭的选项卡</Name>
</zh_cn>
</TablacusExplorer>
9 changes: 5 additions & 4 deletions Debug/script/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ button {

.button, .button1 {
display: inline-block; *display: inline; *zoom: 1;
padding: 1px 1px;
padding: 3px;
text-decoration: none;
cursor: default;
outline: 0;
Expand All @@ -73,15 +73,15 @@ button {
cursor: default;
background-color: #e3e3e3;
border: 1px solid #a0a0a0;
padding: 0;
padding: 2px;
outline: 0;
white-space: nowrap;
vertical-align: middle;
}

.menu {
display: inline-block; *display: inline; *zoom: 1;
margin: 1px 5px;
margin: 3px 5px;
text-decoration: none;
color: #000;
cursor: default;
Expand All @@ -96,7 +96,7 @@ button {
color: #000;
background-color: #e3e3e3;
border: 1px solid #a0a0a0;
padding: 0 4px;
padding: 2px 4px;
margin: 0;
}

Expand Down Expand Up @@ -157,6 +157,7 @@ button {
list-style: none;
margin: 0;
padding: 0 1px;
line-height: 1.5em;
cursor: default;
position: relative;
}
Expand Down
19 changes: 17 additions & 2 deletions Debug/script/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ TabIndex = -1;
g_x = { Menu: null, Addons: null };
g_Chg = { Menus: false, Addons: false, Tab: false, Tree: false, View: false, Data: null };
g_arMenuTypes = ["Default", "Context", "Background", "Tabs", "Tree", "File", "Edit", "View", "Favorites", "Tools", "Help", "Systray", "System", "Alias"];
g_arFields = ["Name", "Path", "Type", "Icon", "Height"];
g_MenuType = "";
g_Id = "";
g_dlgAddons = null;
Expand Down Expand Up @@ -898,7 +899,7 @@ async function LoadMenus(nSelected) {
}
}

async function LoadX(mode, fn, form) {
async function LoadX(mode, fn, form, arExtFields) {
if (!g_x[mode]) {
if (!form) {
form = document.F;
Expand Down Expand Up @@ -956,7 +957,21 @@ async function LoadX(mode, fn, form) {
g_x[mode].length = i;
while (--i >= 0) {
const item = items[i];
SetData(g_x[mode][i], [item.getAttribute("Name"), item.text || item.textContent, item.getAttribute("Type"), item.getAttribute("Icon"), item.getAttribute("Height")]);
const values = [];
for (let index = 0; index < g_arFields.length; index++) {
if (index != 1) {
values.push(item.getAttribute(g_arFields[index]));
} else {
values.push(item.text || item.textContent);
}
}
if (arExtFields) {
for (let index = 0; index < arExtFields.length; index++) {
values.push(item.getAttribute(arExtFields[index]));
}
}

SetData(g_x[mode][i], values);
}
}
EnableSelectTag(g_x[mode]);
Expand Down
Loading