Skip to content

Commit

Permalink
Merge pull request #119 from tim-hub/retire-unmatching-outgoing-links
Browse files Browse the repository at this point in the history
clean up the outgoing links
  • Loading branch information
tim-hub authored Aug 30, 2023
2 parents 02be4ed + 3847a9c commit 41b593b
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 51 deletions.
4 changes: 0 additions & 4 deletions src/data/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ export interface BibleReferencePluginSettings {
bibleTagging?: boolean
bookTagging?: boolean
chapterTagging?: boolean
bookBacklinking?: boolean // this is refering to outgoing link
chapterBacklinking?: boolean // this is refering to outgoing link

// add this to ui at some point todo
enableBibleVerseLookupRibbon?: boolean
Expand All @@ -35,8 +33,6 @@ export const DEFAULT_SETTINGS: BibleReferencePluginSettings = {
bibleTagging: false,
bookTagging: false,
chapterTagging: false,
bookBacklinking: false,
chapterBacklinking: false,
enableBibleVerseLookupRibbon: false,
}

Expand Down
31 changes: 0 additions & 31 deletions src/ui/BibleReferenceSettingTab.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,34 +207,6 @@ export class BibleReferenceSettingTab extends PluginSettingTab {
)
}

setUpBookOutgoingLinking = (containerEl: HTMLElement): void => {
new Setting(containerEl)
.setName('Add a Book Outgoing Link')
.setDesc('Makes an outgoing link for the book, for example [[John]]')
.addToggle((toggle) =>
toggle
.setValue(!!this.plugin.settings?.bookBacklinking)
.onChange((value) => {
this.plugin.settings.bookBacklinking = value
this.plugin.saveData(this.plugin.settings)
})
)
}

setUpChapterOutgoingLinking = (containerEl: HTMLElement): void => {
new Setting(containerEl)
.setName('Add a Chapter Outgoing Links')
.setDesc('Makes an outgoing link for the chaper, for example [[John1]] ')
.addToggle((toggle) =>
toggle
.setValue(!!this.plugin.settings?.chapterBacklinking)
.onChange((value) => {
this.plugin.settings.chapterBacklinking = value
this.plugin.saveData(this.plugin.settings)
})
)
}

async display(): Promise<void> {
const {containerEl} = this
containerEl.empty()
Expand All @@ -261,9 +233,6 @@ export class BibleReferenceSettingTab extends PluginSettingTab {
this.setUpBibleTagging(containerEl)
this.setUpBookTagging(containerEl)
this.setUpChapterTagging(containerEl)
// todo retire the bottom two settings
this.setUpBookOutgoingLinking(containerEl)
this.setUpChapterOutgoingLinking(containerEl)

if (flags.isFeatureEnabled('vod')) {
// todo add vod settings and reflect feature flags
Expand Down
16 changes: 0 additions & 16 deletions src/verse/VerseSuggesting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,6 @@ export class VerseSuggesting
this.bibleVersion = settings.bibleVersion
}

public get head(): string {
let head = super.head
// backlinks and tags use the BibleReferenceHeader
// and regex to clean book and chapters that will match
// across multiple different search queires
if (this.settings?.bookBacklinking) {
head += ` [[${this.verseReference.bookName}]]`
}
if (this.settings?.chapterBacklinking) {
head += ` [[${
this.verseReference.bookName + this.verseReference.chapterNumber
}]]`
}
return head
}

public get bottom(): string {
let bottom = super.bottom
if (
Expand Down

0 comments on commit 41b593b

Please sign in to comment.