Please Don't Go is a JavaScript plugin used for changing the title and the favicon of the website when a visitor navigates to another tab in the window.
Please Don't Go is available on Bower and GitHub.
bower install pleaseDontGo
<script type="text/javascript" src="path/to/bower_components/pleaseDontGo/dist/pleaseDontGo.min.js"></script>
Download the script or the minified version in the dist
folder.
<script type="text/javascript" src="path/to/pleaseDontGo.min.js"></script>
The plugin, which does not depend on jQuery, will look for the link element with rel="icon"
.
<link rel="icon" type="image/x-icon" href="path/to/favicon.ico">
<script type="text/javascript">
pleaseDontGo.init({
newTitle: 'Please Don\'t Go',
newFavicon: '/assets/images/favicon-dontgo.ico',
timeout: 2000
});
</script>
The plugin also allows you to set the new title, the path to the new favicon, and the timeout delay for switching them around.
1.0
- Initial release
Please submit any issues here.
Please Don't Go is licensed under the MIT License.