Skip to content

Commit

Permalink
No Recommended: Hide communities in the search dropdown (#1685)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcustyphoon authored Jan 19, 2025
1 parent 0b21f78 commit 8bedb50
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/features/no_recommended.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@
"label": "Hide recommended communities between posts",
"default": false
},
"hide_search_communities": {
"type": "checkbox",
"label": "Hide suggested communities in the search dropdown",
"default": false
},
"hide_lightbox_related": {
"type": "checkbox",
"label": "Hide related posts in the photo lightbox",
Expand Down
7 changes: 7 additions & 0 deletions src/features/no_recommended/hide_search_communities.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { keyToCss } from '../../utils/css_map.js';
import { buildStyle } from '../../utils/interface.js';
import { translate } from '../../utils/language_data.js';

export const styleElement = buildStyle(`
${keyToCss('typeaheadSection')}:has(> [aria-label="${translate('Suggested communities')}"]) { display: none; }
`);

0 comments on commit 8bedb50

Please sign in to comment.