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

Cannot specify an alternative browser #15

Open
Symbolics opened this issue Feb 4, 2021 · 1 comment
Open

Cannot specify an alternative browser #15

Symbolics opened this issue Feb 4, 2021 · 1 comment

Comments

@Symbolics
Copy link

In some environments, the default browser, the one the user normally uses, has JavaScript and other security measures in place that mean it cannot render Plotly. In these cases, an alternative browser can be installed specifically for rendering, however open-browser is hard-coded to use explorer (on MS Windows).

One solution is to specify the browser in an init file, e.g. kai-init.lisp, like so:

(defparameter *browser* "C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe")
(defparameter *browser-options* "--app=")

and then launching it like this:

(uiop:run-program #+(or win32 mswindows windows)
		      `(,*browser*
			,(concatenate 'string
				      *browser-options*
				      (namestring path-to-html)))

This also provides the ability to set browser options, like in this case where all the browser window controls are removed and only the plot is displayed.

@Symbolics
Copy link
Author

This issue is addressed in pull request #18.

Existing functionality is unchanged by default. Chrome has been added as an alternative, along with a few common options. The additions can also support other browsers and options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant