Skip to content

Instantly share code, notes, and snippets.

View daifu's full-sized avatar

Daifu Richard Ye daifu

View GitHub Profile
@daifu
daifu / app.js
Created May 31, 2013 21:41 — forked from johnkpaul/app.js
//in your application, rather than using window.location to get the current url
App.getLocation = function(){
return window.location.protocol + '//' + window.location.host
+ '/' + Backbone.history.options.root + Backbone.history.getFragment()
}