Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions plotly/plotly_offline_aux/plotlyoffline.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,15 @@

% check that the bundle exists
try
bundle = fileread(bundleFile);
% ----- js CDN url -----
jsChina = 'https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/plotly.js/1.58.5/plotly.min.js';
jsGlobal = 'https://cdn.jsdelivr.net/npm/[email protected]/dist/plotly.min.js';
% template dependencies
depScript = sprintf('<script type="text/javascript">%s</script>\n', ...
bundle);
depScript = sprintf(['<!-- # fix CJK garbled character -->\n<meta http-equiv="Content-Type" content="text/html; charset=utf-8">\n', ...
'<!-- # offline js -->\n<script src="%s"></script>\n', ...
'<!-- # online js china -->\n<script src="%s"></script>\n', ...
'<!-- # online js global -->\n<script src="%s"></script>\n'], ...
bundleFile, jsChina, jsGlobal);
catch
error(['Error reading: %s.\nPlease download the required ', ...
'dependencies using: >>getplotlyoffline \n', ...
Expand Down