PageSourceSearch

https://moneybar.in/assets/frontend/js/install-app.js

js moneybar.in collected 2026-10-02 01:56:26 UTC 1,596 bytes, 46 lines download raw bytes

1//<--------- Start Payment -------//>
2const tInstall = async () => {
3    console.log('Ok', 'butInstall-clicked');
4     $('#modal_pwa').modal('hide');
5    const promptEvent = window.deferredPrompt;
6    if (!promptEvent) {
7        // The deferred prompt isn't available.
8        return;
9    }
10    // Show the install prompt.
11    promptEvent.prompt();
12    // Log the result
13    const result = await promptEvent.userChoice;
14    console.log('Ok', 'userChoice', result);
15    // Reset the deferred prompt variable, since
16    // prompt() can only be called once.
17    window.deferredPrompt = null;
18    // Hide the install button.
19    divInstall.classList.toggle('display-none', true);
20   
21}
22(function ($) {
23    "use strict";
24
25    const divInstall = document.getElementById('installContainer');
26    const butInstall = document.getElementById('butInstall');
27
28    window.addEventListener('beforeinstallprompt', (event) => {
29        // Prevent the mini-infobar from appearing on mobile.
30        event.preventDefault();
31        //console.log('Ok', 'beforeinstallprompt', event);
32        // Stash the event so it can be triggered later.
33        window.deferredPrompt = event;
34        // Remove the 'display-none' class from the install button container.
35        //divInstall.classList.toggle('display-none', false);
36    });
37
38    butInstall.addEventListener('click', tInstall);
39
40    window.addEventListener('appinstalled', (event) => {
41        console.log('Ok', 'appinstalled', event);
42        // Clear the deferredPrompt so it can be garbage collected
43        window.deferredPrompt = null;
44    });
45
46})(jQuery);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.