function ExecuteScript(strId)
{
  switch (strId)
  {
      case "6MpIpygN5qG":
        Script1();
        break;
  }
}

function Script1()
{
  console.log("mark complete");
console.log(window.parent.location.href);
console.log(window.location.href);

const queryString = window.location.search;
const urlParams = new URLSearchParams(queryString);

const enrollment_id = urlParams.get('enrollment_id');
const lesson_id = urlParams.get('lesson_id');

const response =  fetch('https://api.konvoe.com/completecourse', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({ enrollment_id, lesson_id, is_completed:1 })
});

const result =  response.text();
}

