Select Git revision
transport.go
-
ale authored
Add the 'connect_timeout' and 'request_max_timeout' configuration fields, to control respectively the initial connection timeout, and the maximum time for each individual request. This allows fine-tuning of the expected performance of specific backends, for example to let optional backends fail fast.
ale authoredAdd the 'connect_timeout' and 'request_max_timeout' configuration fields, to control respectively the initial connection timeout, and the maximum time for each individual request. This allows fine-tuning of the expected performance of specific backends, for example to let optional backends fail fast.
svg-painter.js 5.36 KiB
/**
* Attempt to re-color SVG icons used in the admin menu or the toolbar
*
*/
window.wp = window.wp || {};
wp.svgPainter = ( function( $, window, document, undefined ) {
'use strict';
var selector, base64, painter,
colorscheme = {},
elements = [];
$(document).ready( function() {
// detection for browser SVG capability
if ( document.implementation.hasFeature( 'http://www.w3.org/TR/SVG11/feature#Image', '1.1' ) ) {
$( document.body ).removeClass( 'no-svg' ).addClass( 'svg' );
wp.svgPainter.init();
}
});
/**
* Needed only for IE9
*
* Based on jquery.base64.js 0.0.3 - https://github.com/yckart/jquery.base64.js
*
* Based on: https://gist.github.com/Yaffle/1284012
*
* Copyright (c) 2012 Yannick Albert (http://yckart.com)
* Licensed under the MIT license
* http://www.opensource.org/licenses/mit-license.php
*/
base64 = ( function() {
var c,
b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/',
a256 = '',
r64 = [256],
r256 = [256],
i = 0;
function init() {
while( i < 256 ) {
c = String.fromCharCode(i);
a256 += c;
r256[i] = i;
r64[i] = b64.indexOf(c);
++i;
}
}
function code( s, discard, alpha, beta, w1, w2 ) {
var tmp, length,
buffer = 0,
i = 0,
result = '',
bitsInBuffer = 0;
s = String(s);
length = s.length;
while( i < length ) {
c = s.charCodeAt(i);
c = c < 256 ? alpha[c] : -1;
buffer = ( buffer << w1 ) + c;
bitsInBuffer += w1;
while( bitsInBuffer >= w2 ) {
bitsInBuffer -= w2;
tmp = buffer >> bitsInBuffer;