Zackio
11/25/2013 - 8:41 PM

Javascipt: Insert string into url

Javascipt: Insert string into url

var lastSlash = url.lastIndexOf('/') +1;
var firstSect =  url.substring( 0, lastSlash );
var endSect = url.substring( lastSlash, url.length );
url = firstSect + 'full_screen_preview/' + endSect;