This file contains hidden or 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
response = await Promise.race([ | |
fetch('https://possibly.slow.io/' + options.token + '/get', { | |
method: 'POST', | |
body: JSON.stringify(data), | |
}), | |
new Promise((_, reject) => | |
setTimeout(() => reject(new Error('Timeout')), options.timeout) | |
), | |
]) |
This file contains hidden or 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
// https://wordpress.stackexchange.com/questions/243697/zip-all-original-images-from-media-gallery | |
$query_images_args = array( | |
'post_type' => 'attachment', | |
'post_mime_type' => 'image', | |
'post_status' => 'inherit', | |
'posts_per_page' => - 1, | |
); | |
$query_images = new WP_Query( $query_images_args ); |
This file contains hidden or 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
/********* | |
* | |
* resize logos in custom galleries. | |
* | |
*/ | |
window.addEventListener("load", function() { | |
var images = document.querySelectorAll(".custom-gallery img"); | |
var adjustImageWidth = function (image) { | |
var widthBase = 250; |
This file contains hidden or 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
/* | |
* arrive.js | |
* v2.4.1 | |
* https://github.com/uzairfarooq/arrive | |
* MIT licensed | |
* | |
* Copyright (c) 2014-2017 Uzair Farooq | |
*/ | |
var Arrive = function (e, t, n) { "use strict"; function r(e, t, n) { l.addMethod(t, n, e.unbindEvent), l.addMethod(t, n, e.unbindEventWithSelectorOrCallback), l.addMethod(t, n, e.unbindEventWithSelectorAndCallback); } function i(e) { e.arrive = f.bindEvent, r(f, e, "unbindArrive"), e.leave = d.bindEvent, r(d, e, "unbindLeave"); } if (e.MutationObserver && "undefined" != typeof HTMLElement) { var o = 0, l = function () { var t = HTMLElement.prototype.matches || HTMLElement.prototype.webkitMatchesSelector || HTMLElement.prototype.mozMatchesSelector || HTMLElement.prototype.msMatchesSelector; return { matchesSelector: function (e, n) { return e instanceof HTMLElement && t.call(e, n); }, addMethod: function (e, t, r) { var i = e[t]; e[t] = function () { return r.length == arguments.length ? r.apply(this, arguments) : "function" == typeof i ? i.appl |
This file contains hidden or 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
var waitForJQuery = setInterval(function () { | |
if (typeof jQuery != 'undefined') { | |
//your code here | |
clearInterval(waitForJQuery); | |
} | |
}, 10); |
OlderNewer