Skip to content

Commit

Permalink
Delete Old Cookies button, remove alert setLatLong,,
Browse files Browse the repository at this point in the history
  • Loading branch information
SanjayPrabhakaran committed Jan 8, 2024
1 parent 919f629 commit 43c33aa
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
5 changes: 1 addition & 4 deletions SJPv6/www/SJP.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
<tr>
<td>
<button onclick="getLocation()">Use Current Position</button>
<button onClick="deleteAllCookies()">Delete Old Location Cookies</button>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -116,7 +117,6 @@
</a> <b><br>
<br><em>WAIT PAGE LOADING.....</em></b>
<script type="text/javascript" src= "sjp.js"></script>
//Start of paste from Ephemeris
<script type='text/javascript' src='ephemeris/index.js' charset='utf-8'></script>
<script type='text/javascript' src='ephemeris/common.js' charset='utf-8'></script>
<script type='text/javascript' src='ephemeris/load.js' charset='utf-8'></script>
Expand Down Expand Up @@ -164,9 +164,6 @@

<script type='text/javascript' src='ephemeris/shortcut.js' charset='utf-8'></script>

//End paste of Ephemeris


<script>
{ initSJP();}
</script>
Expand Down
12 changes: 11 additions & 1 deletion SJPv6/www/sjp.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,16 @@ function download(data, filename, type) {
}, 0);
}
}
function deleteAllCookies() {
const cookies = document.cookie.split(";");

for (let i = 0; i < cookies.length; i++) {
const cookie = cookies[i];
const eqPos = cookie.indexOf("=");
const name = eqPos > -1 ? cookie.substr(0, eqPos) : cookie;
document.cookie = name + "=;expires=Thu, 01 Jan 1970 00:00:00 GMT";
}
}

function getJHDStringEsc( parray){
//Create JHD file as below
Expand Down Expand Up @@ -1337,7 +1347,7 @@ function setLatLong(){
k = k[1].split(/;/);
document.getElementById("longitude").value=k[0];
document.getElementById("latitude").value=k[1];
alert("setLatLong");
//alert("setLatLong");
}
function populatePlacesList(p){
amp = new RegExp(/&/);
Expand Down

0 comments on commit 43c33aa

Please sign in to comment.