Показать сообщение отдельно
  #4 (permalink)  
Старый 29.11.2019, 00:37
Новичок на форуме
Отправить личное сообщение для thegodzila Посмотреть профиль Найти все сообщения от thegodzila
 
Регистрация: 30.09.2019
Сообщений: 7

SC.setupBodyClassNames = function() {
var el = document.body,
browser, platform, shadows, borderRad, classNames, style, ieVersion;
if (!el) {
return
}
browser = SC.browser.current;
platform = SC.browser.windows ? "windows" : SC.browser.mac ? "mac" : "other-platform";
style = document.documentElement.style;
shadows = (style.MozBoxShadow !== undefined) || (style.webkitBoxShadow !== undefined) || (style.oBoxShadow !== undefined) || (style.boxShadow !== undefined);
borderRad = (style.MozBorderRadius !== undefined) || (style.webkitBorderRadius !== undefined) || (style.oBorderRadius !== undefined) || (style.borderRadius !== undefined);
classNames = el.className ? el.className.split(" ") : [];
if (shadows) {
classNames.push("box-shadow")
}
if (borderRad) {
classNames.push("border-rad")
}
classNames.push(browser, platform);
ieVersion = parseInt(SC.browser.msie, 10);
if (ieVersion) {
if (ieVersion === 7) {
classNames.push("ie7")
} else {
if (ieVersion === 8) {
classNames.push("ie8")
} else {
if (ieVersion === 9) {
classNames.push("ie9")
} else {
if (ieVersion === 10) {
classNames.push("ie10")
} else {
if (ieVersion === 11) {
classNames.push("ie11")
}
}
}
}
}
}
if (browser === "safari" || browser === "chrome") {
classNames.push("webkit")
}
if (SC.browser.mobileSafari) {
classNames.push("mobile-safari")
}
if ("createTouch" in document) {
classNames.push("touch")
}
if (window.navigator.userAgent.toLowerCase().match(/windows nt 5.1/)) {
classNames.push("winxp")
}
el.className = classNames.join(" ")
};
SC._relativeUrl_cachedCurrentUrl = (function() {
var parts = BUILD_INFO.currentUrl.split("/");
var idx, len = parts.length;
for (idx = 0; idx < parts.length; idx++) {
if (parts[idx] == "..") {
parts.splice(idx, 1);
parts.splice(idx - 1, 1);
idx--;
idx--
}
}
return parts.join("/")
})();
SC.relativeUrl = function(to_url) {
if (!BUILD_INFO.useRelativeUrls) {
return to_url
}
var from_parts = SC._relativeUrl_cachedCurrentUrl.split("/");
var to_parts = to_url.split("/");
while (to_parts.length >= 1 && from_parts.length >= 1 && from_parts[0] === to_parts[0]) {
from_parts.shift();
to_parts.shift()
}
var ret = "";
from_parts.pop();
for (var idx = 0, len = from_parts.length;
idx < len; idx++) {
ret += "../"
}
ret += to_parts.join("/");
return ret
};
SC.absoluteUrl = function(relative_url) {
if (relative_url[0] === "/") {
return relative_url
}
var path = window.location.pathname.split("/"),
add = relative_url.split("/"),
len = add.length,
idx;
if (path[path.length - 1] === "") {
path.pop()
}
for (idx = 0; idx < len; idx++) {
if (add[idx] == ".." && path.length > 0) {
path.pop()
} else {
path.push(add[idx])
}
}
return path.join("/")
};
(function() {
if (!BUILD_INFO.images) {
return
}
var styles;
if (window.devicePixelRatio > 1 || window.location.search.match(/(\?|&)2x=true/)) {
styles = BUILD_INFO.styles.x2;
SC.APP_IMAGE_ASSETS = BUILD_INFO.images.x2;
BUILD_INFO.stylesDPIUsed = 2
} else {
styles = BUILD_INFO.styles.normal;
SC.APP_IMAGE_ASSETS = BUILD_INFO.images.normal;
BUILD_INFO.stylesDPIUsed = 1
}
var head = document.getElementsByTagName("head")[0],
len = styles.length,
idx, css;
for (idx = 0; idx < len; idx++) {
css = document.createElement("link");
css.rel = "stylesheet";
css.type = "text/css";
css.href = styles[idx];
css.media = "screen";
head.appendChild(css)
}
})();
</script>
Ответить с цитированием