<?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
// ==UserScript== | |
// @name lepratranslate | |
// @author RubaXa <trash@rubaxa.org> | |
// @license MIT | |
// @version 0.0.1 | |
// @include http://leprosorium.ru/* | |
// ==/UserScript== | |
/*global unsafeWindow*/ |
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
/** | |
* OOP | |
* @author RubaXa <trash@rubaxa.org> | |
*/ | |
(function (){ | |
/** | |
* Создание «родительского» метода | |
* @param {*} fn | |
* @param {*} parent |
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 () { 'use strict'; | |
var indent = 0, tags = [], close, begin, rshort = /^(img|input|hr|br)$/; | |
window['absurdTpl'] = function _(name, template) { | |
return _[name] = Function('ctx', ('var buf = "";\n' + (template || name).toString().split('\n').slice(1, -1).map(function (line, idx, lines) { | |
return line.replace(/\/\/.+|\/\*.*?\*\//g, '') | |
.replace(/~([\w+_-]+)/i, 'buf += absurdTpl["$1"]') | |
.replace(/^(\s*)(?:([a-z]+[0-9]*)((?:\.[a-z_-]+[\w_-]+)*)((?:\[.*?\])*)(?:\s+\|\s+(.*?))?($|;)|.)/, function (_, ind, tag, classes, attrs, html) { | |
begin = (indent >= ind.length) && (close = tags.splice(0, indent/ind.length).filter(isNaN)).length ? 'buf += "</' + close.join('></') + '>";\n' : ''; | |
indent = ind.length; | |
!rshort.test(tag) && tags.unshift(tag || 0); |
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
/** | |
* @desc now("+year"), now("+3 months"), now("-13 min") or now("+86400 ms") | |
*/ | |
(function () { | |
var R_ADD = /(?:([+-]?)\s*(\d*))\s*(year|month|day|hour|min|sec|ms)/; | |
var _getTime = Date.now || function () { return (new Date).getTime(); }, | |
_cache = {}, | |
_map = { | |
'year': 'FullYear', |
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
/** | |
* Pilot v2 (draft) | |
* - Не зависит от jQuery | |
* - Модульность (URL, history, Emitter) | |
* - Простота (один маршрут, один контроллер) | |
*/ | |
var app = { | |
// Глобальная дата | |
model: { |
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
// jsfiddle: http://jsfiddle.net/Pj7G4/1/ | |
var store = indexeddbStore("user") | |
store.put({ name: "bob" }, "bob", function (err, result) { | |
store.get("bob", function (err, user) { | |
console.log(user.name === "bob") | |
}) | |
}) |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<title>#feast: Check on-{event} attributeFeast.</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script> | |
<script src="./suite.js"></script> | |
</head> | |
<body> | |
<h1>Open the console to view the results</h1> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<title>Feast. Detect expression.</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script> | |
<script src="./suite.js"></script> | |
</head> | |
<body> | |
<h1>Open the console to view the results</h1> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<title>CSS vs. Inline style</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script> | |
<script src="./suite.js"></script> | |
</head> | |
<body> | |
<h1>Open the console to view the results</h1> |
OlderNewer