From 052122d33df72b5d25bc36c6003824ce130d31a5 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Sun, 15 Mar 2026 08:55:18 +0000
Subject: [PATCH 1/2] Initial plan
From cf095af746211675e9e92e9f8551108437d71d91 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Sun, 15 Mar 2026 08:58:14 +0000
Subject: [PATCH 2/2] fix: show bookmarklet login first on desktop, reverse
message order in thread view
Co-authored-by: PythonSmall-Q <106425289+PythonSmall-Q@users.noreply.github.com>
---
messages.html | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/messages.html b/messages.html
index 2deedefb..1823ae81 100644
--- a/messages.html
+++ b/messages.html
@@ -548,7 +548,7 @@
与 … 的对话
tbody.innerHTML = '| 暂无消息 |
';
return;
}
- tbody.innerHTML = mails.map(function(m) {
+ tbody.innerHTML = mails.slice().reverse().map(function(m) {
var isUnread = !m.IsRead;
var isHighlight = isUnread && m.FromUser !== currentUser.username;
return '' +
@@ -727,6 +727,15 @@ 与 … 的对话
document.getElementById('tab-manual').style.display = tab === 'manual' ? '' : 'none';
});
});
+// On desktop (precise pointer + hover) default to bookmarklet tab; mobile defaults to session tab
+(function() {
+ var isDesktop = window.matchMedia('(hover: hover) and (pointer: fine)').matches;
+ var defaultTab = isDesktop ? 'bookmarklet' : 'manual';
+ document.querySelectorAll('#loginTabs .nav-link').forEach(function(b) { b.classList.remove('active'); });
+ document.querySelector('#loginTabs [data-tab="' + defaultTab + '"]').classList.add('active');
+ document.getElementById('tab-bookmarklet').style.display = defaultTab === 'bookmarklet' ? '' : 'none';
+ document.getElementById('tab-manual').style.display = defaultTab === 'manual' ? '' : 'none';
+}());
// ── Event Wiring ───────────────────────────────────────────────────────────
document.getElementById('btn-manual-login').addEventListener('click', function() {