Skip to content

Commit

Permalink
ok
Browse files Browse the repository at this point in the history
  • Loading branch information
jcponce committed Feb 26, 2024
1 parent d7aa146 commit 0116b93
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 18 deletions.
4 changes: 3 additions & 1 deletion 3d-plotter/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,11 @@
</div>

<br/>
<div>
<!--
<div>
<input type="button" id="createLink" value="Create Link"><br>
</div>
-->

<hr style="border: 1px solid rgb(78, 78, 78);" />

Expand Down
20 changes: 3 additions & 17 deletions 3d-plotter/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,7 @@ function initEquation() {
}
});

$("#createLink").click(function () {
var search = "?equation=" + encodeURIComponent(graph.currEquation);
var url = location.href.split("?")[0] + search;

prompt("Use this URL to shere or save the current equation.", url);
});

function update() {
const equation = equationInput.val();
Expand Down Expand Up @@ -588,21 +583,12 @@ 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);
}
});
var hash = decodeURIComponent(location.hash.substring(1)); //"substr" is deprecated
if (hash.length > 1) $("#equations").val(hash);
}


$(window).resize(onResize);

window.onerror = function (message, src, line, col, err) {
Expand Down

0 comments on commit 0116b93

Please sign in to comment.