function patdj(target, update, preserve = true) { | |
if (update.nodeType != 1 && update.nodeType == target.nodeType) | |
target.nodeValue = update.nodeValue | |
else if (update.nodeType != target.nodeType || update.tagName !== target.tagName || update.type !== target.type){ | |
const { nextSibling, parentNode } = target; | |
const replacement = preserve ? update.cloneNode(true) : update; | |
parentNode.removeChild(target); |
export default () => { | |
const queue = [] | |
let then | |
return { | |
onbeforeupdate : () => !blocker, | |
oncreate : resolve, | |
onupdate : resolve, | |
view : ({ | |
instance, |
import m from './functor-mithril' | |
function Async(){ | |
let cache | |
return ({content, setup, teardown}, dom) => { | |
if(content && !cache && teardown) | |
dom(node => { | |
void node.clientHeight | |
/*! rasterizeHTML.js - v1.2.2 - 2016-09-06 | |
* http://www.github.com/cburgmer/rasterizeHTML.js | |
* Copyright (c) 2016 Christoph Burgmer; Licensed MIT */ | |
/* Integrated dependencies: | |
* url (MIT License), | |
* css-mediaquery (BSD License), | |
* CSSOM.js (MIT License), | |
* ayepromise (BSD License & WTFPL), | |
* xmlserializer (MIT License), | |
* sane-domparser-error (BSD License), |
import {m} from './deps.js' | |
import viewOf from './viewOf.js' | |
// View component exposing a single function: | |
// Once invoked, the function causes the subtree to be reinitialised | |
export default () => { | |
let timestamp | |
const refresh = () => { |
void function semanticContentScope(context, jQuery){ | |
var $ = context.jQuery || jQuery || false; | |
if(!$){ | |
return false; | |
} | |
// Strips elements of duplicate, leading and trailing whitespace and removes empty non-functional elements recursively | |
function semanticContent(markup){ | |
// Conversion |
// Verbose ternary function to add debugging points and make views more legible. | |
// If `defer` is true and the pass/fail outcome is a function, it will be invoked: | |
// This allows you to conditionally return expressions which would break execution depending on `condition` | |
function tern( condition, pass, fail, defer ){ | |
if( !fail ) fail = '' | |
if( defer && condition instanceof Function ) condition = condition() | |
var outcome = condition ? pass : fail; | |
/** | |
* Fixing shitty WebKit text rendering for thin and quirky fonts | |
*/ | |
html { | |
font-family: 'Quicksand'; | |
font-size: 24px; | |
padding: 1em 5em; | |
-webkit-text-stroke-width: .25px;} |
Autumn is here again with its dismal days, and the sun is hiding himself in the darkest corner of the heavens so that no one shall see how pale and aged and worn he has grown in this latter time. But while the wind whistles in the window-chinks and the rain purls in the rainspouts and a wet dog howls in front of a closed gate down below on the street and before the fire has burned down in our tile stove, I will tell you a story about the drizzle. Listen now!
For some time back the good God had become so angered over the wickedness of men that he resolved to punish them by making them still wickeder. He should, in his great goodness, have liked above all things to have drowned them all together in a new Deluge: he had not forgotten how agreeable was the sight when all living creatures perished in the flood. But unfortunately in a sentimental moment he had promised Noah never to do so again.
"Harken, my friend I" he therefore said to the Devil one day. "You are assuredly no saint, but occasionall