FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Updated WebAgg JS to check and send request over wss if using HTTPS by whyvra · Pull Request #25039 · matplotlib/matplotlib · GitHub

Repository navigation

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .html  (2) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@
figure_div.id = "figure-div";
main_div.appendChild(figure_div);
var websocket_type = mpl.get_websocket_type();
var websocket = new websocket_type("{{ ws_uri }}" + fig_id + "/ws");
var uri = "{{ ws_uri }}" + fig_id + "/ws";
if (window.location.protocol === "https:") uri = uri.replace('ws:', 'wss:')
var websocket = new websocket_type(uri);
var fig = new mpl.figure(fig_id, websocket, mpl_ondownload, figure_div);

fig.focus_on_mouseover = true;
Expand Down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@
ready(
function () {
var websocket_type = mpl.get_websocket_type();
var websocket = new websocket_type(
"{{ ws_uri }}" + {{ str(fig_id) }} + "/ws");
var uri = "{{ ws_uri }}" + {{ str(fig_id) }} + "/ws";
if (window.location.protocol === 'https:') uri = uri.replace('ws:', 'wss:')
var websocket = new websocket_type(uri);
var fig = new mpl.figure(
{{ str(fig_id) }}, websocket, mpl_ondownload,
document.getElementById("figure"));
Expand Down

Back | FazBrowse Home | New Git URL