Skip to content

Instantly share code, notes, and snippets.

View nchereva's full-sized avatar

Nikolay Cherevatenko nchereva

View GitHub Profile
@camille-hdl
camille-hdl / getPolygonBounds.js
Created October 21, 2015 07:08
Google maps API : get polygon bounds
/**
* Recupere les limites d'un polygone
*
* @method getPolygonBounds
* @param {Object} polygon un `polygon` gmap
* @return {Object} bounds
*/
getPolygonBounds: function(polygon) {
var paths = polygon.getPaths();
var bounds = new google.maps.LatLngBounds();
@adeelejaz
adeelejaz / jquery.browser.js
Last active January 9, 2018 18:15
jQuery $.browser as a separate file in case you do not want to include the full migration file
(function( jQuery, window, undefined ) {
"use strict";
var matched, browser;
jQuery.uaMatch = function( ua ) {
ua = ua.toLowerCase();
var match = /(chrome)[ \/]([\w.]+)/.exec( ua ) ||
/(webkit)[ \/]([\w.]+)/.exec( ua ) ||