bymaximus / msfs2020-toolbar-window-template

Microsoft FlightSimulator 2020 Toolbar Extra Window Template
118 stars 39 forks source link

Some site doesn't show in CustomPanel #23

Open sgenta115 opened 2 years ago

sgenta115 commented 2 years ago

I'm trying to show my original html in the custom panel and I made simple html. css and js and saved local but custom panel doesn't show anything.

I changed url in "CustomPanel.js" if (self.iframeElement) { self.iframeElement.src = 'https://www.ipify.org)/'; }

But some page doesn't display and panel display blank.

Doesn't display https://www.yahoo.co.jp/ https://www.bousai.metro.tokyo.lg.jp/1009757/1020469.html Local html file.(Same directory as CustomPanel.html)

Displayed https://www.ipify.org/ http://abehiroshi.la.coocan.jp/

I just want to know the diffference between displayed site and didn't displayed site, and why local html doesn't work. And I'll be happy if tell me how to solve this problem.

Please excuse my poor English. Please give me a hand.

Thanks

TryTryAgain commented 1 year ago

Also curious, I'm having an issue displaying http://127.0.0.1:3000 simple test :(

jwvanderbeck commented 2 months ago

Same. In the MSFS debug console I see an error about: [Coherent GT] Failed to locate file vfs:///html_UI/JS/debug.js So I don't think the thing is fully loading? I didn't try it with the default webpage though so maybe I should have. I've just using this an as example to try and read web content from a local server running on localhost.

jwvanderbeck commented 2 months ago

So in some more testing, the window does properly display the default page, but not my page served by localhost. I know my page is served properly so must be something about the way the HTML is formatted or something.

jwvanderbeck commented 2 months ago

So i did get my localhost webpage showing this morning! Unfortunately given how long it takes to restarts MSFS And test, I made a bunch of changes at once so I'm not 100% certain yet which change was the important one but just to give some information:

  1. I changed the port from 8080 to 9001
  2. I added a and <meta charset='UTF-8'> to the header html</li> <li>Instead of being on the root URL IE <a href="http://localhost:9001">http://localhost:9001</a>, I changed it to serve to a page, IE <a href="http://localhost:9001/index.html">http://localhost:9001/index.html</a></li> </ol> <p>Pretty sure the first item has nothing to do with it, and it is in fact either 2 or 3 or possibly both. If I narrow it down more in subsequent tests I will update here in case it helps anyone.</p> </div> </div> <div class="page-bar-simple"> </div> <div class="footer"> <ul class="body"> <li>© <script> document.write(new Date().getFullYear()) </script> Githubissues.</li> <li>Githubissues is a development platform for aggregating issues.</li> </ul> </div> <script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.min.js"></script> <script src="/githubissues/assets/js.js"></script> <script src="/githubissues/assets/markdown.js"></script> <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/highlight.min.js"></script> <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/languages/go.min.js"></script> <script> hljs.highlightAll(); </script> </body> </html>