Commit 573e5416 authored by Romain Casati's avatar Romain Casati
Browse files

Better use of JS URL parser.

parent 8cf59830
......@@ -3142,8 +3142,8 @@ pas fonctionner avec certains navigateurs.
*/
Notebook.prototype.loadFromQS = function (key="ipynb") {
const url = new URL(window.location.href);
var ipynb = url.searchParams.get(key);
if( ipynb ) {
if( url.searchParams.has(key) ) {
var ipynb = url.searchParams.get(key);
ipynb = decodeURIComponent(ipynb);
this.load(JSON.parse(ipynb));
return ipynb;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment