ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Js​Run

by sindresorhus OS X ST2/ST3

Run JavaScript in the browser - Sublime plugin (macOS)

Details

  • 2017.06.09.15.22.19
  • github.​com
  • github.​com
  • 6 months ago
  • 2 hours ago
  • 5 years ago

Installs

  • Total 2K
  • Win 4
  • OS X 2K
  • Linux 0
Dec 14 Dec 13 Dec 12 Dec 11 Dec 10 Dec 9 Dec 8 Dec 7 Dec 6 Dec 5 Dec 4 Dec 3 Dec 2 Dec 1 Nov 30 Nov 29 Nov 28 Nov 27 Nov 26 Nov 25 Nov 24 Nov 23 Nov 22 Nov 21 Nov 20 Nov 19 Nov 18 Nov 17 Nov 16 Nov 15 Nov 14 Nov 13 Nov 12 Nov 11 Nov 10 Nov 9 Nov 8 Nov 7 Nov 6 Nov 5 Nov 4 Nov 3 Nov 2 Nov 1 Oct 31
Windows 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
OS X 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 1 0 0 0 2 0 0 0 0 0 0 0 0 0 0 2 0 0 1 0 0 0 0 0 0 0
Linux 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

JsRun

Sublime plugin to run JavaScript in the browser

Lets you quickly run code from Sublime directly in the browser. You can use it to experiment with manipulating websites, overriding existing code, or any other crazy things you come up with. Let me know if you use it for anything interesting.

Install

Install JsRun with Package Control and restart Sublime.

Getting started

Select some code or just highlight a line and choose Run JavaScript in the browser in the Command Palette (Cmd+Shift+P). This will then run the command in the active tab in the frontmost browser window. Switch to the browser window to see the result or have them in split-window to see the result instantly.

Remember to open the Console in Dev Tools to see console.log output.

Options

Set your preferred browser in the settings: chrome (default), chrome_canary, safari, opera

(Preferences > Package Settings > JsRun)

Example:

{
    "browser": "chrome_canary"
}

Keyboard shortcut

You can also set up a keyboard shortcut to run the command by opening up “Preferences > Key Bindings - User” and adding your shortcut with the js_run command.

Example:

[
    {
        "keys": ["alt+super+j"],
        "command": "js_run"
    }
]

Supported browsers

Currently supports Chrome, Chrome Canary, Safari and Opera on OS X. Firefox doesn't expose JS to AppleScript.

License

MIT © Sindre Sorhus