Skip to content

Commit

Permalink
dev: We update copyright year automatically
Browse files Browse the repository at this point in the history
  • Loading branch information
lscambo13 committed Feb 17, 2024
1 parent 2c55e8b commit 1e6278a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ <h1 id="widget-2" class="widget-slide brush-text-style-1 has-shadow">Welcome</h1
<li id="help-btn"><a href="/pages/help/index.html" title="Features" tabindex="4">Help</a></li>
</ul>
<ul>
<li><a href="https://github.com/lscambo13" title="&copy; 2023 lscambo13" tabindex="4">
<li><a id="copyright-text" href="https://github.com/lscambo13" title="&copy; 2023 lscambo13" tabindex="4">
&copy; 2023 lscambo13</a></li>
</ul>
</footer>
Expand Down
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ import { isTouchDevice } from './js_modules/utils/isTouchDevice.js';
import { enableSubmitButton } from './js_modules/utils/enableSubmitButton.js';
import { genericAlert } from './js_modules/utils/alertDialog.js';
import { parseDl } from './js_modules/dl.js';
import { setCopyrightDate } from './js_modules/utils/setCopyrightDate.js';

const bottomFilmRollContainer = document.getElementById('wallpapers');
const wrap = document.getElementById('wrap');
Expand Down Expand Up @@ -385,7 +386,7 @@ const postOnboarding = () => {

document.addEventListener('DOMContentLoaded', () => {
// preOnboarding();

setCopyrightDate();
if (localStorage.getItem('onBoarding') == '1') {
postOnboarding();
console.log('Already onboard.');
Expand Down
6 changes: 6 additions & 0 deletions js_modules/utils/setCopyrightDate.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export const setCopyrightDate = () => {
const year = new Date().getFullYear();
const e = document.getElementById('copyright-text');
e.title = `\u00A9 ${year} lscambo13`;
e.innerText = `\u00A9 ${year} lscambo13`;
};

0 comments on commit 1e6278a

Please sign in to comment.