- краткое описание
- какую проблему решает
- как эту проблему решает
- от чего зависит модуль
// modules.js | |
const Modules = (function() { | |
const config = { base: '' } | |
const modulesPromises = {} | |
function loadModule(url) { | |
if (modulesPromises[url]) return modulesPromises[url] | |
return modulesPromises[url] = new Promise((res, rej) => { | |
ajaxGET(config.base + url, (moduleText) => { |
var loadFile = (function () { | |
var links = document.getElementsByTagName('link'); | |
var scripts = document.getElementsByTagName('script'); | |
var head = document.getElementsByTagName('head')[0]; | |
var need = { | |
css: true, | |
js: true | |
} |
function checkSupport(fn) { | |
var html = document.documentElement, | |
WebP = new Image(); | |
WebP.onload = WebP.onerror = function() { | |
isSupported = (WebP.height === 2); | |
if (isSupported) { | |
if (html.className.indexOf('no-webp') >= 0) | |
html.className = html.className.replace(/\bno-webp\b/, 'webp'); |
/* метод Ильи Стрельцына */ | |
.table { | |
padding: 0 10px; | |
background: #E76D13; | |
position: relative; | |
/* display: table */ | |
-height: 1%; /*IE6*/ | |
*zoom: 1; /*IE6-7*/ | |
display: table; |
.clearfix:after { | |
content: ""; | |
display: table; | |
clear: both; | |
} |
.transparent { | |
filter: alpha(opacity=50); | |
-moz-opacity: 0.5; | |
-khtml-opacity: 0.5; | |
opacity: 0.5; | |
} |