GithubHelp home page GithubHelp logo

Focus browser about sublime-jsrun HOT 9 CLOSED

sindresorhus avatar sindresorhus commented on July 28, 2024
Focus browser

from sublime-jsrun.

Comments (9)

wpowers avatar wpowers commented on July 28, 2024

Some thoughts on possible enhancement. Would these be desirable or not:

  1. Focus window
  2. Open web inspector if closed
  3. Open console if closed
  4. Show evaluation input in console in the same way that highlighting code in the sources pane of web inspector, right clicking and selecting Evaluate in Console, does.

from sublime-jsrun.

drublic avatar drublic commented on July 28, 2024

An option for this might be the best thing to do IMO.
I personally don't need it because I like switching manually, I don't want the tools to take over my actions too much. Maybe I want to run 5 different commands first before switching to the browser… or something.

I think opening the console when needed could be something that might be in the extension by default.

from sublime-jsrun.

sindresorhus avatar sindresorhus commented on July 28, 2024

Thanks for your input :)

I'm thinking focus_browser and open_console options. Sounds good?

However, I can't promise anything on the opening of console. I don't have a lot of AppleScript fu.

from sublime-jsrun.

drublic avatar drublic commented on July 28, 2024

SGTM.

from sublime-jsrun.

wpowers avatar wpowers commented on July 28, 2024

Yep, I can live with that :)

from sublime-jsrun.

addyosmani avatar addyosmani commented on July 28, 2024

My vote would also be for the option. On opening the console, we do support this via a flag but there are situations where it isn't reliable. Can dig up more info if needed.

from sublime-jsrun.

sindresorhus avatar sindresorhus commented on July 28, 2024

@addyosmani The problem is that the user most likely already have the browser open. I'm pretty sure flags only work when starting Chrome. Correct me if I'm wrong.

I was thinking of just executing Option+Command+J using AppleScript. The biggest hurdle is detection if the Dev Tools is already open.

Suggestions on anything more than welcome :)

from sublime-jsrun.

tiffon avatar tiffon commented on July 28, 2024

A couple of links that might be helpful, but not sure how you'd get this info to your plugin:

http://stackoverflow.com/questions/7527442/how-to-detect-chrome-inspect-element-is-running-or-not/15567735#15567735

https://github.com/adamschwartz/chrome-inspector-detector

from sublime-jsrun.

sindresorhus avatar sindresorhus commented on July 28, 2024

Closing as I don't care anymore.

https://github.com/lsegal/atom-runner looks like a much better plugin ;)

from sublime-jsrun.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.