PluginProbe ʕ •ᴥ•ʔ
Independent Analytics – WordPress Analytics Plugin / 1.14
Independent Analytics – WordPress Analytics Plugin v1.14
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
381 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 document.getElementById("iawp-export-campaigns").addEventListener("click", function(e) {
211 var button = e.target;
212 button.textContent = IAWP_AJAX.exporting_campaigns_text;
213 button.setAttribute("disabled", "disabled");
214 var data = {
215 "action": "iawp_export_campaigns",
216 "iawp_export_campaigns_nonce": IAWP_AJAX.export_campaigns_nonce
217 };
218 jQuery.post(ajaxurl, data, function(response) {
219 download_csv("exported-campaigns.csv", response);
220 button.textContent = IAWP_AJAX.export_campaigns_text;
221 button.removeAttribute("disabled");
222 });
223 });
224 });
225
226 },{"./modules/block-ips":"lWI1W","./modules/user-roles":"9tr1c","./modules/scroll-to-top":"2cmwX"}],"lWI1W":[function(require,module,exports) {
227 var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
228 parcelHelpers.defineInteropFlag(exports);
229 parcelHelpers.export(exports, "BlockIPs", function() {
230 return BlockIPs;
231 });
232 var $ = jQuery;
233 var BlockIPs = {
234 blueprint: "",
235 IPinput: "",
236 setup: function setup() {
237 this.blueprint = $("#ip-entry-blueprint .ip-entry");
238 this.IPinput = $("#new-ip");
239 var self = this;
240 $("#block-ip-button").on("click", function(e) {
241 e.preventDefault();
242 if ($("#new-ip").val() == "") {
243 $("#new-ip").addClass("error");
244 $("#block-ip-form").addClass("empty");
245 } else if (self.getCurrentIPs().includes($("#new-ip").val())) {
246 $("#new-ip").addClass("error");
247 $("#block-ip-form").addClass("exists");
248 } else self.addNewIP();
249 });
250 $(".remove-ip-button").on("click", function() {
251 self.removeIP($(this));
252 });
253 },
254 addNewIP: function addNewIP() {
255 var self = this;
256 this.IPinput.removeClass("error");
257 $("#block-ip-form").removeClass("empty exists");
258 var newEntry = this.blueprint.clone();
259 newEntry.find("input").val(this.IPinput.val());
260 $(".blocked-ips").append(newEntry);
261 newEntry.find(".remove-ip-button").on("click", function() {
262 self.removeIP($(this));
263 });
264 this.IPinput.val("");
265 this.resetIndexes();
266 $("#block-ip-form").addClass("unsaved");
267 },
268 resetIndexes: function resetIndexes() {
269 var count = 0;
270 $(".blocked-ips .ip-entry input").each(function() {
271 $(this).attr("name", "iawp_blocked_ips[" + count + "]");
272 $(this).attr("id", "iawp_blocked_ips[" + count + "]");
273 count++;
274 });
275 },
276 getCurrentIPs: function getCurrentIPs() {
277 var IPs = [];
278 $(".blocked-ips .ip-entry input").each(function() {
279 IPs.push($(this).val());
280 });
281 return IPs;
282 },
283 removeIP: function removeIP(button) {
284 button.parent().remove();
285 this.resetIndexes();
286 $("#block-ip-form").addClass("unsaved");
287 }
288 };
289
290 },{"@parcel/transformer-js/src/esmodule-helpers.js":"jIm8e"}],"jIm8e":[function(require,module,exports) {
291 exports.interopDefault = function(a) {
292 return a && a.__esModule ? a : {
293 default: a
294 };
295 };
296 exports.defineInteropFlag = function(a) {
297 Object.defineProperty(a, "__esModule", {
298 value: true
299 });
300 };
301 exports.exportAll = function(source, dest) {
302 Object.keys(source).forEach(function(key) {
303 if (key === "default" || key === "__esModule" || dest.hasOwnProperty(key)) return;
304 Object.defineProperty(dest, key, {
305 enumerable: true,
306 get: function get() {
307 return source[key];
308 }
309 });
310 });
311 return dest;
312 };
313 exports.export = function(dest, destName, get) {
314 Object.defineProperty(dest, destName, {
315 enumerable: true,
316 get: get
317 });
318 };
319
320 },{}],"9tr1c":[function(require,module,exports) {
321 var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
322 parcelHelpers.defineInteropFlag(exports);
323 parcelHelpers.export(exports, "UserRoles", function() {
324 return UserRoles;
325 });
326 var $ = jQuery;
327 var UserRoles = {
328 setup: function setup() {
329 var self = this;
330 $("#user-role-select").on("change", function() {
331 $(".role").removeClass("show");
332 $(".role-" + $(this).val()).addClass("show");
333 });
334 $("#capabilities-form").on("submit", function(e) {
335 e.preventDefault();
336 self.save();
337 });
338 },
339 save: function save() {
340 $("#save-permissions").addClass("saving");
341 var capabilities = {};
342 $(".role").each(function() {
343 var role = $(this).find("select").attr("name");
344 var val = $(this).find("select").val();
345 capabilities[role] = val;
346 });
347 capabilities = JSON.stringify(capabilities);
348 var data = {
349 "action": "iawp_capabilities",
350 "capabilities": capabilities,
351 "iawp_capabilities_nonce": IAWP_AJAX.iawp_capabilities_nonce
352 };
353 jQuery.post(ajaxurl, data, function(response) {
354 $("#save-permissions").removeClass("saving");
355 });
356 }
357 };
358
359 },{"@parcel/transformer-js/src/esmodule-helpers.js":"jIm8e"}],"2cmwX":[function(require,module,exports) {
360 var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
361 parcelHelpers.defineInteropFlag(exports);
362 parcelHelpers.export(exports, "ScrollToTop", function() {
363 return ScrollToTop;
364 });
365 var $ = jQuery;
366 var ScrollToTop = {
367 setup: function setup() {
368 $("#scroll-to-top").on("click", function() {
369 window.scrollTo({
370 top: 0,
371 behavior: "smooth"
372 });
373 $(this).blur();
374 });
375 }
376 };
377
378 },{"@parcel/transformer-js/src/esmodule-helpers.js":"jIm8e"}]},["hc0kI"], "hc0kI", "parcelRequirec571")
379
380 //# sourceMappingURL=settings.js.map
381