mirror of
https://github.com/notion-enhancer/notion-enhancer.git
synced 2025-04-19 11:09:03 +00:00
Weekly view if word is included in view name
This commit is contained in:
parent
06f4d7b519
commit
925f6439fe
@ -426,7 +426,7 @@ the font you would like to use, or leave it blank to not change anything.
|
|||||||
|
|
||||||
**tags:** #extension
|
**tags:** #extension
|
||||||
|
|
||||||
**description:** calendar views named "weekly" will show only the 7 days of this week.
|
**description:** calendar views with the word "weekly" included in the name will show only the 7 days of this week.
|
||||||
|
|
||||||
**author:** [adihd](https://github.com/adihd/)
|
**author:** [adihd](https://github.com/adihd/)
|
||||||
|
|
||||||
|
@ -11,8 +11,8 @@ module.exports = {
|
|||||||
id: '4c7acaea-6596-4590-85e5-8ac5a1455e8f',
|
id: '4c7acaea-6596-4590-85e5-8ac5a1455e8f',
|
||||||
tags: ['extension'],
|
tags: ['extension'],
|
||||||
name: 'weekly view',
|
name: 'weekly view',
|
||||||
desc: 'calendar views named "weekly" will show only the 7 days of this week.',
|
desc: 'calendar views with the word "weekly" included in the name will show only the 7 days of this week.',
|
||||||
version: '0.5.1',
|
version: '0.5.2',
|
||||||
author: 'adihd',
|
author: 'adihd',
|
||||||
hacks: {
|
hacks: {
|
||||||
'renderer/preload.js'(store, __exports) {
|
'renderer/preload.js'(store, __exports) {
|
||||||
@ -31,7 +31,7 @@ module.exports = {
|
|||||||
document
|
document
|
||||||
.querySelectorAll('.notion-collection-view-select')
|
.querySelectorAll('.notion-collection-view-select')
|
||||||
.forEach((collection_view) => {
|
.forEach((collection_view) => {
|
||||||
if (collection_view.innerText.toLowerCase() !== 'weekly') return;
|
if (collection_view.innerText.toLowerCase().indexOf('weekly') === -1) return;
|
||||||
const days = collection_view.parentElement.parentElement.parentElement.parentElement.getElementsByClassName(
|
const days = collection_view.parentElement.parentElement.parentElement.parentElement.getElementsByClassName(
|
||||||
'notion-calendar-view-day'
|
'notion-calendar-view-day'
|
||||||
),
|
),
|
||||||
|
Loading…
Reference in New Issue
Block a user