also looking at this
Calendar view for the queue (#20)
#23
2 files
+166
-21
| @@ -973,9 +973,21 @@ | ||
| 973 | 973 | // Wait for the social module (a deferred `type=module` script) before the |
| 974 | 974 | // first provider fetch so window.postlineSocial is guaranteed to exist. |
| 975 | 975 | // Load the edit post only after connection so provider toggles resolve. |
| 976 | // /?schedule=YYYY-MM-DD (from the queue calendar) opens the schedule | |
| 977 | // input pre-set to 09:00 local on that day. | |
| 978 | const scheduleParam = new URLSearchParams(window.location.search).get('schedule') | |
| 979 | const applyScheduleParam = () => { | |
| 980 | if (!scheduleParam || !scheduleInput || !/^\d{4}-\d{2}-\d{2}$/.test(scheduleParam)) return | |
| 981 | scheduleInput.value = `${scheduleParam}T09:00` | |
| 982 | scheduleInput.classList.remove('hidden') | |
| 983 | updatePublishLabel() | |
| 984 | activeTextarea()?.focus() | |
| 985 | } | |
| 986 | ||
| 976 | 987 | const start = async () => { |
| 977 | 988 | await refreshConnection() |
| 978 | 989 | if (editParam) await loadEditPost(editParam) |
| 990 | else applyScheduleParam() | |
| 979 | 991 | } |
| 980 | 992 | if (document.readyState === 'loading') { |
| 981 | 993 | document.addEventListener('DOMContentLoaded', () => void start(), { once: true }) |