Skip to content

Instantly share code, notes, and snippets.

@jsam
Last active August 29, 2015 13:56
Show Gist options
  • Save jsam/8942287 to your computer and use it in GitHub Desktop.
Save jsam/8942287 to your computer and use it in GitHub Desktop.
e
// Znaci link ti mora izgledati "https://halycon.tv/public/" + $rootScope.channel_owner + "/?fullscreen=true"
// i onda procitas parametar iz url-a na sljedeci nacin:
// var fullscreen = getParameterByName('fullscreen');
// if (fullscreen)
// show_fullscreen()
function getParameterByName(name) {
name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
results = regex.exec(location.search);
return results == null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment