2020-01-27 17:38:52 +00:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2013, Divio AG
|
|
|
|
|
* Licensed under BSD
|
|
|
|
|
* http://github.com/aldryn/aldryn-boilerplate-bootstrap3
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
// #############################################################################
|
|
|
|
|
// NAMESPACES
|
|
|
|
|
/**
|
|
|
|
|
* @module Cl
|
|
|
|
|
*/
|
|
|
|
|
// istanbul ignore next
|
|
|
|
|
var Cl = window.Cl || {};
|
|
|
|
|
/* global outdatedBrowser */
|
|
|
|
|
|
|
|
|
|
// #############################################################################
|
|
|
|
|
// BASE
|
|
|
|
|
// istanbul ignore next
|
2020-02-03 20:26:34 +00:00
|
|
|
(function($) {
|
|
|
|
|
'use strict';
|
2020-01-27 17:38:52 +00:00
|
|
|
|
2020-02-03 20:26:34 +00:00
|
|
|
// shorthand for invoking jQuery(document).ready
|
|
|
|
|
$(function() {
|
|
|
|
|
// removes noscript form body and adds print-js
|
|
|
|
|
if (window.Cl && window.Cl.Utils) {
|
|
|
|
|
Cl.Utils._document();
|
|
|
|
|
}
|
2020-01-27 17:38:52 +00:00
|
|
|
|
2020-02-03 20:26:34 +00:00
|
|
|
// DOCS: https://github.com/burocratik/outdated-browser
|
|
|
|
|
if (window.outdatedBrowser) {
|
|
|
|
|
outdatedBrowser({
|
|
|
|
|
'languagePath': '',
|
|
|
|
|
'lowerThan': 'boxShadow'
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
// custom functions "botsicode"
|
|
|
|
|
const backTop = document.querySelector('.list-inline .pull-right'),
|
|
|
|
|
bodyContainer = document.querySelector('body>div.container'),
|
|
|
|
|
shBackTop = function() {
|
|
|
|
|
if (backTop && bodyContainer) {
|
|
|
|
|
backTop.style.opacity = +(bodyContainer.offsetTop + bodyContainer.getBoundingClientRect().height > window.innerHeight);
|
2020-01-27 17:38:52 +00:00
|
|
|
}
|
2020-02-03 20:26:34 +00:00
|
|
|
};
|
|
|
|
|
$(window).resize(shBackTop);
|
|
|
|
|
$(window).scroll(shBackTop);
|
|
|
|
|
shBackTop();
|
|
|
|
|
|
|
|
|
|
});
|
2020-01-27 17:38:52 +00:00
|
|
|
|
|
|
|
|
})(jQuery);
|