Skip to content

Commit

Permalink
clear notice message so it doesn't appear on refreshes and shared links
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Mayer committed May 8, 2019
1 parent 27a976c commit 6bb8d79
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions public/application.js
@@ -1,4 +1,17 @@
$(document).ready(function() {
// remove the url params like notice=message so they don't stick around
window.history.replaceState(
"object or string",
"Coverband",
window.location.pathname +
window.location.href
.substring(window.location.href.lastIndexOf("/") + 1)
.split("?")[0]
);
$(".notice")
.delay(3000)
.fadeOut("slow");

$(".del").click(function() {
if (!confirm("Do you want to delete")) {
return false;
Expand Down

0 comments on commit 6bb8d79

Please sign in to comment.