Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom chat methods #132

Merged
merged 3 commits into from
Sep 2, 2015
Merged

Custom chat methods #132

merged 3 commits into from
Sep 2, 2015

Conversation

bastimeyer
Copy link
Member

This enables chat windows without address and bookmarks bars and also adds support for custom chat applications.

Previously, the chat was being opened by calling require( "nw.gui" ).Shell.openExternal( url ), so it was impossible #60 (comment) to hide the address and bookmarks bar of the browser window. To be able to do this, the browser executable had to be known, so special launch parameters could be set, but by using openExternal there was no way of doing it.

As I've already said here #9 (comment), I wanted to keep it as simple as possible. The most reasonable solution for me was adding a list of supported web browsers with predefined parameters, so those don't have to be inserted by the average user. Support for a custom command line has also been added, so different applications can be used, too.

I'm opening this pull request instead of just merging these changes, because I'd like to have some feedback first.

Right now, there's an issue with the Firefox implementation. The used parameters (firefox -chrome http://www.twitch.tv/CHANNEL/chat) should be correct, but the twitch chat refuses to load and I don't know why this is happening. I'm not a Firefox user, so if someone knows what's going on, please let me know, thanks.

The dropdown is hidden behind the advanced settings, but I'm not sure if this is really needed.

Build instructions can be found here

Enables minimal chat windows and/or custom chat applications.
@skulblakka
Copy link

I just tested this with Chrome, IE and Firefox. Chrome and IE works as intended. However I noticed that it will only work correctly when I specify a specific browser. If I keep it on the default setting it will just open a normal window/tab (but I think this might be intended).

With Firefox however I get the same issue you described. I had this problem when javascript is disabled. Is it possible that javascript is disabled when you open a chrome url?

@bastimeyer
Copy link
Member Author

If I keep it on the default setting it will just open a normal window/tab (but I think this might be intended).

Yes, there is no detection of the system's default browser, so it has to be set by the user.

Is it possible that javascript is disabled when you open a chrome url?

You are right, this seems to be the case here. hmmm 😕

@bastimeyer
Copy link
Member Author

I'm going to remove Firefox from the list for now, so I can merge this.

The only other method I've found and tried out was firefox -jsconsole "javascript:window.open('http://www.twitch.tv/CHANNEL/chat','_blank','menubar=0,location=0,toolbar=0,personalbar=0,status=0');window.close()", but without any success (popup block, noscript, etc).

I'm not entirely sure, but I think this is impossible without creating another user profile and using a custom theme or installing addons that hide the address and menu bar.
If the user decides to do so, it can be done by choosing the Custom application chat method and this command line firefox -p profilename {url}.

@bastimeyer bastimeyer merged commit bd1cbb1 into master Sep 2, 2015
@bastimeyer bastimeyer deleted the chat-methods branch September 4, 2015 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants