Skip to content

Commit

Permalink
Unify connecting characters in URL
Browse files Browse the repository at this point in the history
  • Loading branch information
haslinghuis committed Jan 14, 2023
1 parent a009691 commit 090fb77
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
6 changes: 3 additions & 3 deletions src/js/gui.js
Original file line number Diff line number Diff line change
Expand Up @@ -318,10 +318,10 @@ class GuiControl {
const documentationButton = $('div#content #button-documentation');
documentationButton.html("Wiki");

let url = `https://betaflight.com/docs/configurator/${GUI.active_tab.toLowerCase()}-tab`;
const req = new Request(url);
const tRex = GUI.active_tab.replaceAll('_', '-').toLowerCase();
const url = `https://betaflight.com/docs/configurator/${tRex}-tab`;

fetch(req).then(res => documentationButton.attr("href", res.ok ? url : `https://betaflight.com/docs/wiki`));
fetch(url).then(res => documentationButton.attr("href", res.ok ? url : `https://betaflight.com/docs/wiki`));

// loading tooltip
jQuery(function () {
Expand Down
8 changes: 2 additions & 6 deletions src/js/tabs/firmware_flasher.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,9 @@ firmware_flasher.initialize = function (callback) {
$('div.release_info .configFilename').text(self.isConfigLocal ? self.configFilename : "[default]");

// Wiki link to url found in unified target configuration or if not defined to general wiki url
let targetWiki = $('#targetWikiInfoUrl');
const targetWiki = $('#targetWikiInfoUrl');
targetWiki.html(`   [Wiki]`);
if (summary.wiki === undefined) {
targetWiki.attr("href", "https://github.com/betaflight/betaflight/wiki/");
} else {
targetWiki.attr("href", summary.wiki);
}
targetWiki.attr("href", summary.wiki === undefined ? "https://betaflight.com/docs/wiki/" : summary.wiki);

if (summary.cloudBuild) {
$('div.release_info #cloudTargetInfo').show();
Expand Down

0 comments on commit 090fb77

Please sign in to comment.