A pure JS, easy redirection for your website !
License | Github | Author | Site
This readme is available in : French
In your project, in head of your html simply type :
<script src="your_project_folder/src/js/redirection.js"></script>
<!-- or -->
<script src="https://gist.github.com/Sukaato/c3050455adb3483df6a52af9b9af88da.js"></script>
<!-- Redirecting to /lang/index.html -->
<script>new Redirection("fr-FR", "en-US").redirect("index.html")</script>
<!-- or redirecting to /lang/index.html after 2 seconds -->
<script>new Redirection(["fr-FR", "en-US"]).redirect("index.html", 2)</script>
<!-- or redirecting to https://github.com/Sukaato -->
<script>new Redirection().redirect("https://github.com/Sukaato")</script>
<!-- or redirecting to https://github.com/Sukaato after 2 seconds -->
<script>new Redirection().redirect("https://github.com/Sukaato", 2)</script>
Big thank to TheEmrio for the new redirection system
Feel free to contribute to the project!
Please follow the guidelines when contributing!
The following features are not implemented yet:
- display the time before the redirection on the page
This project is licensed under the MIT License.