diff --git a/src/features/mutual_checker.js b/src/features/mutual_checker.js index cb6614c62..4657173df 100644 --- a/src/features/mutual_checker.js +++ b/src/features/mutual_checker.js @@ -35,8 +35,9 @@ const styleElement = buildStyle(` margin-right: 0.5ch; } - ${followingTimelineSelector} [${hiddenAttribute}] article { - display: none; + ${followingTimelineSelector} [${hiddenAttribute}] { + content: linear-gradient(transparent, transparent); + height: 0; } ${keyToCss('blogCardBlogLink')} { diff --git a/src/features/no_recommended/hide_recommended_posts.js b/src/features/no_recommended/hide_recommended_posts.js index ce6135a54..8d93347b7 100644 --- a/src/features/no_recommended/hide_recommended_posts.js +++ b/src/features/no_recommended/hide_recommended_posts.js @@ -10,8 +10,9 @@ const timeline = followingTimelineFilter; const includeFiltered = true; export const styleElement = buildStyle(` -[${hiddenAttribute}]:not([${unHiddenAttribute}]) article { - display: none; +[${hiddenAttribute}]:not([${unHiddenAttribute}]) { + content: linear-gradient(transparent, transparent); + height: 0; } :not([${unHiddenAttribute}]) + [${unHiddenAttribute}]::before { diff --git a/src/features/postblock.css b/src/features/postblock.css index 4a878a331..6e41175ae 100644 --- a/src/features/postblock.css +++ b/src/features/postblock.css @@ -1,3 +1,4 @@ -[data-postblock-hidden] article { - display: none; +[data-postblock-hidden] { + content: linear-gradient(transparent, transparent); + height: 0; } diff --git a/src/features/seen_posts.css b/src/features/seen_posts.css index ac3cf2917..ef428620d 100644 --- a/src/features/seen_posts.css +++ b/src/features/seen_posts.css @@ -3,8 +3,9 @@ body.xkit-seen-posts-only-dim-avatar [data-seen-posts-seen]:not(:hover) article opacity: 0.5; } -body.xkit-seen-posts-hide [data-seen-posts-seen] article { - display: none; +body.xkit-seen-posts-hide [data-seen-posts-seen] { + content: linear-gradient(transparent, transparent); + height: 0; } body.xkit-seen-posts-hide .xkit-seen-posts-lengthened { diff --git a/src/features/show_originals.css b/src/features/show_originals.css index dc6e2302d..654086834 100644 --- a/src/features/show_originals.css +++ b/src/features/show_originals.css @@ -1,5 +1,6 @@ -[data-show-originals="on"] ~ div > [data-show-originals-hidden] article { - display: none; +[data-show-originals="on"] ~ div > [data-show-originals-hidden] { + content: linear-gradient(transparent, transparent); + height: 0; } .xkit-show-originals-lengthened { diff --git a/src/features/tweaks/hide_filtered_posts.js b/src/features/tweaks/hide_filtered_posts.js index 1dc5d276b..4fecf67ed 100644 --- a/src/features/tweaks/hide_filtered_posts.js +++ b/src/features/tweaks/hide_filtered_posts.js @@ -3,8 +3,11 @@ import { keyToCss } from '../../utils/css_map.js'; import { buildStyle, getTimelineItemWrapper } from '../../utils/interface.js'; const hiddenAttribute = 'data-tweaks-hide-filtered-posts-hidden'; - -export const styleElement = buildStyle(`[${hiddenAttribute}] article { display: none; }`); +export const styleElement = buildStyle(` +[${hiddenAttribute}] { + content: linear-gradient(transparent, transparent); + height: 0; +}`); const hideFilteredPosts = filteredScreens => filteredScreens .map(getTimelineItemWrapper) diff --git a/src/features/tweaks/hide_liked_posts.js b/src/features/tweaks/hide_liked_posts.js index 132ae1208..2d97064ca 100644 --- a/src/features/tweaks/hide_liked_posts.js +++ b/src/features/tweaks/hide_liked_posts.js @@ -6,8 +6,11 @@ import { followingTimelineFilter } from '../../utils/timeline_id.js'; const timeline = followingTimelineFilter; const hiddenAttribute = 'data-tweaks-hide-liked-posts-hidden'; - -export const styleElement = buildStyle(`[${hiddenAttribute}] article { display: none; }`); +export const styleElement = buildStyle(` +[${hiddenAttribute}] { + content: linear-gradient(transparent, transparent); + height: 0; +}`); const processPosts = async function (postElements) { filterPostElements(postElements, { timeline }).forEach(async postElement => { diff --git a/src/features/tweaks/hide_my_posts.js b/src/features/tweaks/hide_my_posts.js index e4a7801e5..ad0eb32e9 100644 --- a/src/features/tweaks/hide_my_posts.js +++ b/src/features/tweaks/hide_my_posts.js @@ -7,8 +7,11 @@ const excludeClass = 'xkit-tweaks-hide-my-posts-done'; const timeline = followingTimelineFilter; const hiddenAttribute = 'data-tweaks-hide-my-posts-hidden'; - -export const styleElement = buildStyle(`[${hiddenAttribute}] article { display: none; }`); +export const styleElement = buildStyle(` +[${hiddenAttribute}] { + content: linear-gradient(transparent, transparent); + height: 0; +}`); const processPosts = async function (postElements) { filterPostElements(postElements, { excludeClass, timeline }).forEach(async postElement => {