-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Team Code implemented with Copy and Get by URL Honorary Member fixed (Leader that leaves removes the HM) Added an About Box Better style and Menu Bar
- Loading branch information
Showing
7 changed files
with
270 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
define([], function() | ||
{ | ||
|
||
/* Source : http://stackoverflow.com/questions/901115/how-can-i-get-query-string-values-in-javascript */ | ||
function getParameterByName(name, url) { | ||
if (!url) { | ||
url = window.location.href; | ||
} | ||
name = name.replace(/[\[\]]/g, "\\$&"); | ||
var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"), | ||
results = regex.exec(url); | ||
if (!results) return null; | ||
if (!results[2]) return ''; | ||
return decodeURIComponent(results[2].replace(/\+/g, " ")); | ||
} | ||
|
||
/* Source : http://stackoverflow.com/questions/13063838/add-change-parameter-of-url-and-redirect-to-the-new-url */ | ||
function setGetParameter(paramName, paramValue) | ||
{ | ||
var url = window.location.href; | ||
var hash = location.hash; | ||
url = url.replace(hash, ''); | ||
if (url.indexOf(paramName + "=") >= 0) | ||
{ | ||
var prefix = url.substring(0, url.indexOf(paramName)); | ||
var suffix = url.substring(url.indexOf(paramName)); | ||
suffix = suffix.substring(suffix.indexOf("=") + 1); | ||
suffix = (suffix.indexOf("&") >= 0) ? suffix.substring(suffix.indexOf("&")) : ""; | ||
url = prefix + paramName + "=" + paramValue + suffix; | ||
} | ||
else | ||
{ | ||
if (url.indexOf("?") < 0) | ||
url += "?" + paramName + "=" + paramValue; | ||
else | ||
url += "&" + paramName + "=" + paramValue; | ||
} | ||
return url + hash; | ||
} | ||
|
||
return { | ||
getTeamCodeFromUrl: function() { return getParameterByName('teamcode'); }, | ||
getUrlWithTeamCode: function(teamCode) { return setGetParameter('teamcode', teamCode); } | ||
} | ||
}); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.