HEX
Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.2.34
System: Linux atalantini.com 3.10.0-1127.13.1.el7.x86_64 #1 SMP Tue Jun 23 15:46:38 UTC 2020 x86_64
User: root (0)
PHP: 7.2.34
Disabled: NONE
Upload Files
File: /var/www/html/coreplad/misc/ui/jquery.ui.position-1.13.0-backport.js
/**
 * Backport of security fix from:
 * https://github.com/jquery/jquery-ui/pull/1955/files
 */

(function ($) {

  // No backport is needed if we're already on jQuery UI 1.13 or higher.
  var versionParts = $.ui.version.split('.');
  var majorVersion = parseInt(versionParts[0]);
  var minorVersion = parseInt(versionParts[1]);
  if ( (majorVersion > 1) || (majorVersion === 1 && minorVersion >= 13) ) {
    return;
  }

  var fnOriginalPosition = $.fn.position;
  $.fn.extend({
    'position': function (options) {
      if (typeof options === 'undefined') {
        return fnOriginalPosition.call(this);
      }

      // Make sure string options are treated as CSS selectors
      var target = typeof options.of === "string" ?
        $(document).find(options.of) :
        $(options.of);

      options.of = (target[0] === undefined) ? null : target;
      return fnOriginalPosition.call(this, options);
    }
  });

})(jQuery);