File tree Expand file tree Collapse file tree 2 files changed +6
-9
lines changed Expand file tree Collapse file tree 2 files changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -318,9 +318,10 @@ class GuiControl {
318318 const documentationButton = $ ( 'div#content #button-documentation' ) ;
319319 documentationButton . html ( "Wiki" ) ;
320320
321- if ( GUI . active_tab !== 'firmware_flasher' ) { // hack till we have a nice solution for individual wiki URLs for each page
322- documentationButton . attr ( "href" , "https://github.com/betaflight/betaflight/wiki" ) ;
323- }
321+ const tRex = GUI . active_tab . replaceAll ( '_' , '-' ) . toLowerCase ( ) ;
322+ const url = `https://betaflight.com/docs/configurator/${ tRex } -tab` ;
323+
324+ fetch ( url ) . then ( res => documentationButton . attr ( "href" , res . ok ? url : `https://betaflight.com/docs/wiki` ) ) ;
324325
325326 // loading tooltip
326327 jQuery ( function ( ) {
Original file line number Diff line number Diff line change @@ -76,13 +76,9 @@ firmware_flasher.initialize = function (callback) {
7676 $ ( 'div.release_info .configFilename' ) . text ( self . isConfigLocal ? self . configFilename : "[default]" ) ;
7777
7878 // Wiki link to url found in unified target configuration or if not defined to general wiki url
79- let targetWiki = $ ( '#targetWikiInfoUrl' ) ;
79+ const targetWiki = $ ( '#targetWikiInfoUrl' ) ;
8080 targetWiki . html ( ` [Wiki]` ) ;
81- if ( summary . wiki === undefined ) {
82- targetWiki . attr ( "href" , "https://github.com/betaflight/betaflight/wiki/" ) ;
83- } else {
84- targetWiki . attr ( "href" , summary . wiki ) ;
85- }
81+ targetWiki . attr ( "href" , summary . wiki === undefined ? "https://betaflight.com/docs/wiki/" : summary . wiki ) ;
8682
8783 if ( summary . cloudBuild ) {
8884 $ ( 'div.release_info #cloudTargetInfo' ) . show ( ) ;
You can’t perform that action at this time.
0 commit comments