PageSourceSearch

https://electriccityroasting.com/wp-content/plugins/progressive-wp…/scripts/ui-installprompt.js?ver=2.1.13

js electriccityroasting.com collected 2026-09-26 12:09:38 UTC 3,777 bytes, 127 lines download raw bytes

1/******/ (function(modules) { // webpackBootstrap
2/******/ 	// The module cache
3/******/ 	var installedModules = {};
4/******/
5/******/ 	// The require function
6/******/ 	function __webpack_require__(moduleId) {
7/******/
8/******/ 		// Check if module is in cache
9/******/ 		if(installedModules[moduleId]) {
10/******/ 			return installedModules[moduleId].exports;
11/******/ 		}
12/******/ 		// Create a new module (and put it into the cache)
13/******/ 		var module = installedModules[moduleId] = {
14/******/ 			i: moduleId,
15/******/ 			l: false,
16/******/ 			exports: {}
17/******/ 		};
18/******/
19/******/ 		// Execute the module function
20/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21/******/
22/******/ 		// Flag the module as loaded
23/******/ 		module.l = true;
24/******/
25/******/ 		// Return the exports of the module
26/******/ 		return module.exports;
27/******/ 	}
28/******/
29/******/
30/******/ 	// expose the modules object (__webpack_modules__)
31/******/ 	__webpack_require__.m = modules;
32/******/
33/******/ 	// expose the module cache
34/******/ 	__webpack_require__.c = installedModules;
35/******/
36/******/ 	// define getter function for harmony exports
37/******/ 	__webpack_require__.d = function(exports, name, getter) {
38/******/ 		if(!__webpack_require__.o(exports, name)) {
39/******/ 			Object.defineProperty(exports, name, {
40/******/ 				configurable: false,
41/******/ 				enumerable: true,
42/******/ 				get: getter
43/******/ 			});
44/******/ 		}
45/******/ 	};
46/******/
47/******/ 	// getDefaultExport function for compatibility with non-harmony modules
48/******/ 	__webpack_require__.n = function(module) {
49/******/ 		var getter = module && module.__esModule ?
50/******/ 			function getDefault() { return module['default']; } :
51/******/ 			function getModuleExports() { return module; };
52/******/ 		__webpack_require__.d(getter, 'a', getter);
53/******/ 		return getter;
54/******/ 	};
55/******/
56/******/ 	// Object.prototype.hasOwnProperty.call
57/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
58/******/
59/******/ 	// __webpack_public_path__
60/******/ 	__webpack_require__.p = "";
61/******/
62/******/ 	// Load entry module and return exports
63/******/ 	return __webpack_require__(__webpack_require__.s = 0);
64/******/ })
65/************************************************************************/
66/******/ ([
67/* 0 */
68/***/ (function(module, exports, __webpack_require__) {
69
70"use strict";
71
72
73(function (plugin) {
74
75	var installPromptEvent = void 0;
76
77	if (plugin.installprompt.mode === 'normal') {
78		return;
79	}
80
81	window.addEventListener('beforeinstallprompt', function (event) {
82
83		// Prevent Chrome <= 67 from automatically showing the prompt
84		event.preventDefault();
85		installPromptEvent = event;
86
87		if (plugin.installprompt.mode === 'trigger') {
88			(function () {
89
90				/**
91     * Installable on click
92     */
93
94				var $elements = document.querySelectorAll(plugin.installprompt.onclick);
95				var i = void 0,
96				    ii = void 0;
97
98				for (i = 0; i < $elements.length; ++i) {
99					$elements[i].classList.add('installable-active');
100					$elements[i].onclick = function () {
101						if (this.classList.contains('installable-active')) {
102							installPromptEvent.prompt();
103							installPromptEvent.userChoice.then(function (choice) {
104								if (choice.outcome === 'accepted') {
105									// User accepted the A2HS prompt
106								} else {
107										// User dismissed the A2HS prompt
108									}
109
110								for (ii = 0; ii < $elements.length; ++ii) {
111									$elements[ii].classList.remove('installable-active');
112								}
113
114								installPromptEvent = null;
115							});
116						}
117					};
118				}
119			})();
120		} else {
121			installPromptEvent.prompt();
122		}
123	});
124})(PwpJsVars);
125
126/***/ })
127/******/ ]);

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.