Domain: amberpublishers.in
Server Adress: 86.38.243.169

privdayz.com

/home/u866425823/domains/consolelog.tech/public_html/assets/frontend/js/
Dosya Yükle :
Current File : //home/u866425823/domains/consolelog.tech/public_html/assets/frontend/js/custom.js


let deferredPrompt;

window.addEventListener('beforeinstallprompt', (e) => {
    $('.install-btn').show();
    deferredPrompt = e;
});



const installApp = document.getElementById('installApp');

installApp.addEventListener('click', async () => {
    if (deferredPrompt !== null) {
        deferredPrompt.prompt();
        const { outcome } = await deferredPrompt.userChoice;
        if (outcome === 'accepted') {
            deferredPrompt = null;
        }
    }
});


function down_search(form_id, data_box, route, event) {
    event.preventDefault();

    $("#" + data_box).html(`<img src="assets/frontend/loading.svg" >`)

    let form = document.getElementById(form_id);
    let formData = new FormData(form);
    $.ajax({
        type: "post",
        url: route,
        data: formData,
        contentType: false,
        processData: false,
        success: function (response) {
            if (response['status'] === true) {
                $("#" + data_box).html(`<img src="assets/frontend/loading.svg" >`)
                $("#" + data_box).html(`${response['data']}`);
            } else {
                $("#" + data_box).html(`<div class="alert alert-danger" role="alert">Video not found. Please check video code. </div> `)
            }
        }
    });
}


$.each($('.blog-short-des'), function () {
    let text = $(this).text();
    if (text.length > 150) {
        let cut_text = text.substr(0, 150);
        $(this).text(`${cut_text}....`)
    }
});

$(".lightBox").click(function () {
    $("#full-image").attr("src", $(this).attr("src"));
    $('#profile-image-viewer').show();
});

$("#profile-image-viewer .profile-close").click(function () {
    $('#profile-image-viewer').hide();
});

coded by Privdayz.com - Visit https://privdayz.com/ for more php shells.