File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 255255 const selfHosted = repo == 'www.eclipse.org-eclipse' ;
256256 const repoName = parts == null ? '' : repoNames [ `${ org } /${ repo } ` ] ;
257257
258+ var applicableLocalURL = null ;
259+
258260 const localSiteNavigator = isLocalHost ? `<a href="${ getMarkdownURL ( 'eclipse-platform/www.eclipse.org-eclipse/master/' ) } ">Eclipse Website Navigator</a>` : '' ;
259261 defaultAside = toElements ( `${ markdownAside } ${ localSiteNavigator } ` ) ;
260262
@@ -444,6 +446,8 @@ <h2>Table of Contents</h2>
444446 const siteURL = toSiteURL ( logicalSrc ) ;
445447 if ( siteURL != null ) {
446448 img . src = siteURL ;
449+ } else if ( applicableLocalURL != null ) {
450+ img . src = new URL ( src , applicableLocalURL ) ;
447451 } else {
448452 img . src = new URL ( `https://raw.githubusercontent.com/${ org } /${ repo } /${ branch } /${ path } /../${ src } ` ) ;
449453 }
@@ -622,6 +626,7 @@ <h2>Table of Contents</h2>
622626 localURL . pathname = `${ org } /${ repo } /${ branch } /${ path } ` ;
623627 fetch ( localURL , { method : 'HEAD' , cache : "no-store" } ) . then ( response => {
624628 if ( response . status == 200 && response . headers . get ( 'Server' ) == 'org.eclipse.oomph.internal.util.HTTPServer' ) {
629+ applicableLocalURL = localURL ;
625630 defaultHandler ( localURL ) ;
626631 } else {
627632 defaultHandler ( defaultURL ) ;
You can’t perform that action at this time.
0 commit comments