<?xml version="1.0"?>
<fest:template xmlns:fest="http://fest.mail.ru" context_name="json">
<div class="elm">
<fest:attributes>
<fest:attribute name="id">box</fest:attribute>
<fest:attribute name="style">color: red;</fest:attribute>
<fest:attribute name="class"><fest:space/>js-elm</fest:attribute>
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
'getOwnPropertyDescriptors' in Object || ( | |
Object.getOwnPropertyDescriptors = function (Object) { | |
var | |
gOPD = Object.getOwnPropertyDescriptor, | |
gOPN = Object.getOwnPropertyNames, | |
gOPS = Object.getOwnPropertySymbols, | |
gNS = gOPS ? function (object) { | |
return gOPN(object).concat(gOPS(object)); | |
} : | |
gOPN, |
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
/** | |
* User Timing polyfill (http://www.w3.org/TR/user-timing/) | |
* @author RubaXa <[email protected]> | |
*/ | |
(function (window){ | |
var | |
startOffset = Date.now ? Date.now() : +(new Date) | |
, performance = window.performance || {} | |
, _entries = [] |
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
/** | |
* jQuery event "tap" (Based on https://developers.google.com/mobile/articles/fast_buttons) | |
* | |
* @author RubaXa <[email protected]> | |
* @license MIT | |
*/ | |
(function (window, $){ | |
var | |
support = window.TapSupportEnabled && ('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch |
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
data:text/html, <style type="text/css">.e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div class="e" id="editor"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("editor");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script> | |
<!-- | |
For other language: Instead of `ace/mode/ruby`, Use | |
Markdown -> `ace/mode/markdown` | |
Python -> `ace/mode/python` | |
C/C++ -> `ace/mode/c_cpp` | |
Javscript -> `ace/mode/javascript` | |
Java -> `ace/mode/java` | |
Scala- -> `ace/mode/scala` |
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
// example: http://jsfiddle.net/QVqHs/ | |
function clone(o) { | |
return Object.create( | |
Object.getPrototypeOf(o), | |
getOwnPropertyDescriptors(o) | |
) | |
} | |
function getOwnPropertyDescriptors(o) { |
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 ruby -w | |
# pnginator.rb: pack a .js file into a PNG image with an HTML payload; | |
# when saved with an .html extension and opened in a browser, the HTML extracts and executes | |
# the javascript. | |
# Usage: ruby pnginator.rb input.js output.png.html | |
# By Gasman <http://matt.west.co.tt/> | |
# from an original idea by Daeken: http://daeken.com/superpacking-js-demos |
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
//http://www.w3.org/TR/2011/WD-page-visibility-20110602/ | |
(function () { | |
"use strict"; | |
//no need to shim if it's already there | |
if ( 'hidden' in document && 'onvisibilitychange' in document ) { | |
return; | |
} | |
//fail silently if the browser sux |
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
// Original - @Gozola. This is a reimplemented version (with a few bug fixes). | |
window.WeakMap = window.WeakMap || (function () { | |
var privates = Name() | |
return { | |
get: function (key, fallback) { | |
var store = privates(key) | |
return store.hasOwnProperty("value") ? | |
store.value : fallback | |
}, |
NewerOlder