Comments (17)
@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
from browserrefresh-sublime.
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?
from browserrefresh-sublime.
I just stumbled on this issue as well, glad to help as long as I know what to do.
from browserrefresh-sublime.
@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
https://github.com/gcollazo/BrowserRefresh-Sublime/blob/master/mac/__init__.py
Finally hook everything up in the main plugin file and make sure you test different settings
https://github.com/gcollazo/BrowserRefresh-Sublime/blob/master/BrowserRefresh.py
from browserrefresh-sublime.
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!
from browserrefresh-sublime.
That should be the regex for the search.
if re.search('FirefoxDeveloperEdition\.app', ps) is not None:
running_browsers.append('firefoxdeved')
from browserrefresh-sublime.
Ah, that's very close to what I had yesterday. Will try this, thanks!
from browserrefresh-sublime.
This should be the AppleScript. If it doesn't work you should try adding a delay 0.1
after the activate
instruction.
tell application "FirefoxDeveloperEdition"
activate
tell application "System Events" to keystroke "r" using command down
end tell
from browserrefresh-sublime.
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)
from browserrefresh-sublime.
Not working, yet...
In BrowserRefresh.py
I have the following:
elif browser_name == 'FirefoxDeveloperEdition':
refresher.firefoxdeved()
and
elif browser_name == 'all':
refresher.chrome()
refresher.safari()
refresher.firefox()
refresher.opera()
refresher.firefoxdeved()
from browserrefresh-sublime.
Also in utils.py
I have
if re.search(b'FirefoxDeveloperEdition\.app', ps) is not None:
running_browsers.append('firefoxdeved')
not the b
before 'FirefoxDevel...
I tried with and without. Close, but no cigar, yet.
from browserrefresh-sublime.
In __init__.py
I have the following now:
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)
from browserrefresh-sublime.
My apologies for the struggle here, I know little to none about Python.
from browserrefresh-sublime.
That commit adds the feature. I'll try to release a new version as soon as possible.
from browserrefresh-sublime.
Ok, the new version is up
https://packagecontrol.io/packages/Browser%20Refresh
from browserrefresh-sublime.
Fantastic. Thanks a lot, Giovanni!
from browserrefresh-sublime.
There seems to be a bug where Safari starts up when it's not running on refresh. Firefox Dev Ed is refreshing after that.
For now I commented out Safari, since I don't use that for testing.
In BrowserRefresh.py
I commented out:
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.
from browserrefresh-sublime.
Related Issues (20)
- Not working in Waterfox
- Adding new Browser - Brave HOT 1
- Focus back on sublime text after Chrome reload? HOT 1
- Refreshes Dev Tools window not the browser window
- Linux xdotool hangs if window type not found (not opened) -> subl hangs
- Doesn't work HOT 1
- Not working HOT 1
- Chrome not opening on using combination Ctrl+Shift+R (windows) HOT 5
- Delay before reload ? HOT 2
- ST2 Compatibility?
- Not ideal for dual monitor -- Refreshing and minimizing ST HOT 3
- "activate" argument can work in Linux!
- Refresh all open tabs if you have multiple windows open
- [Feature request] Remember tab in browser
- Issue: it refresh current tab without loading new page
- Issue: Not working with current version of Firefox Developer Edition HOT 2
- Not working on win10 with chrome HOT 8
- Does it work on edge?
- Blisk Chromium Based HOT 1
- [Feature Request] toggle for return of focus?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from browserrefresh-sublime.