Расширение «Моё время в Битрикс24»

Часы по задачам за месяц и остаток до нормы, через REST от сессии браузера.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alex Cube
2026-10-26 01:14:06 +03:00
co-authored by Claude Opus 5.5
commit c701f07483
8 changed files with 252 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
const portal = document.getElementById('portal');
const norm = document.getElementById('norm');
const status = document.getElementById('status');
chrome.storage.sync.get({ portal: '', norm: 0 }, cfg => {
portal.value = cfg.portal;
norm.value = cfg.norm || '';
});
document.getElementById('save').onclick = async () => {
let p = portal.value.trim();
if (p) {
try {
p = new URL(p.includes('://') ? p : 'https://' + p).origin + '/';
} catch {
status.textContent = 'Адрес портала не похож на адрес';
return;
}
}
await chrome.storage.sync.set({ portal: p, norm: Math.max(0, Number(norm.value) || 0) });
portal.value = p;
status.textContent = 'Сохранено';
};