func CleanFacebookURI(h jqeventrouter.Handler) jqeventrouter.Handler {
	return jqeventrouter.HandlerFunc(func(event *jquery.Event, ui *js.Object, p url.Values) bool {
		uri := util.JqmTargetURI(ui).String()
		// Having '#_=_' in the URL can mess up our routing
		if strings.HasSuffix(uri, "#_=_") {
			uri = strings.TrimSuffix(uri, "#_=_")
			ui.Set("toPage", uri)
		}
		// TODO: Can we change the hash without refreshing the page?
		// It's also ugly, so remove it from the visible location bar
		// location := js.Global.Get("location")
		// href := location.Get("href").String()
		// if strings.HasSuffix(href, "#_=_") {
		//	location.Set("href", strings.TrimSuffix(href, "#_=_"))
		// }
		return h.HandleEvent(event, ui, p)
	})
}
// CleanFacebookURI cleans up the URL aftr a redirect from a Facebook login
CleanFacebookURI cleans up the URL aftr a redirect from a Facebook login
// CleanFacebookURI cleans up the URL aftr a redirect from a Facebook login
func CleanFacebookURI(h jqeventrouter.Handler) jqeventrouter.Handler {
	return jqeventrouter.HandlerFunc(func(event *jquery.Event, ui *js.Object, p url.Values) bool {
		uri := util.JqmTargetURI(ui).String()
		if strings.HasSuffix(uri, "#_=_") {
			uri = strings.TrimSuffix(uri, "#_=_")
			ui.Set("toPage", uri)
		}
		return h.HandleEvent(event, ui, p)
	})
}
func CleanFacebookURI ( h jqeventrouter . Handler ) jqeventrouter . Handler { return jqeventrouter . HandlerFunc ( func ( event * jquery . Event , ui * js . Object , p url . Values ) bool { uri := util . JqmTargetURI ( ui ) . String ( ) if strings . HasSuffix ( uri , " " ) { uri = strings . TrimSuffix ( uri , " " ) ui . Set ( " " , uri ) } return h . HandleEvent ( event , ui , p ) } ) }
CleanFacebookURI cleans up the URL aftr a redirect from a Facebook login
CleanFacebookURI cleans up the URL aftr a redirect from a Facebook login
// Having '#_=_' in the URL can mess up our routing // TODO: Can we change the hash without refreshing the page? // It's also ugly, so remove it from the visible location bar // location := js.Global.Get("location") // href := location.Get("href").String() // if strings.HasSuffix(href, "#_=_") { //	location.Set("href", strings.TrimSuffix(href, "#_=_")) // }