Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/uPagge/uBlogger.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/js/theme.js10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/js/theme.js b/src/js/theme.js
index 017c253..51628a6 100644
--- a/src/js/theme.js
+++ b/src/js/theme.js
@@ -40,6 +40,7 @@ class Theme {
this.resizeEventSet = new Set();
this.switchThemeEventSet = new Set();
this.clickMaskEventSet = new Set();
+ if (objectFitImages) objectFitImages();
}
initSVGIcon() {
@@ -56,7 +57,7 @@ class Theme {
if ($titleElements.length) $svg.removeChild($titleElements[0]);
$icon.parentElement.replaceChild($svg, $icon);
})
- .catch(console.error.bind(console));
+ .catch(err => { console.error(err); });
});
}
@@ -586,12 +587,7 @@ class Theme {
}
initSmoothScroll() {
- if ((!this.util.isMobile() && this.config.headerMode.desktop === 'normal')
- || (this.util.isMobile() && this.config.headerMode.mobile === 'normal')) {
- new SmoothScroll('[href^="#"]', {speed: 300, speedAsDuration: true});
- } else {
- new SmoothScroll('[href^="#"]', {speed: 300, speedAsDuration: true, header: '#header-desktop'});
- }
+ if (SmoothScroll) new SmoothScroll('[href^="#"]', { speed: 300, speedAsDuration: true, header: '#header-desktop' });
}
onScroll() {