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
/* | |
Usage Example: | |
window.PolyfillHelpers.loadPolyfillLib( | |
// Callback condition that says if the polyfill need to be loaded or not | |
function () { return ('Promise' in window); }, | |
// Polyfill lib path | |
'/bower_components/es6-promise/es6-promise.auto.min.js', { async: false }, | |
// Polyfill check/load completed | |
function(polyfillUsed) { |
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
window.PerfHelpers = window.PerfHelpers || {}; | |
;(function(PerfHelpers) { | |
var timers = {}; | |
PerfHelpers = window.performance || {}; | |
PerfHelpers.now = PerfHelpers.now || function () {}; | |
if ((!console) || (!console.time)) { | |
console.time = function() {}; | |
console.timeEnd = function() {}; | |
} |
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(root) { | |
var originalRAF = root.requestAnimationFrame; | |
var customRAF = function (cb) { | |
return setTimeout(cb, 1000 / 60); | |
}; | |
var useOriginal = false; | |
//overwrite the function only once because other components also overwrite it | |
//this way, no one will have directly reference to customRAF | |
root.requestAnimationFrame = function(cb) { | |
return useOriginal ? originalRAF(cb) : customRAF(cb); |
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
def FOLDER_NAME = 'target/folder/fullName' | |
def JOBS_FOLDER_NAME = 'jobs/search/folder/fullName' | |
def JOB_REGEX = 'jobs/search/folder/fullName/someRegexHere[-]([-]?[A-Za-z]+)+' | |
import jenkins.* | |
import jenkins.model.* | |
import hudson.* | |
import hudson.model.* | |
jenkins = Jenkins.instance |
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
import qs from "query-string"; | |
const setQueryStringWithoutPageReload = qsValue => { | |
const newurl = | |
window.location.protocol + | |
"//" + | |
window.location.host + | |
window.location.pathname + | |
qsValue; | |
window.history.pushState({ path: newurl }, "", newurl); |