From Foster to Family: The Extraordinary Journey of Dog Foster Care
[:phone-1]
,
flags: {
lsdUnits: false,
},
},
ua = navigator.userAgent,
a, i;
// browser, browserVersion.
a = [
[
'firefox',
/Firefox\/([0-9\.]+)/
],
[
'edge',
/Edge\/([0-9\.]+)/
],
[
'safari',
/Version\/([0-9\.]+).+Safari/
],
[
'chrome',
/Chrome\/([0-9\.]+)/
],
[
'chrome',
/CriOS\/([0-9\.]+)/
],
[
'ie',
/Trident\/.+rv:([0-9]+)/
]
];
for (i=0; i < a.length; i++) {
if (ua.match(a[i][1])) {
o.browser = a[i][0];
o.browserVersion = parseFloat(RegExp.$1);
break;
}
}
// os, osVersion.
a = [
[
'ios',
/([0-9_]+) like Mac OS X/,
function(v) { return v.replace('_', '.').replace('_', ''); }
],
[
'ios',
/CPU like Mac OS X/,
function(v) { return 0 }
],
[
'ios',
/iPad; CPU/,
function(v) { return 0 }
],
[
'android',
/Android ([0-9\.]+)/,
],
[
'mac',
/Macintosh.+Mac OS X ([0-9_]+)/,
function(v) { return v.replace('_', '.').replace('_', ''); }
],
[
'windows',
/Windows NT ([0-9\.]+)/,
],
[
'undefined',
/Undefined/,
]
];
for (i=0; i < a.length; i++) {
if (ua.match(a[i][1])) {
o.os = a[i][0];
o.osVersion = parseFloat( a[i][2] ? (a[i][2])(RegExp.$1) : RegExp.$1 );
break;
}
}
// Hack: Detect iPads running iPadOS.
if (o.os == 'mac'
&& ('ontouchstart' in window)
&& (
// 12.9"
(screen.width == 1024 && screen.height == 1366)
// 10.2"
|| (screen.width == 834 && screen.height == 1112)
// 9.7"
|| (screen.width == 810 && screen.height == 1080)
// Legacy
|| (screen.width == 768 && screen.height == 1024)
))
o.os = 'ios';
// mobile.
o.mobile = (o.os == 'android' || o.os == 'ios');
// canUse.
var _canUse = document.createElement('div');
o.canUse = function(property, value) {
var style;
// Get style.
style = _canUse.style;
// Property doesn't exist? Can't use it.
if (!(property in style))
return false;
// Value provided?
if (typeof value !== 'undefined') {
// Assign value.
style[property] = value;
// Value is empty? Can't use it.
if (style[property] == '')
return false;
}
return true;
};
// flags.
o.flags.lsdUnits = o.canUse('width', '100dvw');
return o;
}()),
trigger = function(t) {
dispatchEvent(new Event(t));
},
cssRules = function(selectorText) {
var ss = document.styleSheets,
a = [],
f = function(s) {
var r = s.cssRules,
i;
for (i=0; i < r.length; i++) {
if (r[i] instanceof CSSMediaRule && matchMedia(r[i].conditionText).matches)
(f)(r[i]);
else if (r[i] instanceof CSSStyleRule && r[i].selectorText == selectorText)
a.push(r[i]);
}
},
x, i;
for (i=0; i < ss.length; i++)
f(ss[i]);
return a;
},
thisHash = function() {
var h = location.hash ? location.hash.substring(1) : ,
a;
// ? Bail.
if (!h)
return ;
// Query string? Move before hash.
if (h.match(/\?/)) {
// Split from hash.
a = h.split('?');
h = a[0];
// Update hash.
history.replaceState(undefined, undefined, '#' + h);
// Update search.
window.location.search = a[1];
}
// Prefix with "x" if not a letter.
if (h.length > 0
&& !h.match(/^[a-zA-Z]/))
h = 'x' + h;
// Convert to lowercase.
if (typeof h == 'string')
h = h.toLowerCase();
return h;
},
scrollToElement = function(e, style, duration) {
var y, cy, dy,
start, easing, offset, f;
// Element.
// No element? Assume top of page.
if (!e)
y = 0;
// Otherwise ...
else {
offset = (e.dataset.scrollOffset ? parseInt(e.dataset.scrollOffset) : 0) parseFloat(getComputedStyle(document.documentElement).fontSize);
switch (e.dataset.scrollBehavior ? e.dataset.scrollBehavior : 'default') {
case 'default':
default:
y = e.offsetTop + offset;
break;
case 'center':
if (e.offsetHeight < window.innerHeight)
y = e.offsetTop - ((window.innerHeight - e.offsetHeight) / 2) + offset;
else
y = e.offsetTop - offset;
break;
case 'previous':
if (e.previousElementSibling)
y = e.previousElementSibling.offsetTop + e.previousElementSibling.offsetHeight + offset;
else
y = e.offsetTop + offset;
break;
}
}
// Style.
if (!style)
style = 'smooth';
// Duration.
if (!duration)
duration = 750;
// Instant? Just scroll.
if (style == 'instant') {
window.scrollTo(0, y);
return;
}
// Get start, current Y.
start = Date.now();
cy = window.scrollY;
dy = y - cy;
// Set easing.
switch (style) {
case 'linear':
easing = function (t) { return t };
break;
case 'smooth':
easing = function (t) { return t<.5 ? 4ttt : (t-1)(2t-2)(2t-2)+1 };
break;
}
// Scroll.
f = function() {
var t = Date.now() - start;
// Hit duration? Scroll to y and finish.
if (t >= duration)
window.scroll(0, y);
// Otherwise ...
else {
// Scroll.
window.scroll(0, cy + (dy easing(t / duration)));
// Repeat.
requestAnimationFrame(f);
}
};
f();
},
scrollToTop = function() {
// Scroll to top.
scrollToElement();
},
loadElements = function(parent) {
var a, e, x, i;
// IFRAMEs.
// Get list of unloaded IFRAMEs.
a = parent.querySelectorAll('iframe[data-src]:not([data-src=""])');
// Step through list.
for (i=0; i < a.length; i++) {
// Load.
a[i].contentWindow.location.replace(a[i].dataset.src);
// Save initial src.
a[i].dataset.initialSrc = a[i].dataset.src;
// Mark as loaded.
a[i].dataset.src = '';
}
// Video.
// Get list of videos (autoplay).
a = parent.querySelectorAll('video[autoplay]');
// Step through list.
for (i=0; i < a.length; i++) {
// Play if paused.
if (a[i].paused)
a[i].play();
}
// Autofocus.
// Get first element with data-autofocus attribute.
e = parent.querySelector('[data-autofocus="1"]');
// Determine type.
x = e ? e.tagName : ;
switch (x) {
case 'FORM':
// Get first input.
e = e.querySelector('.field input, .field select, .field textarea');
// Found? Focus.
if (e)
e.focus();
break;
default:
break;
}
},
unloadElements = function(parent) {
var a, e, x, i;
// IFRAMEs.
// Get list of loaded IFRAMEs.
a = parent.querySelectorAll('iframe[data-src=""]');
// Step through list.
for (i=0; i < a.length; i++) {
// Don't unload? Skip.
if (a[i].dataset.srcUnload === '0')
continue;
// Mark as unloaded.
// IFRAME was previously loaded by loadElements()? Use initialSrc.
if ('initialSrc' in a[i].dataset)
a[i].dataset.src = a[i].dataset.initialSrc;
// Otherwise, just use src.
else
a[i].dataset.src = a[i].src;
// Unload.
a[i].contentWindow.location.replace('about:blank');
}
// Video.
// Get list of videos.
a = parent.querySelectorAll('video');
// Step through list.
for (i=0; i < a.length; i++) {
// Pause if playing.
if (!a[i].paused)
a[i].pause();
}
// Autofocus.
// Get focused element.
e = $(':focus');
// Found? Blur.
if (e)
e.blur();
};
// Expose scrollToElement.
window._scrollToTop = scrollToTop;
// "On Load" animation.
// Create load handler.
var loadHandler = function() {
setTimeout(function() {
// Unmark as loading.
$body.classList.remove('is-loading');
// Mark as playing.
$body.classList.add('is-playing');
// Wait for animation complete.
setTimeout(function() {
// Unmark as playing.
$body.classList.remove('is-playing');
// Mark as ready.
$body.classList.add('is-ready');
}, 375);
}, 100);
};
// Load event.
on('load', loadHandler);
// Load elements.
// Load elements (if needed).
loadElements(document.body);
// Browser hacks.
// Init.
var style, sheet, rule;
// Create
dog foster home - From Foster to Family: The Extraordinary Journey of Dog Foster Care
Shelter Dog Caregiver From Foster to Family: The Extraordinary Journey of Dog Foster Care
More about dog foster home: Top Picks
dog foster home: A Safe Haven: The Sanctuary of Dog Foster Care
From Foster to Family: The Extraordinary Journey of Dog Foster Care
© 2024 - dog foster home All Rights Reserved.