Skip to content

Instantly share code, notes, and snippets.

@tolmasky
Created February 3, 2010 21:40
Show Gist options
  • Select an option

  • Save tolmasky/294056 to your computer and use it in GitHub Desktop.

Select an option

Save tolmasky/294056 to your computer and use it in GitHub Desktop.
cwd: function()
{
var DOMBaseElement = document.getElementsByTagName("base")[0];
if (DOMBaseElement)
return FILE.dirname(DOMBaseElement.getAttribute("href"));
return FILE.dirname(window.location.pathname);
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment