Skip to content

Emrio/auto-redirection

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

auto-redirection version license

A pure JS, easy redirection for your website !

License | Github | Author | Site

This readme is available in : French

Installation

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>

Basic usage

<!-- 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>

Contributing

Big thank to TheEmrio for the new redirection system

Feel free to contribute to the project!

Please follow the guidelines when contributing!

To do

The following features are not implemented yet:

  • display the time before the redirection on the page

License

This project is licensed under the MIT License.

About

Easy redirection for basic website.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • JavaScript 73.1%
  • HTML 26.9%