This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function ($, window, document, undefined) { | |
$.fn.extend({ | |
/* | |
* Provides event handling with delaying ability | |
* respects two attributes coming as data attributes: | |
* timeout: integer value of ms to timeout before event will be triggered once event is stopped to be fired | |
* throttle: boolean, default false | |
* if set to true - event will be fired once per timeout, | |
* if set to false - event will be fired only after timeout starting from event is stoped firing | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function ($) { | |
// Special event definition. | |
$.event.special.windowresize = { | |
setup: function () { | |
$(this).ondelay('resize', { timeout: 300 }, resizeHandler); | |
}, | |
teardown: function () { | |
$(this).off('resize', resizeHandler); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.extend($.expr[':'], { | |
/* | |
* check if element is detached from DOM | |
*/ | |
detached: function (elem) { | |
return !$.contains(document.documentElement, elem); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function ($, window, document, undefined) { | |
$.fn.extend({ | |
/* | |
* Iterates over jQuery object collection using deferred callbacks. | |
* the function assigned for iterator should return promise. | |
* resolved promises notify the main deferred, so we can track each loop result. | |
* returns promise. | |
*/ | |
eachDeferred: function (c) { | |
var that = this, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function ($, window, document, undefined) { | |
$.extend({ | |
/* | |
* Iterates over elms array/collection using deferred callbacks. | |
* the function assigned for iterator should return promise. | |
* resolved promises notify the main deferred, so we can track each loop result. | |
* returns promise. | |
*/ | |
eachDeferred: function (elms, c) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function ($, window, document, undefined) { | |
$.extend({ | |
/* | |
* wait for timeout until condition returns true | |
*/ | |
wait: function (conditionCallback, timeout) { | |
timeout = timeout || 50; | |
return $.Deferred(function (dfd) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function ($, window, document, undefined) { | |
$.extend({ | |
/** | |
* Format at string using .NET C# syntax | |
$.format("test {0} and {1}", "is cool", "and passed"); | |
$.format("test {1} and {0}", ["is cool", "and passed"]); | |
*/ | |
format: (function () { | |
var iterate = function (txt, replacements) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const axios = require('axios'); | |
const ntlmAuth = require('cypress-ntlm-auth/dist/plugin'); | |
const ConfigValidator = require('cypress-ntlm-auth/dist/util/config.validator').ConfigValidator; | |
const SsoConfigValidator = require('cypress-ntlm-auth/dist/util/sso.config.validator').SsoConfigValidator; | |
const DI = require('cypress-ntlm-auth/dist/proxy/dependency.injection'); | |
const DITypes = require('cypress-ntlm-auth/dist/proxy/dependency.injection.types'); | |
module.exports = class NTLMProxy { |