style: 4 space indents to the JS files
This commit is contained in:
parent
1fd665bf49
commit
339293d0d7
21 changed files with 913 additions and 912 deletions
|
@ -2,10 +2,13 @@ root = true
|
|||
|
||||
[*]
|
||||
charset = utf-8
|
||||
# 2 space indentation
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
trim_trailing_whitespace = true
|
||||
# Unix-style newlines with a newline ending every file
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
|
||||
|
||||
[*.js]
|
||||
indent_size = 4
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Reference: https://bootsnipp.com/snippets/featured/link-to-top-page
|
||||
/**
|
||||
* Reference: https://bootsnipp.com/snippets/featured/link-to-top-page
|
||||
*/
|
||||
$(function() {
|
||||
$(window).scroll(() => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/**
|
||||
* Listener for theme mode toggle
|
||||
*/
|
||||
$(function () {
|
||||
|
|
|
@ -18,7 +18,9 @@ const ScrollHelper = (function () {
|
|||
|
||||
addScrollUpTask: () => {
|
||||
scrollUpCount += 1;
|
||||
if (!topbarLocked) { topbarLocked = true; }
|
||||
if (!topbarLocked) {
|
||||
topbarLocked = true;
|
||||
}
|
||||
},
|
||||
popScrollUpTask: () => scrollUpCount -= 1,
|
||||
hasScrollUpTask: () => scrollUpCount > 0,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/**
|
||||
* This script make #search-result-wrapper switch to unloaded or shown automatically.
|
||||
*/
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
*/
|
||||
|
||||
$(function () {
|
||||
|
||||
const sidebarUtil = (function () {
|
||||
const ATTR_DISPLAY = "sidebar-display";
|
||||
let isExpanded = false;
|
||||
|
@ -26,5 +25,4 @@ $(function() {
|
|||
$("#sidebar-trigger").click(sidebarUtil.toggle);
|
||||
|
||||
$("#mask").click(sidebarUtil.toggle);
|
||||
|
||||
});
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/**
|
||||
* Hide Header on scroll down
|
||||
*/
|
||||
|
||||
|
@ -86,5 +86,4 @@ $(function() {
|
|||
didScroll = false;
|
||||
}
|
||||
}, 250);
|
||||
|
||||
});
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/**
|
||||
* Top bar title auto change while scrolling up/down in mobile screens.
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/**
|
||||
* Tab 'Categories' expand/close effect.
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/**
|
||||
* Clipboard functions
|
||||
*
|
||||
* Dependencies:
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
*/
|
||||
|
||||
$(function () {
|
||||
|
||||
const IMG_SCOPE = '#main > div.row:first-child > div:first-child';
|
||||
|
||||
if ($(`${IMG_SCOPE} img`).length <= 0) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/**
|
||||
* Count page views form GA or local cache file.
|
||||
*
|
||||
* Dependencies:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/**
|
||||
Safari doesn't support CSS `scroll-behavior: smooth`,
|
||||
so here is a compatible solution for all browser to smooth scrolling
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@ layout: compress
|
|||
---
|
||||
|
||||
const resource = [
|
||||
|
||||
/* --- CSS --- */
|
||||
'{{ "/assets/css/style.css" | relative_url }}',
|
||||
|
||||
|
@ -16,6 +15,7 @@ const resource = [
|
|||
/* --- HTML --- */
|
||||
'{{ "/index.html" | relative_url }}',
|
||||
'{{ "/404.html" | relative_url }}',
|
||||
|
||||
{% for tab in site.tabs %}
|
||||
'{{ tab.url | relative_url }}',
|
||||
{% endfor %}
|
||||
|
@ -25,7 +25,6 @@ const resource = [
|
|||
{% for file in cache_list %}
|
||||
'{{ file.path | relative_url }}'{%- unless forloop.last -%},{%- endunless -%}
|
||||
{% endfor %}
|
||||
|
||||
];
|
||||
|
||||
/* The request url with below domain will be cached */
|
||||
|
|
|
@ -32,8 +32,7 @@ if ('serviceWorker' in navigator) {
|
|||
}
|
||||
$notification.toast('hide');
|
||||
});
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
let refreshing = false;
|
||||
|
||||
|
@ -45,3 +44,4 @@ if ('serviceWorker' in navigator) {
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -87,3 +87,4 @@ self.addEventListener('fetch', event => {
|
|||
})
|
||||
);
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue