Skip to content

Commit

Permalink
Update main.js
Browse files Browse the repository at this point in the history
  • Loading branch information
jcponce committed Feb 26, 2024
1 parent 0116b93 commit 6552c1e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions 3d-plotter/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -583,11 +583,22 @@ function animate() {
requestAnimationFrame(animate);
};

/*
function readURLParms() {
var hash = decodeURIComponent(location.hash.substring(1)); //"substr" is deprecated
if (hash.length > 1) $("#equations").val(hash);
}
*/

function readURLParms() {
location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m, key, value) {
value = decodeURIComponent(value);
if (key == "equation") {
graph.currEquation = value;
$("#equations").val(value);
}
});
}

$(window).resize(onResize);

Expand Down

0 comments on commit 6552c1e

Please sign in to comment.