Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/frontend-layers/get-year
- Owner: Frontend-Layers
- License: mit
- Created: 2025-01-09T21:03:45.000Z (15 days ago)
- Default Branch: main
- Last Pushed: 2025-01-09T21:04:49.000Z (15 days ago)
- Last Synced: 2025-01-09T22:21:34.883Z (14 days ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
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