This file contains hidden or 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
/** | |
* Observe elements entering/leaving viewport and apply classes | |
* @param {string} selector - CSS selector | |
* @param {Object} [options] - Configuration object | |
* @param {Element} [options.scope=document] - Element to search within | |
* @param {Element} [options.root=null] - Root element for intersection (null = viewport) | |
* @param {string} [options.inView] - Class to add when element enters view | |
* @param {string} [options.outView] - Class to add when element leaves view (requires toggle: true) | |
* @param {Function} [options.onEnter] - Callback when element enters view | |
* @param {Function} [options.onLeave] - Callback when element leaves view |
This file contains hidden or 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
/** | |
* Animate CSS classes with easing and timing control | |
* @param {string} selector - CSS selector | |
* @param {Object} [options] - Animation options | |
* @param {number} [options.duration=0] - Total animation duration (ms) | |
* @param {string} [options.easing='easeOut'] - Easing function: 'linear', 'easeIn', 'easeOut', 'easeInOut' | |
* @param {boolean} [options.debug=false] - Debug mode | |
*/ | |
const animateClass = (selector, options = {}) => new ClassAnimator(selector, options) |
This file contains hidden or 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
/** | |
* Simple text markup function | |
* @param {string} selector - CSS selector | |
* @param {string} chars - Character class pattern | |
* @param {string|Object|Function} processor - Class name, attributes object, or custom function | |
*/ | |
const markupText = (selector, chars, processor) => { | |
const regex = new RegExp(`[${chars}][${chars}\\s]*[${chars}]?`, 'g') | |
let process |
This file contains hidden or 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
{ | |
"title": "KanaFN (“keyexchange”-compatible)", | |
"rules": [ | |
{ | |
"description": "KanaFN: japanese_kana to fn unlesss alone", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "japanese_kana", |
This file contains hidden or 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
{ | |
"remove-empty-rulesets": true, | |
"always-semicolon": true, | |
"color-shorthand": true, | |
"leading-zero": false, | |
"unitless-zero": true, | |
"color-case": "lower", | |
"element-case": "lower", | |
"quotes": "single", | |
"space-before-combinator": " ", |
This file contains hidden or 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 PositionObserver = function(callback, options) { | |
this.root = window; | |
this.rootMargin = this.buildRootMargin_('0'); | |
this.threasholds = undefined; | |
this.els_ = []; | |
this.callback_ = callback; | |
this.init_(options); | |
this.listen_(); | |
} |
This file contains hidden or 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
@mixin ripple($color: rgba(#fff, .2)) { | |
position: relative; | |
overflow: hidden; | |
&::after { | |
content: ''; | |
position: absolute; | |
top: 50%; | |
left: 50%; | |
width: 5px; |
This file contains hidden or 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
import sys | |
import os | |
import datetime | |
import subprocess | |
from keyhac import * | |
def configure(keymap): |
This file contains hidden or 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 pq = function(q, f) { | |
return new pq.Obj(q); | |
}; | |
pq.Obj = function(q) { | |
if (typeof q === 'string') { | |
return this.find(q); | |
} else if (q instanceof pq.Obj) { | |
return q; | |
} else if (q instanceof HTMLElement) { |
This file contains hidden or 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(window) { | |
'use strict'; | |
var camelize = function(str) { | |
str = str.replace(/^\s+/, ''); | |
return str.replace(/[\W]+([a-z0-9])(\w*)/ig, function(match, p1, p2) { | |
return p1.toUpperCase() + p2; | |
}); | |
}; |
NewerOlder