• 22-05-2022, 18:03:16
    #1
    Selamlar,

    Udemy'nin neden böyle bir veriyi paylaşmadığını merak edip biraz araştırma yaptım. Aşağıdaki kod bloğu ile devam ettiğiniz herhangi bir kursun bitmesine ne kadar zaman kaldığını hesaplayabilirsiniz.

    Tek yapmanız gereken tarayıcıdaki Developer konsolunu (Genelde F12) açıp oraya yapıştırmak ve enter'a basmak olacak.

    Örnek: https://prnt.sc/vWHJSigldMlo


    function OpenSections() {
    console.log('Opening Sections...');
    var index = 0;
    var sectionPush = document.querySelectorAll('.js-panel-toggler')
    var sectionHidden = document.querySelectorAll('.panel--content-wrapper--1g5eE')
    sectionHidden.forEach((item) => {
    const hidden = item.getAttribute('aria-hidden');
    if (hidden == "true") {
    sectionPush[index].click();
    }
    index++
    })
    console.log('Opening Sections DONE');
    }
    
    function GetToalMins() {
    let total = 0;
    const items = document.querySelectorAll('.item-link.udlite-custom-focus-visible')
    items.forEach((item) => {
    
    const isChecked = item.querySelector('.udlite-real-toggle-input').checked;
    if (!isChecked) {
    let timer = item.querySelector('.udlite-text-xs span');
    if (timer) {
    time = timer.innerText.replace('min', '');
    total+= parseInt(time);
    }
    }
    })
    return total
    }
    
    function ConvertMins(total) {
    console.log('Calculation Total DONE')
    console.log("Total: " + total + "mins")
    var minsToHours = 60
    var minsToDays = (minsToHours * 24)
    var days = parseInt(total/minsToDays)
    total -= (days*minsToDays)
    var hours = parseInt(total/minsToHours)
    total -= (hours*minsToHours)
    var mints = total
    console.log(days + " day, " + hours + " hours, " + mints + " mins");
    }
    
    function getLeftTime() {
    OpenSections();
    var total = GetToalMins();
    ConvertMins(total);
    }
    
    getLeftTime();
  • 22-05-2022, 18:08:28
    #2
    maliyassi adlı üyeden alıntı: mesajı görüntüle
    Selamlar,

    Udemy'nin neden böyle bir veriyi paylaşmadığını merak edip biraz araştırma yaptım. Aşağıdaki kod bloğu ile devam ettiğiniz herhangi bir kursun bitmesine ne kadar zaman kaldığını hesaplayabilirsiniz.

    Tek yapmanız gereken tarayıcıdaki Developer konsolunu (Genelde F12) açıp oraya yapıştırmak ve enter'a basmak olacak.

    Örnek: https://prnt.sc/vWHJSigldMlo


    function OpenSections() {
    console.log('Opening Sections...');
    var index = 0;
    var sectionPush = document.querySelectorAll('.js-panel-toggler')
    var sectionHidden = document.querySelectorAll('.panel--content-wrapper--1g5eE')
    sectionHidden.forEach((item) => {
    const hidden = item.getAttribute('aria-hidden');
    if (hidden == "true") {
    sectionPush[index].click();
    }
    index++
    })
    console.log('Opening Sections DONE');
    }
    
    function GetToalMins() {
    let total = 0;
    const items = document.querySelectorAll('.item-link.udlite-custom-focus-visible')
    items.forEach((item) => {
    
    const isChecked = item.querySelector('.udlite-real-toggle-input').checked;
    if (!isChecked) {
    let timer = item.querySelector('.udlite-text-xs span');
    if (timer) {
    time = timer.innerText.replace('min', '');
    total+= parseInt(time);
    }
    }
    })
    return total
    }
    
    function ConvertMins(total) {
    console.log('Calculation Total DONE')
    console.log("Total: " + total + "mins")
    var minsToHours = 60
    var minsToDays = (minsToHours * 24)
    var days = parseInt(total/minsToDays)
    total -= (days*minsToDays)
    var hours = parseInt(total/minsToHours)
    total -= (hours*minsToHours)
    var mints = total
    console.log(days + " day, " + hours + " hours, " + mints + " mins");
    }
    
    function getLeftTime() {
    OpenSections();
    var total = GetToalMins();
    ConvertMins(total);
    }
    
    getLeftTime();
    Türkçe çevrilmiş hali
    function OpenSections() {
    console.log('Bolumler Aciliyor...');
    var index = 0;
    var sectionPush = document.querySelectorAll('.js-panel-toggler')
    var sectionHidden = document.querySelectorAll('.panel--content-wrapper--1g5eE')
    sectionHidden.forEach((item) => {
    const hidden = item.getAttribute('aria-hidden');
    if (hidden == "true") {
    sectionPush[index].click();
    }
    index++
    })
    console.log('Bolumler basariyla acildi');
    }
    
    function GetToalMins() {
    let total = 0;
    const items = document.querySelectorAll('.item-link.udlite-custom-focus-visible')
    items.forEach((item) => {
    
    const isChecked = item.querySelector('.udlite-real-toggle-input').checked;
    if (!isChecked) {
    let timer = item.querySelector('.udlite-text-xs span');
    if (timer) {
    time = timer.innerText.replace('min', '');
    total+= parseInt(time);
    }
    }
    })
    return total
    }
    
    function ConvertMins(total) {
    console.log('Toplam Hesaplamasi Tamamlandi')
    console.log("Toplamda: " + total + "dakika")
    var minsToHours = 60
    var minsToDays = (minsToHours * 24)
    var days = parseInt(total/minsToDays)
    total -= (days*minsToDays)
    var hours = parseInt(total/minsToHours)
    total -= (hours*minsToHours)
    var mints = total
    console.log(days + " gun, " + hours + " saat, " + mints + " dakika");
    }
    
    function getLeftTime() {
    OpenSections();
    var total = GetToalMins();
    ConvertMins(total);
    }
    
    getLeftTime();