chore: checkpoint current working state

This commit is contained in:
2026-02-12 17:40:52 +01:00
parent 585e5d5455
commit bbfa93a586
6 changed files with 206 additions and 44 deletions

View File

@@ -17,6 +17,7 @@ const SEARCH_RESULTS_PATH_PREFIX = '/search';
const FEED_HOME_PATHS = ['/', '/home.php'];
const sessionSearchRecordedUrls = new Set();
const sessionSearchInfoCache = new Map();
let profileSelectionNoticeShown = false;
function isOnSearchResultsPage() {
try {
@@ -49,6 +50,19 @@ function maybeRedirectPageReelsToMain() {
if (typeof pathname !== 'string') {
return false;
}
if (pathname.toLowerCase() === '/profile.php') {
const params = new URLSearchParams(location.search || '');
const profileId = params.get('id');
const sk = params.get('sk');
if (profileId && sk && sk.toLowerCase().startsWith('reel')) {
const targetUrl = `${location.origin}/profile.php?id=${encodeURIComponent(profileId)}`;
if (location.href !== targetUrl) {
location.replace(targetUrl);
return true;
}
return false;
}
}
const match = pathname.match(/^\/([^/]+)\/reels\/?$/i);
if (!match) {
return false;
@@ -513,6 +527,10 @@ async function getProfileNumber() {
console.warn('[FB Tracker] Failed to resolve profile number from backend:', error);
}
if (!profileSelectionNoticeShown) {
profileSelectionNoticeShown = true;
showToast('Bitte zuerst ein Profil im Tracker auswählen.', 'error');
}
return null;
}