Advertisement
Guest User

Untitled

a guest
Oct 17th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. <script type="text/javascript">
  2.  
  3. function capitalizeFirstLetter(string) {
  4. return string.charAt(0).toUpperCase() + string.slice(1);
  5. }
  6.  
  7. function urldecode(url) {
  8. return capitalizeFirstLetter(decodeURIComponent(url.replace(/\+/g, " ")));
  9. }
  10.  
  11.  
  12.  
  13. $(function () {
  14. var utm='utm_term';
  15. if( window.location.toString().indexOf(utm +'=') != -1) {
  16. var term_utm=(window.location.toString().substr(window.location.toString().indexOf(utm+'=')+ utm.length+1,500))
  17. if( term_utm.indexOf('&') != -1) {
  18. term_utm=(term_utm.substr(0,term_utm.indexOf('&')));
  19. }
  20. $('#rec33152182 .t-descr span').first().html(urldecode(term_utm) + '.');
  21. }
  22. });
  23. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement