feat: add option to disable open graph cards (#1161)

fixes #1155
This commit is contained in:
Nolan Lawson 2019-04-20 09:12:42 -07:00 committed by GitHub
parent 1712081f0b
commit ecaeec226c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 1 deletions

View File

@ -254,7 +254,8 @@
), ),
spoilerShown: ({ $spoilersShown, uuid }) => !!$spoilersShown[uuid], spoilerShown: ({ $spoilersShown, uuid }) => !!$spoilersShown[uuid],
replyShown: ({ $repliesShown, uuid }) => !!$repliesShown[uuid], replyShown: ({ $repliesShown, uuid }) => !!$repliesShown[uuid],
showCard: ({ originalStatus, isStatusInNotification, showMedia }) => ( showCard: ({ originalStatus, isStatusInNotification, showMedia, $hideCards }) => (
!$hideCards &&
!isStatusInNotification && !isStatusInNotification &&
!showMedia && !showMedia &&
originalStatus.card && originalStatus.card &&

View File

@ -32,6 +32,11 @@
bind:checked="$disableCustomScrollbars" on:change="onChange(event)"> bind:checked="$disableCustomScrollbars" on:change="onChange(event)">
<label for="choice-disable-custom-scrollbars">Disable custom scrollbars</label> <label for="choice-disable-custom-scrollbars">Disable custom scrollbars</label>
</div> </div>
<div class="setting-group">
<input type="checkbox" id="choice-hide-cards"
bind:checked="$hideCards" on:change="onChange(event)">
<label for="choice-hide-cards">Hide link preview cards</label>
</div>
<div class="setting-group"> <div class="setting-group">
<input type="checkbox" id="choice-underline-links" <input type="checkbox" id="choice-underline-links"
bind:checked="$underlineLinks" on:change="onChange(event)"> bind:checked="$underlineLinks" on:change="onChange(event)">

View File

@ -15,6 +15,7 @@ const persistedState = {
disableHotkeys: false, disableHotkeys: false,
disableLongAriaLabels: false, disableLongAriaLabels: false,
disableTapOnStatus: false, disableTapOnStatus: false,
hideCards: false,
largeInlineMedia: false, largeInlineMedia: false,
instanceNameInSearch: '', instanceNameInSearch: '',
instanceThemes: {}, instanceThemes: {},