forked from External/greenlight
		
	Fixed issue with return to cookie (#828)
This commit is contained in:
		
				
					committed by
					
						
						Jesus Federico
					
				
			
			
				
	
			
			
			
						parent
						
							49def8f405
						
					
				
				
					commit
					b9dcaa1b18
				
			@@ -17,7 +17,9 @@
 | 
				
			|||||||
$(document).on('turbolinks:load', function(){
 | 
					$(document).on('turbolinks:load', function(){
 | 
				
			||||||
  // Stores the current url when the user clicks the sign in button
 | 
					  // Stores the current url when the user clicks the sign in button
 | 
				
			||||||
  $(".sign-in-button").click(function(){
 | 
					  $(".sign-in-button").click(function(){
 | 
				
			||||||
    var url = [location.protocol, '//', location.host, location.pathname].join('');
 | 
					    var url = location.href
 | 
				
			||||||
 | 
					    // Add the slash at the end if it's missing
 | 
				
			||||||
 | 
					    url += url.endsWith("/") ? "" : "/"
 | 
				
			||||||
    document.cookie ="return_to=" + url
 | 
					    document.cookie ="return_to=" + url
 | 
				
			||||||
  })
 | 
					  })
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user