-
31 МАРТ 20170
-
30 МАРТ 20170
-
29 МАРТ 20170
notti - js скрипт простого уведомления пользователя
2.2 кб, без зависимостей, кастомизируется.import { notti } from 'notti'; notti('Hello User!'); notti({ // HTML Element message: '<strong>Hello!</stong> User', isHTML: true, style : { backgroundColor: '#333', color:'#fff', bottom: '10px', right: '10px' }, onHide: () => { console.log('Awesome notti.js!') } });
https://github.com/luisvinicius167/notti -
06 МАРТ 20170
callmecavs/gotem - js скрипт копирования в буфер на современных браузерах
import gotem from 'gotem' // a trigger and target node are required const nodes = { trigger: document.getElementById('trigger'), target: document.getElementById('target') } // when the trigger is clicked, // the text of the target will be copied to the clipboard gotem(nodes.trigger, nodes.target) // if an object with callback functions (success, error) is passed, // the appropriate function, based on the result of executing the copy command, will be fired if it exists gotem(nodes.trigger, nodes.target, { success: () => console.log('Copy command succeeded'), error: () => console.log('Copy command failed, BUT the text to copy has still been selected.') })
https://github.com/callmecavs/gotem -
21 ФЕВР 20170
swarm-numberformat - скрипт форматирования больших числ
numberformat.format(1e10) // or {format: 'standard'} // => "10.000 billion" numberformat.format(1e10, {format: 'scientific'}) // => "1.0000e10" numberformat.format(1e10, {format: 'engineering'}) // => "10.000E9" numberformat.format(1e10, {format: 'longScale'}) // => "10.000 milliard"
https://github.com/erosson/swarm-numberformat -
20 ФЕВР 20170
pakastin/animationframes - скрипт создания анимации на js
import { frames, ease } from 'animationframes'; const translate = (x, y) => `translate(${x}%, ${y}%)`; const el = document.createElement('h1'); const animation = frames(0, 1000) .start(() => { el.style.transform = translate(-100, 0); }) .progress((t) => { const e = ease.quartInOut(t); const x = -100 * (1 - e); el.style.transform = translate(x, 0); }) .end(() => { el.style.transform = ''; }); el.textContent = 'Hello world!'; document.body.appendChild(el);
https://github.com/pakastin/animationframes -
17 ФЕВР 20170
-
14 ФЕВР 20170
Категории:
Оставить на заметку в: