PageSourceSearch

https://pridecup.org.au/wp-content/themes/pridecup/dist/js/jquery-share.js?ver=1788228293

js pridecup.org.au collected 2026-09-24 19:06:55 UTC 9,741 bytes, 255 lines download raw bytes

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})({"Twh6F":[function(require,module,exports) {
146(function($) {
147    "use strict";
148    $.fn.share = function(options) {
149        var defaults = {
150            threshold: 0,
151            abbreviate: true,
152            counts: true
153        };
154        var $this = this, settings = $.extend(defaults, options);
155        var init = function($element) {
156            var options = {
157                url: typeof $element.data("url") !== "undefined" ? $element.data("url") : document.URL,
158                message: typeof $element.data("message") !== "undefined" ? $element.data("message") : false,
159                via: typeof $element.data("via") !== "undefined" ? $element.data("via") : false,
160                popup: typeof $element.data("popup") !== "undefined" ? $element.data("popup") : true,
161                count: typeof $element.data("count") !== "undefined" ? $element.data("count") : settings.counts,
162                network: typeof $element.data("share") !== "undefined" ? $element.data("share") : "facebook"
163            };
164            if (options.count) var $count = $('<span class="js-share-count"/>');
165            $element.addClass("js-share");
166            switch(options.network){
167                case "facebook":
168                    var params = {
169                        u: options.url
170                    };
171                    var url = "https://www.facebook.com/sharer/sharer.php?" + parameters(params);
172                    $element.addClass("js-share-facebook").attr("href", url);
173                    if (options.count) $.getJSON("https://graph.facebook.com/" + options.url, function(data) {
174                        if (data.shares > settings.threshold) $count.text(abbreviate(data.shares)).removeClass("js-share-count-loading").appendTo($element);
175                    });
176                    break;
177                case "twitter":
178                    var params = {
179                        via: options.via ? options.via : "",
180                        text: options.message ? options.message : "",
181                        url: options.url
182                    };
183                    var url = "https://twitter.com/intent/tweet?" + parameters(params);
184                    $element.addClass("js-share-twitter").attr("href", url);
185                    if (options.count) $.getJSON("http://urls.api.twitter.com/1/urls/count.json?url=" + options.url + "&callback=?", function(data) {
186                        if (data.count > settings.threshold) $count.text(abbreviate(data.count)).removeClass("js-share-count-loading").appendTo($element);
187                    });
188                    break;
189                case "whatsapp":
190                    var params = {
191                        via: options.via ? options.via : "",
192                        text: options.message ? options.message + " " + options.url : options.url,
193                        url: options.url
194                    };
195                    var url = "https://api.whatsapp.com/send?" + parameters(params);
196                    $element.addClass("js-share-whatsapp").attr("href", url);
197                    break;
198                case "email":
199                    var params = {
200                        body: options.message ? options.message + " " + options.url : options.url
201                    };
202                    var url = "mailto:?" + parameters(params);
203                    $element.addClass("js-share-email").attr("href", url);
204                    break;
205                case "print":
206                    var url = "javascript:window.print()";
207                    options.popup = false;
208                    $element.addClass("js-share-print").attr("href", url);
209                    break;
210            }
211            if (options.popup) {
212                $element.attr({
213                    rel: "external",
214                    target: "_blank"
215                });
216                $element.click(function(e) {
217                    e.preventDefault();
218                    open($(this).attr("href"));
219                });
220            }
221        };
222        var abbreviate = function(number) {
223            if (!settings.abbreviate) return number;
224            number = number.toString();
225            if (number.length > 6) return number.substr(0, 1) + "." + number.substr(1, 1) + "m";
226            else if (number.length > 5) return number.substr(0, 3) + "k";
227            else if (number.length > 5) return number.substr(0, 3) + "k";
228            else if (number.length > 4) return number.substr(0, 2) + "k";
229            else if (number.length > 3) return number.substr(0, 1) + "." + number.substr(1, 1) + "k";
230            else return number;
231        };
232        var open = function(url, w, h) {
233            var w = typeof w !== "undefined" ? w : 600, h = typeof h !== "undefined" ? h : 300, left = screen.width / 2 - w / 2, top = screen.height / 2 - h / 2;
234            window.open(url, "MsgWindow", "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=" + w + ", height=" + h + ", top=" + top + ", left=" + left);
235        };
236        var parameters = function(obj) {
237            if (!Object.keys) Object.keys = function(obj) {
238                var keys = [];
239                for(var i in obj)if (obj.hasOwnProperty(i)) keys.push(i);
240                return keys;
241            };
242            return $.map(Object.keys(obj), function(key) {
243                if (!obj[key]) return "";
244                return encodeURIComponent(key) + "=" + encodeURIComponent(obj[key]);
245            }).join("&");
246        };
247        return this.each(function() {
248            init($(this));
249        });
250    };
251})(jQuery);
252
253},{}]},["Twh6F"], "Twh6F", "parcelRequire2030")
254
255//# sourceMappingURL=jquery-share.js.map

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.