Welcome to mirror list, hosted at ThFree Co, Russian Federation.

common.js « js - github.com/twbs/ratchet.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 770f4568028b7ab14160b967d654ece499ba279b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/* ========================================================================
 * Ratchet: common.js v2.0.2
 * http://goratchet.com/
 * ========================================================================
 * Copyright 2015 Connor Sears
 * Licensed under MIT (https://github.com/twbs/ratchet/blob/master/LICENSE)
 * ======================================================================== */

!(function () {
  'use strict';

  // Create Ratchet namespace
  if (typeof window.RATCHET === 'undefined') {
    window.RATCHET = {};
  }

  // Original script from http://davidwalsh.name/vendor-prefix
  window.RATCHET.getBrowserCapabilities = (function () {
    var styles = window.getComputedStyle(document.documentElement, '');
    var pre = (Array.prototype.slice
        .call(styles)
        .join('')
        .match(/-(moz|webkit|ms)-/) || (styles.OLink === '' && ['', 'o'])
      )[1];
    return {
      prefix: '-' + pre + '-',
      transform: pre[0].toUpperCase() + pre.substr(1) + 'Transform'
    };
  })();
}());