diff --git a/src/features/usability_tweaks/usability_tweaks.js b/src/features/usability_tweaks/usability_tweaks.js index fff853b5..9dfff8bc 100644 --- a/src/features/usability_tweaks/usability_tweaks.js +++ b/src/features/usability_tweaks/usability_tweaks.js @@ -541,8 +541,18 @@ shouldInitializeFeature("usabilityTweaks").then((result) => { } // Open Add/Remove/Replace links in the same tab - if (isProfileEdit && options.removeTargetsFromEditFamilyLinks) { - $("a[href*='&who=']").attr("target", "_self"); + if (isProfileEdit) { + if (options.removeTargetsFromEditFamilyLinks) { + $("a[href*='&who=']").attr("target", "_self"); + } + + if (options.andBetweenParentsExample) { + //insert and between the parents in the example + var allExamples = document.getElementsByClassName("EXAMPLE"); + if (allExamples[2].innerHTML != null && allExamples[2].innerHTML.search(/\]\] \[\[/) > -1) { + allExamples[2].innerText = allExamples[2].innerHTML.replace("]] [[", "]] and [[").trim(); + } + } } // Replace Add/Remove/Replace links with Add, Remove, Connect links diff --git a/src/features/usability_tweaks/usability_tweaks_options.js b/src/features/usability_tweaks/usability_tweaks_options.js index d782dfee..943bab49 100644 --- a/src/features/usability_tweaks/usability_tweaks_options.js +++ b/src/features/usability_tweaks/usability_tweaks_options.js @@ -58,6 +58,12 @@ const usabilityTweaks = { type: OptionType.GROUP, label: "Profile edit page", options: [ + { + id: "andBetweenParentsExample", + type: OptionType.CHECKBOX, + label: "Insert 'and' between the parents in the wiki code example.", + defaultValue: true, + }, { id: "removeTargetsFromEditFamilyLinks", type: OptionType.CHECKBOX,