mirror of
https://github.com/notion-enhancer/notion-enhancer.git
synced 2025-04-07 05:59:02 +00:00
#101 weekly calendar view even if not first on page
This commit is contained in:
parent
287e3551b5
commit
03c12b137d
@ -30,11 +30,10 @@ module.exports = {
|
||||
subtree: true,
|
||||
});
|
||||
function process(list, observer) {
|
||||
const collection_view = document.querySelector(
|
||||
'.notion-collection-view-select'
|
||||
);
|
||||
if (!collection_view || collection_view.innerText != 'weekly')
|
||||
return;
|
||||
document
|
||||
.querySelectorAll('.notion-collection-view-select')
|
||||
.forEach((collection_view) => {
|
||||
if (collection_view.innerText != 'weekly') return;
|
||||
const days = collection_view.parentElement.parentElement.parentElement.parentElement.getElementsByClassName(
|
||||
'notion-calendar-view-day'
|
||||
),
|
||||
@ -46,7 +45,9 @@ module.exports = {
|
||||
: 0;
|
||||
for (let day of days)
|
||||
day.parentElement.parentElement.style.height = 0;
|
||||
if (today) today.parentElement.parentElement.style.height = height;
|
||||
if (today)
|
||||
today.parentElement.parentElement.style.height = height;
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user