rubyinstaller icon indicating copy to clipboard operation
rubyinstaller copied to clipboard

Does the *.chm document browser use IE? I get the following warning at the top.

Open DouglasAllen opened this issue 12 years ago • 10 comments

Please note that GitHub no longer supports Internet Explorer versions 7 or 8. We recommend upgrading to the latest Internet Explorer, Google Chrome, or Firefox.

If you are using IE 9 or later, make sure you turn off "Compatibility View". . I have no choice on Windows XP. Newer IE is not an option Can *.chm be used use other browsers?

DouglasAllen avatar Apr 24 '13 20:04 DouglasAllen

Please consider making the docs a linked pdf.

DouglasAllen avatar Apr 24 '13 20:04 DouglasAllen

for *.chm you should download and install download WinHelp from Microsoft. But the content is available online under http://www.ruby-lang.org/en/documentation/

sroller avatar Apr 24 '13 20:04 sroller

I'm guessing this is the result of clicking on the "The RubyInstaller Wiki" in the Help Viewer itself.

The documentation itself is available in several different forms all over the internet. A chm file is offered for convenience more than anything.

As for fixing your problem, there is actually no work around. Even though the chm format is Microsoft Compiled HTML Help, it can't easily be opened as an HTML document in any other browser.

Since it is an HTML viewer at heart it does have limited HTML capabilities. Although it seems that it can't handle Github's new fancy search box, which is why you're getting that message.

@luislavena The easy way to fix this it to remove all external links in the chm. I looked into making them open in the default browser and it can be accomplished with something like

<script>
  function openbrowser(url) {
    window.open(url);
  };
</script>

<a href="#" 
     data-url="http://wiki.github.com/oneclick/rubyinstaller" 
     onclick="openbrowser(data-url)"
>
  Test
</a>

But right now it's being parsed as RDoc Markup and I don't know how to insert raw html. I could change the parsed markup to markdown and probably accomplish it, but it could probably be done in RDoc Markup some way.

So the options I can see are to remove all the external links, use window.open(url) javascript, or leave the file as-is.

Whatever you want to do in this case let me know and I'll do it.

Azolo avatar Apr 24 '13 22:04 Azolo

A slightly better way to open the links:

<script type="text/javascript">
  function inBrowser(a){ window.open(a.href); return false }
</script>

<a href="http://wiki.github.com/oneclick/rubyinstaller" onclick="return inBrowser(this)">…</a>

This allows the link to still function in CHM readers where JavaScript is disabled.

Phrogz avatar Jul 09 '13 18:07 Phrogz

@Azolo have you tried @Phrogz suggestion?

If it doesn't work, can we make the links open with target="_blank"? If not, then let's remove them so next build of the installer doesn't have them.

Please confirm so I can perform the changes.

Thank you.

luislavena avatar Oct 30 '13 00:10 luislavena

I think it did, I can't really remember. If you can give me till tomorrow I can double check.

I think the problem was I didn't know how to write plain HTML in RDoc markup.

Azolo avatar Oct 30 '13 00:10 Azolo

It works, @Phrogz solution opens up a new window in a system's default browser.

Azolo avatar Oct 30 '13 20:10 Azolo

@Azolo being these links in README.txt, not sure how we can inject the JavaScript into it :cry:

luislavena avatar Oct 31 '13 00:10 luislavena

@luislavena Hmmm, well then it seems that this is something that should be handled in rdoc_chm. Changing all external links to use that format seems reasonable.

That being said, I found out that if we put the javascript and links as plain html instead of RDoc format they will get parsed literally and produce the desired results. But then the help only becomes useful when the end result is a html like format (granted that is nearly all the time).

I'm a little busy at the moment, but I can look at rdoc_chm and see what I can do next week. If it looks like too much then I would say just write it as raw javascript and html.

Azolo avatar Oct 31 '13 20:10 Azolo

Been busy lately, anyway it's like 90% there. I had to update and tweak rdoc_chm a couple of ways to get the templates and links changing correctly.

The problem is, I can't get the new window JavaScript to work correctly in IE and consequently the chm JavaScript isn't working.

I think I may get the rdoc_chm update (which will allow http links to be processed differently) ready and hopefully let someone smarter than me figure out how to get the JavaScript working.

Azolo avatar Jan 10 '14 19:01 Azolo