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
Support for Firefox Developer Edition #66
Comments
@AlexKvazos Pull requests are welcomed. Currently I'm not using FF DevEd so I don't really have a need for it. If you are interested I can point you in the right direction on how to implement this feature 😄 |
Sure! I'd be glad to help integrate this. What should I have a look at to get an idea of what I have to add? |
I just stumbled on this issue as well, glad to help as long as I know what to do. |
@waldbach This are the basic things that need to be donde to support a new browser. I'm assuming you are on a Mac. First you have to create a regex to detect if the browser is running https://github.com/gcollazo/BrowserRefresh-Sublime/blob/master/mac/utils.py Then make an AppleScript that will actually refresh the browser Finally hook everything up in the main plugin file and make sure you test different settings |
Thanks, I fiddled with those locally, yesterday. But I guess I could not get the naming right for the Developer Edition. I will try again, cheers! |
That should be the regex for the search. if re.search('FirefoxDeveloperEdition\.app', ps) is not None:
running_browsers.append('firefoxdeved') |
Ah, that's very close to what I had yesterday. Will try this, thanks! |
This should be the AppleScript. If it doesn't work you should try adding a tell application "FirefoxDeveloperEdition"
activate
tell application "System Events" to keystroke "r" using command down
end tell |
For the Applescript I had this: def firefoxdeved(self):
command = """
tell application "FirefoxDeveloperEdition"
activate
tell application "System Events" to keystroke "r" using command down
end tell
"""
if 'firefoxdeved' in self.browsers:
self._call_applescript(command) |
Not working, yet... In elif browser_name == 'FirefoxDeveloperEdition':
refresher.firefoxdeved() and elif browser_name == 'all':
refresher.chrome()
refresher.safari()
refresher.firefox()
refresher.opera()
refresher.firefoxdeved() |
Also in if re.search(b'FirefoxDeveloperEdition\.app', ps) is not None:
running_browsers.append('firefoxdeved') not the |
In def firefoxdeved(self):
command = """
tell application "FirefoxDeveloperEdition"
activate
delay 0.1
tell application "System Events" to keystroke "r" using command down
end tell
"""
if 'firefoxdeved' in self.browsers:
self._call_applescript(command) |
My apologies for the struggle here, I know little to none about Python. |
That commit adds the feature. I'll try to release a new version as soon as possible. |
Ok, the new version is up |
Fantastic. Thanks a lot, Giovanni! |
There seems to be a bug where Safari starts up when it's not running on refresh. Firefox Dev Ed is refreshing after that. In elif browser_name == 'all':
refresher.chrome()
# refresher.safari()
refresher.firefox()
refresher.opera() Now it all works fine! :) Edit: I just realized this is better posted as a new issue, will do that now. |
Are there any plans to add support for Firefox Developer Edition?
Thanks,
Alex
The text was updated successfully, but these errors were encountered: