Return to Snippet

Revision: 17639
at September 11, 2009 05:29 by joe-bbb


Initial Code
function get_settings() {
	var doc_location = document.location.href;
	var url_strip = new RegExp("http:\/\/.*\/");
	var base_url = url_strip.exec(doc_location);

	var settings = { "base_url" : base_url }

	return settings;
}

function (){
	settings = get_settings();
	$(function(){
	     console.log(settings.base_url);
	});
}

Initial URL

                                

Initial Description

                                

Initial Title
settings object containing base_url

Initial Tags
object

Initial Language
JavaScript