PageSourceSearch

https://www.roundhillfishkill.com/plugins/cropperjs/jquery-cropper.js

js roundhillfishkill.com collected 2026-09-26 05:00:29 UTC 2,207 bytes, 73 lines download raw bytes

vendor: 2,207 bytes, lines 1-73
1/*!
2 * jQuery Cropper v1.0.1
3 * https://fengyuanchen.github.io/jquery-cropper
4 *
5 * Copyright 2018-present Chen Fengyuan
6 * Released under the MIT license
7 *
8 * Date: 2019-10-19T08:48:33.062Z
9 */
10
11(function (global, factory) {
12  typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery'), require('cropperjs')) :
13  typeof define === 'function' && define.amd ? define(['jquery', 'cropperjs'], factory) :
14  (global = global || self, factory(global.jQuery, global.Cropper));
15}(this, function ($, Cropper) { 'use strict';
16
17  $ = $ && $.hasOwnProperty('default') ? $['default'] : $;
18  Cropper = Cropper && Cropper.hasOwnProperty('default') ? Cropper['default'] : Cropper;
19
20  if ($ && $.fn && Cropper) {
21    var AnotherCropper = $.fn.cropper;
22    var NAMESPACE = 'cropper';
23
24    $.fn.cropper = function jQueryCropper(option) {
25      for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
26        args[_key - 1] = arguments[_key];
27      }
28
29      var result;
30      this.each(function (i, element) {
31        var $element = $(element);
32        var isDestroy = option === 'destroy';
33        var cropper = $element.data(NAMESPACE);
34
35        if (!cropper) {
36          if (isDestroy) {
37            return;
38          }
39
40          var options = $.extend({}, $element.data(), $.isPlainObject(option) && option);
41          cropper = new Cropper(element, options);
42          $element.data(NAMESPACE, cropper);
43        }
44
45        if (typeof option === 'string') {
46          var fn = cropper[option];
47
48          if ($.isFunction(fn)) {
49            result = fn.apply(cropper, args);
50
51            if (result === cropper) {
52              result = undefined;
53            }
54
55            if (isDestroy) {
56              $element.removeData(NAMESPACE);
57            }
58          }
59        }
60      });
61      return result !== undefined ? result : this;
62    };
63
64    $.fn.cropper.Constructor = Cropper;
65    $.fn.cropper.setDefaults = Cropper.setDefaults;
66
67    $.fn.cropper.noConflict = function noConflict() {
68      $.fn.cropper = AnotherCropper;
69      return this;
70    };
71  }
72
73}));

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.