Skip to content

Year updater with js #94

Description

@SamuelWorld20

Is your feature request related to a problem? Please describe.

I noticed in the footer the year 2023 is still there, then I checked the code and found out the year was just inputted there manually

Describe the solution you'd like

So I discovered we can use a JavaScript code to make it automatic (i.e input the year it's self)

Describe alternatives you've considered

Here is how I suggest the code to be

<div class="copyright"> &copy; <script>document.write(new Date().getFullYear());</script> Algorithmia SE 🌍. All Rights Reserved </div>

Or it can be written in the js file separately this way

var currentYearElement = document.getElementById('currentYear'); if (currentYearElement) { currentYearElement.innerText = new Date().getFullYear(); }

Then the html file should have this

<div class="copyright"> &copy; <span id="currentYear"></span> Algorithmia SE 🌍. All Rights Reserved </div>

Additional context

Screenshot (253)
Screenshot (252)

I hope you consider my request

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions