Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function getCookie(cname) {
- var name = cname + "=";
- var ca = document.cookie.split(';');
- for(var i=0; i<ca.length; i++) {
- var c = ca[i];
- while (c.charAt(0)==' ') c = c.substring(1);
- if (c.indexOf(name) == 0) return c.substring(name.length,c.length);
- }
- return "anonymous";
- }
- function __init__() {
- var viewer = getCookie('id.chatango.com');
- val = 0;
- res = ["halo {user} :)", "selamat datang {user} :D", "dasar {user} tukang ngintip :P"];
- intro = res[Math.floor((Math.random() * res.length))].replace("{user}", viewer);
- vid = document.createElement("audio");
- vid.src = songs[val][0];
- vid.autoplay = true;
- vid.onended = function() {
- val = val + 1;
- if (val >= songs.length) {
- val = 0;
- }
- vid.src = songs[val][0];
- title(intro , songs[val][1]);
- }
- title(intro , songs[val][1]);
- }
- __init__()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement