Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/frontend-layers/get-year

Insert current year into any HTML element by CDN script
https://github.com/frontend-layers/get-year

Last synced: 3 days ago
JSON representation

Insert current year into any HTML element by CDN script

Awesome Lists containing this project

README

        

# Get Year

Insert current year into any HTML element by CDN script

---
## Features

- Works instantly via CDN tag
- Config through `data-get-year` attribute
- Supports default `.current-year` class

---

## Usage

```html
<span class="current-year"></span>
<script src="https://cdn.jsdelivr.net/npm/get-year">
```

## Extended Configuration

```html


```

**Parameters:**

`data-get-year="[selector]"`

- Optional parameter: CSS selector to target other elements
- If empty, updates the element itself

---

### Example Implementation

```html

Get Year Example


Copyright ©

```

---

## License

MIT License

---

## Contributing

Contributions welcome! Feel free to:

- Fork the repository
- Submit pull requests
- File issues
- Suggest improvements