Last active
May 28, 2018 10:55
-
-
Save savayer/b2de0566eda75437d533cf80b0399e4c to your computer and use it in GitHub Desktop.
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
//decode uri | |
var getUrlParameter = function getUrlParameter(sParam) { | |
var sPageURL = decodeURIComponent(window.location.search.substring(1)), | |
sURLVariables = sPageURL.split("&"), | |
sParameterName, | |
i; | |
for (i = 0; i < sURLVariables.length; i++) { | |
sParameterName = sURLVariables[i].split("="); | |
if (sParameterName[0] === sParam) { | |
return sParameterName[1] === undefined | |
? "" | |
: sParameterName[1].replace("/", ""); | |
} | |
} | |
return ""; | |
}; | |
var track = getUrlParameter("track"); | |
var subid = getUrlParameter("subid"); | |
var znak = getUrlParameter("znak_name"); | |
var znakText = document.querySelectorAll(".znak"); | |
for (var i = 0; i < znakText.length; i++) { | |
znakText[i].innerText = znak; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment