This file contains 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 getScrollX | |
, getScrollX | |
, _document_documentElement = document.documentElement | |
; | |
document.compatMode === "CSS1Compat" ? | |
((_getScrollX = function(){return _document_documentElement.scrollLeft}), (_getScrollY = function(){return _document_documentElement.scrollTop})) | |
: | |
((_getScrollX = function(){return document.body.scrollTop}), (_getScrollY = function(){return document.body.scrollLeft})) | |
; |
This file contains 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
#!/usr/bin/env node | |
if (process.argv.length < 3) { | |
console.error('No enough parameters'); | |
process.exit(); | |
} | |
const fs = require('fs') | |
, path = require('path') | |
; |
This file contains 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
void function() {//closure | |
var global = this | |
, _initKeyboardEvent_type = (function( e ) { | |
try { | |
e.initKeyboardEvent( | |
"keyup" // in DOMString typeArg | |
, false // in boolean canBubbleArg | |
, false // in boolean cancelableArg | |
, global // in views::AbstractView viewArg |
This file contains 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
void function() { | |
var global = this | |
/** @const */ | |
, _Array_slice = Array.prototype.slice | |
/** @const */ | |
, _Function_apply = Function.prototype.apply |
This file contains 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
(function() { | |
var _Array_slice_ = Array.prototype['slice']; | |
var _Array_splice_ = Array.prototype.splice; | |
if( Function.prototype.bind === void 0 ) Function.prototype.bind = function (context) { | |
var args = _Array_slice_.call(arguments, 1), self = this; | |
return function (){ return self.apply(context, args.concat(_Array_slice_.call(arguments, 0))); }; | |
}; | |
function makeArray(l) { |
This file contains 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
//////////////////////////////////////////////////////////////////////////////// | |
// Author: Thaddee Tyl 2012. | |
// The following work is under CC0. | |
void function() { | |
// Hook the polyfill. | |
Element.prototype._scrollIntoView = function scrollIntoView(options) { | |
if( !this.ownerDocument )return; | |
This file contains 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
void function() { | |
"use strict"; | |
var global = this; | |
//Mini alternative https://gist.github.com/2428561 | |
//Uses | |
//https://gist.github.com/1384398 | |
//https://gist.github.com/1235332 |
This file contains 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
/** github.com/termi/CSS.supports */ | |
if( !global.CSS || !global.CSS.supports ) { | |
if( !global.CSS ) { | |
/** | |
* @expose | |
*/ | |
global.CSS = {}; | |
} | |
if( !global.CSS.supports && global["supportsCSS"] ) {// Opera 12.10 impl |
This file contains 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
function findMicrodataProperties(itemScopeNode, itemPropName) { | |
if( !itemScopeNode.hasAttribute("itemscope") ) { | |
return[]; | |
} | |
var pending = [] | |
, tmp | |
, currentNode | |
, k = -1 | |
, el |
This file contains 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
/** | |
* Склонение существительных | |
* Правильная форма cуществительного рядом с числом (счетная форма). | |
* | |
* @example declension("файл", "файлов", "файла", 0);//returns "файлов" | |
* @example declension("файл", "файлов", "файла", 1);//returns "файл" | |
* @example declension("файл", "файлов", "файла", 2);//returns "файла" | |
* | |
* @param {string} oneNominative единственное число (именительный падеж) | |
* @param {string} severalGenitive множественное число (родительный падеж) |