PluginProbe ʕ •ᴥ•ʔ
Independent Analytics – WordPress Analytics Plugin / 1.15
Independent Analytics – WordPress Analytics Plugin v1.15
2.15.5 2.15.4 2.15.3 2.15.2 2.15.1 2.15.0 2.14.10 trunk 1.1 1.10 1.10.1 1.11 1.12 1.13 1.14 1.15 1.16 1.17 1.17.1 1.17.2 1.17.3 1.17.4 1.18 1.18.1 1.19.0 1.19.1 1.2 1.20.0 1.21.0 1.22.0 1.22.1 1.23.0 1.23.1 1.24.0 1.24.1 1.25.0 1.25.1 1.26.0 1.27.0 1.28.0 1.28.1 1.28.2 1.28.3 1.29.0 1.3 1.30.0 1.30.1 1.4 1.5 1.6 1.7 1.8 1.9 2.0.0 2.0.1 2.1.4 2.1.5 2.1.6 2.10.0 2.10.1 2.10.2 2.10.3 2.10.4 2.11.0 2.11.1 2.11.10 2.11.2 2.11.3 2.11.4 2.11.5 2.11.6 2.11.7 2.11.8 2.11.9 2.12.0 2.12.1 2.12.2 2.13.1 2.13.2 2.13.5 2.13.6 2.14.0 2.14.1 2.14.2 2.14.4 2.14.6 2.14.7 2.14.8 2.14.9 2.2.0 2.2.1 2.3.1 2.3.2 2.4.2 2.4.3 2.5.0 2.5.1 2.6.0 2.6.1 2.6.2 2.6.3 2.6.4 2.7.0 2.7.1 2.7.2 2.7.3 2.8.2 2.8.3 2.8.4 2.8.5 2.8.6 2.8.7 2.8.8 2.8.9 2.9.2 2.9.3 2.9.4 2.9.5 2.9.6 2.9.7
independent-analytics / dist / js / settings.js
independent-analytics / dist / js Last commit date
dashboard_widget.js 3 years ago dashboard_widget.js.map 3 years ago data-table.js 3 years ago data-table.js.map 3 years ago index.js 3 years ago index.js.map 3 years ago learn.js 3 years ago learn.js.map 3 years ago settings.js 3 years ago settings.js.map 3 years ago
settings.js
384 lines
1 // modules are defined as an array
2 // [ module function, map of requires ]
3 //
4 // map of requires is short require name -> numeric require
5 //
6 // anything defined in a previous bundle is accessed via the
7 // orig method which is the require for previous bundles
8
9 (function (modules, entry, mainEntry, parcelRequireName, globalName) {
10 /* eslint-disable no-undef */
11 var globalObject =
12 typeof globalThis !== 'undefined'
13 ? globalThis
14 : typeof self !== 'undefined'
15 ? self
16 : typeof window !== 'undefined'
17 ? window
18 : typeof global !== 'undefined'
19 ? global
20 : {};
21 /* eslint-enable no-undef */
22
23 // Save the require from previous bundle to this closure if any
24 var previousRequire =
25 typeof globalObject[parcelRequireName] === 'function' &&
26 globalObject[parcelRequireName];
27
28 var cache = previousRequire.cache || {};
29 // Do not use `require` to prevent Webpack from trying to bundle this call
30 var nodeRequire =
31 typeof module !== 'undefined' &&
32 typeof module.require === 'function' &&
33 module.require.bind(module);
34
35 function newRequire(name, jumped) {
36 if (!cache[name]) {
37 if (!modules[name]) {
38 // if we cannot find the module within our internal map or
39 // cache jump to the current global require ie. the last bundle
40 // that was added to the page.
41 var currentRequire =
42 typeof globalObject[parcelRequireName] === 'function' &&
43 globalObject[parcelRequireName];
44 if (!jumped && currentRequire) {
45 return currentRequire(name, true);
46 }
47
48 // If there are other bundles on this page the require from the
49 // previous one is saved to 'previousRequire'. Repeat this as
50 // many times as there are bundles until the module is found or
51 // we exhaust the require chain.
52 if (previousRequire) {
53 return previousRequire(name, true);
54 }
55
56 // Try the node require function if it exists.
57 if (nodeRequire && typeof name === 'string') {
58 return nodeRequire(name);
59 }
60
61 var err = new Error("Cannot find module '" + name + "'");
62 err.code = 'MODULE_NOT_FOUND';
63 throw err;
64 }
65
66 localRequire.resolve = resolve;
67 localRequire.cache = {};
68
69 var module = (cache[name] = new newRequire.Module(name));
70
71 modules[name][0].call(
72 module.exports,
73 localRequire,
74 module,
75 module.exports,
76 this
77 );
78 }
79
80 return cache[name].exports;
81
82 function localRequire(x) {
83 var res = localRequire.resolve(x);
84 return res === false ? {} : newRequire(res);
85 }
86
87 function resolve(x) {
88 var id = modules[name][1][x];
89 return id != null ? id : x;
90 }
91 }
92
93 function Module(moduleName) {
94 this.id = moduleName;
95 this.bundle = newRequire;
96 this.exports = {};
97 }
98
99 newRequire.isParcelRequire = true;
100 newRequire.Module = Module;
101 newRequire.modules = modules;
102 newRequire.cache = cache;
103 newRequire.parent = previousRequire;
104 newRequire.register = function (id, exports) {
105 modules[id] = [
106 function (require, module) {
107 module.exports = exports;
108 },
109 {},
110 ];
111 };
112
113 Object.defineProperty(newRequire, 'root', {
114 get: function () {
115 return globalObject[parcelRequireName];
116 },
117 });
118
119 globalObject[parcelRequireName] = newRequire;
120
121 for (var i = 0; i < entry.length; i++) {
122 newRequire(entry[i]);
123 }
124
125 if (mainEntry) {
126 // Expose entry point to Node, AMD or browser globals
127 // Based on https://github.com/ForbesLindesay/umd/blob/master/template.js
128 var mainExports = newRequire(mainEntry);
129
130 // CommonJS
131 if (typeof exports === 'object' && typeof module !== 'undefined') {
132 module.exports = mainExports;
133
134 // RequireJS
135 } else if (typeof define === 'function' && define.amd) {
136 define(function () {
137 return mainExports;
138 });
139
140 // <script>
141 } else if (globalName) {
142 this[globalName] = mainExports;
143 }
144 }
145 })({"hc0kI":[function(require,module,exports) {
146 var _blockIps = require("./modules/block-ips");
147 var _userRoles = require("./modules/user-roles");
148 var _scrollToTop = require("./modules/scroll-to-top");
149 jQuery(function($) {
150 (0, _blockIps.BlockIPs).setup();
151 (0, _userRoles.UserRoles).setup();
152 (0, _scrollToTop.ScrollToTop).setup();
153 });
154 document.addEventListener("DOMContentLoaded", function() {
155 var download_csv = function download_csv(fileName, data) {
156 var blob = new Blob([
157 data
158 ], {
159 type: "text/csv"
160 });
161 var element = window.document.createElement("a");
162 element.href = window.URL.createObjectURL(blob);
163 element.download = fileName;
164 document.body.appendChild(element);
165 element.click();
166 document.body.removeChild(element);
167 };
168 document.getElementById("iawp-export-views").addEventListener("click", function(e) {
169 var button = e.target;
170 button.textContent = IAWP_AJAX.exporting_views_text;
171 button.setAttribute("disabled", "disabled");
172 var data = {
173 "action": "iawp_export_views",
174 "iawp_export_views_nonce": IAWP_AJAX.export_views_nonce
175 };
176 jQuery.post(ajaxurl, data, function(response) {
177 download_csv("exported-views.csv", response);
178 button.textContent = IAWP_AJAX.export_views_text;
179 button.removeAttribute("disabled");
180 });
181 });
182 document.getElementById("iawp-export-referrers").addEventListener("click", function(e) {
183 var button = e.target;
184 button.textContent = IAWP_AJAX.exporting_referrers_text;
185 button.setAttribute("disabled", "disabled");
186 var data = {
187 "action": "iawp_export_referrers",
188 "iawp_export_referrers_nonce": IAWP_AJAX.export_referrers_nonce
189 };
190 jQuery.post(ajaxurl, data, function(response) {
191 download_csv("exported-referrers.csv", response);
192 button.textContent = IAWP_AJAX.export_referrers_text;
193 button.removeAttribute("disabled");
194 });
195 });
196 document.getElementById("iawp-export-geo").addEventListener("click", function(e) {
197 var button = e.target;
198 button.textContent = IAWP_AJAX.exporting_geo_text;
199 button.setAttribute("disabled", "disabled");
200 var data = {
201 "action": "iawp_export_geo",
202 "iawp_export_geo_nonce": IAWP_AJAX.export_geo_nonce
203 };
204 jQuery.post(ajaxurl, data, function(response) {
205 download_csv("exported-geo.csv", response);
206 button.textContent = IAWP_AJAX.export_geo_text;
207 button.removeAttribute("disabled");
208 });
209 });
210 var campaignExportButton = document.getElementById("iawp-export-campaigns");
211 if (campaignExportButton) campaignExportButton.addEventListener("click", function(e) {
212 var button = e.target;
213 button.textContent = IAWP_AJAX.exporting_campaigns_text;
214 button.setAttribute("disabled", "disabled");
215 var data = {
216 "action": "iawp_export_campaigns",
217 "iawp_export_campaigns_nonce": IAWP_AJAX.export_campaigns_nonce
218 };
219 jQuery.post(ajaxurl, data, function(response) {
220 download_csv("exported-campaigns.csv", response);
221 button.textContent = IAWP_AJAX.export_campaigns_text;
222 button.removeAttribute("disabled");
223 });
224 });
225 });
226
227 },{"./modules/block-ips":"lWI1W","./modules/user-roles":"9tr1c","./modules/scroll-to-top":"2cmwX"}],"lWI1W":[function(require,module,exports) {
228 var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
229 parcelHelpers.defineInteropFlag(exports);
230 parcelHelpers.export(exports, "BlockIPs", function() {
231 return BlockIPs;
232 });
233 var $ = jQuery;
234 var BlockIPs = {
235 blueprint: "",
236 IPinput: "",
237 setup: function setup() {
238 this.blueprint = $("#ip-entry-blueprint .ip-entry");
239 this.IPinput = $("#new-ip");
240 var self = this;
241 $("#block-ip-button").on("click", function(e) {
242 e.preventDefault();
243 if ($("#new-ip").val() == "") {
244 $("#new-ip").addClass("error");
245 $("#block-ip-form").addClass("empty");
246 } else if (self.getCurrentIPs().includes($("#new-ip").val())) {
247 $("#new-ip").addClass("error");
248 $("#block-ip-form").addClass("exists");
249 } else self.addNewIP();
250 });
251 $(".remove-ip-button").on("click", function() {
252 self.removeIP($(this));
253 });
254 },
255 addNewIP: function addNewIP() {
256 var self = this;
257 this.IPinput.removeClass("error");
258 $("#block-ip-form").removeClass("empty exists");
259 var newEntry = this.blueprint.clone();
260 newEntry.find("input").val(this.IPinput.val());
261 $(".blocked-ips").append(newEntry);
262 newEntry.find(".remove-ip-button").on("click", function() {
263 self.removeIP($(this));
264 });
265 this.IPinput.val("");
266 this.resetIndexes();
267 $("#block-ip-form").addClass("unsaved");
268 },
269 resetIndexes: function resetIndexes() {
270 var count = 0;
271 $(".blocked-ips .ip-entry input").each(function() {
272 $(this).attr("name", "iawp_blocked_ips[" + count + "]");
273 $(this).attr("id", "iawp_blocked_ips[" + count + "]");
274 count++;
275 });
276 },
277 getCurrentIPs: function getCurrentIPs() {
278 var IPs = [];
279 $(".blocked-ips .ip-entry input").each(function() {
280 IPs.push($(this).val());
281 });
282 return IPs;
283 },
284 removeIP: function removeIP(button) {
285 button.parent().remove();
286 this.resetIndexes();
287 $("#block-ip-form").addClass("unsaved");
288 }
289 };
290
291 },{"@parcel/transformer-js/src/esmodule-helpers.js":"jIm8e"}],"jIm8e":[function(require,module,exports) {
292 exports.interopDefault = function(a) {
293 return a && a.__esModule ? a : {
294 default: a
295 };
296 };
297 exports.defineInteropFlag = function(a) {
298 Object.defineProperty(a, "__esModule", {
299 value: true
300 });
301 };
302 exports.exportAll = function(source, dest) {
303 Object.keys(source).forEach(function(key) {
304 if (key === "default" || key === "__esModule" || dest.hasOwnProperty(key)) return;
305 Object.defineProperty(dest, key, {
306 enumerable: true,
307 get: function get() {
308 return source[key];
309 }
310 });
311 });
312 return dest;
313 };
314 exports.export = function(dest, destName, get) {
315 Object.defineProperty(dest, destName, {
316 enumerable: true,
317 get: get
318 });
319 };
320
321 },{}],"9tr1c":[function(require,module,exports) {
322 var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
323 parcelHelpers.defineInteropFlag(exports);
324 parcelHelpers.export(exports, "UserRoles", function() {
325 return UserRoles;
326 });
327 var $ = jQuery;
328 var UserRoles = {
329 setup: function setup() {
330 var self = this;
331 $("#user-role-select").on("change", function() {
332 $(".role").removeClass("show");
333 $(".role-" + $(this).val()).addClass("show");
334 });
335 $("#capabilities-form").on("submit", function(e) {
336 e.preventDefault();
337 self.save();
338 });
339 },
340 save: function save() {
341 $("#save-permissions").addClass("saving");
342 var capabilities = {};
343 $(".role").each(function() {
344 var role = $(this).find("select").attr("name");
345 var val = $(this).find("select").val();
346 capabilities[role] = val;
347 });
348 capabilities = JSON.stringify(capabilities);
349 var whiteLabel = $("#iawp_white_label").prop("checked");
350 var data = {
351 "action": "iawp_capabilities",
352 "capabilities": capabilities,
353 "white_label": whiteLabel,
354 "iawp_capabilities_nonce": IAWP_AJAX.iawp_capabilities_nonce
355 };
356 jQuery.post(ajaxurl, data, function(response) {
357 $("#save-permissions").removeClass("saving");
358 });
359 }
360 };
361
362 },{"@parcel/transformer-js/src/esmodule-helpers.js":"jIm8e"}],"2cmwX":[function(require,module,exports) {
363 var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
364 parcelHelpers.defineInteropFlag(exports);
365 parcelHelpers.export(exports, "ScrollToTop", function() {
366 return ScrollToTop;
367 });
368 var $ = jQuery;
369 var ScrollToTop = {
370 setup: function setup() {
371 $("#scroll-to-top").on("click", function() {
372 window.scrollTo({
373 top: 0,
374 behavior: "smooth"
375 });
376 $(this).blur();
377 });
378 }
379 };
380
381 },{"@parcel/transformer-js/src/esmodule-helpers.js":"jIm8e"}]},["hc0kI"], "hc0kI", "parcelRequirec571")
382
383 //# sourceMappingURL=settings.js.map
384