CARVIEW |
Select Language
HTTP/2 301
location: https://raw.githubusercontent.com/Ensighten/jqueryp/master/dist/jqueryp.require.js
accept-ranges: bytes
age: 0
date: Mon, 21 Jul 2025 15:56:18 GMT
via: 1.1 varnish
x-served-by: cache-bom4735-BOM
x-cache: MISS
x-cache-hits: 0
x-timer: S1753113377.381779,VS0,VE1025
vary: Accept-Encoding
x-fastly-request-id: 2747311b6ec25ad5546a46cf27e0362402030531
content-length: 0
HTTP/2 200
cache-control: max-age=300
content-security-policy: default-src 'none'; style-src 'unsafe-inline'; sandbox
content-type: text/plain; charset=utf-8
etag: W/"8ce6303698019e2217249a4a320477cdee15e513c60d5cdebbb305d3249f1063"
strict-transport-security: max-age=31536000
x-content-type-options: nosniff
x-frame-options: deny
x-xss-protection: 1; mode=block
x-github-request-id: 3778:343D52:11066:25BAB:687E6322
content-encoding: gzip
accept-ranges: bytes
date: Mon, 21 Jul 2025 15:56:18 GMT
via: 1.1 varnish
x-served-by: cache-bom4743-BOM
x-cache: MISS
x-cache-hits: 0
x-timer: S1753113378.479601,VS0,VE352
vary: Authorization,Accept-Encoding
access-control-allow-origin: *
cross-origin-resource-policy: cross-origin
x-fastly-request-id: a6aef9370eb2d87249bf05d4240ec08940f9d280
expires: Mon, 21 Jul 2025 16:01:18 GMT
source-age: 0
content-length: 1243
/*! jqueryp - v1.0.2 - 2012-12-07
* https://github.com/Ensighten/jqueryp
* Copyright (c) 2012 Ensighten; Licensed MIT */
define(['jquery'], function ($) {
/**
* Function to easily add new jQuery plugins via a constructor function
* @param {String} moduleName Name of the module
* @param {Function} module Constructor function to bind under $()[moduleName]
*/
$.exportModule = function (moduleName, module) {
// Namespace module name to prevent potential overwriting by jquery.data
var _moduleName = 'jqueryp_' + moduleName;
/**
* $.moduleName (e.g. $.swapper)
* @param {String|Boolean} [method] If true, the corresponding module will be returned. Otherwise, it is the method that will be called on the module.
* @param {Mixed} [params...] Parameters to pass through to the method
*/
$.fn[moduleName] = function (method/*, params... */) {
var args = [].slice.call(arguments, 1),
retVal = this;
// Go through the items
this.each(function (index) {
// Grab the item from the data layer
var $this = $(this),
item = $this.data(_moduleName);
// If it does not exist, create it
if (item === undefined) {
item = new module($this);
$this.data(_moduleName, item);
}
// If there is a method
if (method) {
// If the method is 'true'
if (method === true) {
// If this is the first item, return it as the retVal
if (index === 0) {
retVal = item;
}
} else {
// Otherwise, call the method
var methodFn = item[method];
// If there is no method fn, error out
if (methodFn === undefined) {
var console = window.console;
if (console && console.error) {
console.error(moduleName + '.' + method + ' not found!');
}
} else if (typeof methodFn !== 'function') {
// Otherwise, if the item is not a function
if (index === 0) {
retVal = methodFn;
}
} else {
var val = methodFn.apply(item, args);
if (index === 0 && val !== undefined) {
retVal = val;
}
}
}
}
});
// Return this or the retVal of the first item
return retVal;
};
};
return {
/**
* Plugin load function (paraphrased from https://requirejs.org/docs/plugins.html#apiload)
* @param {String} name Resources following ! (e.g 'world!three' in 'hello!world!three')
* @param {Function} req Require to use to load other modules
* @param {Function} load Callback to run with the completed item
* @param {Object} config Configuration object used by requirejs
*/
'load': function (name, req, load, config) {
// Fallback name
name = name || '';
// Break up the plugins by !
var plugins = name.split(/!/g);
// Require each of the plugins
req(plugins, function () {
// Callback with jQuery
load($);
});
},
'jquery': $
};
});