Skip to content
Snippets Groups Projects
Select Git revision
  • 1eb6de82ce833b87cdb0b7d0a8042fef9715b9cd
  • master default
  • renovate/golang.org-x-crypto-0.x
  • renovate/go-1.x
  • renovate/golang.org-x-sync-0.x
  • renovate/opentelemetry-go-monorepo
  • renovate/github.com-go-webauthn-webauthn-0.x
  • renovate/github.com-mattn-go-sqlite3-1.x
  • renovate/github.com-go-ldap-ldap-v3-3.x
  • renovate/github.com-prometheus-client_golang-1.x
  • renovate/github.com-google-go-cmp-0.x
  • renovate/github.com-lunixbochs-struc-digest
  • renovate/github.com-duo-labs-webauthn-digest
13 results

transport.go

Blame
    • ale's avatar
      c165311f
      Let the configuration override connection and max request timeouts · c165311f
      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.
      c165311f
      History
      Let the configuration override connection and max request timeouts
      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.
    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;