Skip to content

Commit

Permalink
Format schedule-parser.
Browse files Browse the repository at this point in the history
  • Loading branch information
sidpagariya committed Aug 24, 2018
1 parent 6448d1e commit 980b95b
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions Schedule-maker/schedule-parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU
END:DAYLIGHT
END:VTIMEZONE
`;

function createICal(jsonObj){
console.log(jsonObj);
window.json = jsonObj;
Expand Down Expand Up @@ -147,13 +146,12 @@ function createICal(jsonObj){
console.log(download_str_uri);
downloadURI(download_str_uri, jsonObj['term']+'.ics');
}

function downloadURI(uri, name) {
var link = document.createElement("a");
link.download = name;
link.href = uri;
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
delete link;
var link = document.createElement("a");
link.download = name;
link.href = uri;
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
delete link;
}

0 comments on commit 980b95b

Please sign in to comment.