[quote=Q-Doth]siang all..
bisa minta js mentah ngga ??
lagi ada proyek pembuatan fs nih..
[/quote]
ne bro
[spoiler] //BAGIAN A
//onload handler
function onProfileLoad() {
//addboxes here
//BAGIAN B
}
if (!attachOnLoadHandler(function(){onProfileLoad()})) window.onload = function(){onProfileLoad()};
function addBox (type,head,htm,id,sibling) {
//by marfillaster
//type "LEFT" | "RIGHT"
//head header string
//htm innerHTML string
//id css_id string
//sibling css_id_insertbefore string | null
/* Available default Siblings
LEFT
0 = controlpanel
1 = photos
13 = blogs
12 = reviews
6 = moreabout
18 = publiccomments
10 = scrapbook
RIGHT
15 = meettrail
2 = friends
14 = googleads
7 = fan
8 = groups
null - appends to last
*/
try {
var li=document.createElement("li");
} catch(e) {
var li=document.createElement("<li>");
}
if(type=="LEFT") {
var ul=document.getElementById("0").parentNode.parentNode;
htm="<div class='boxcontent'>"+htm+"</div>";
}
else var ul=document.getElementById("2").parentNode.parentNode;
li.innerHTML="<div id='"+id+"' class='commonbox "+id+"'>"+
"<h2>"+head+"</h2>"+
"<div id='content_"+id+"'>"+
htm+
"</div>"+
"</div>";
if(sibling==null) ul.appendChild(li);
else {
sibling=document.getElementById(sibling).parentNode;
ul.insertBefore(li,sibling);
}
}
//BAGIAN C
// VISITOR'S ALBUM
VA = {};
(function() {
VA = {
info: {
album: null
},
regexp: {
album: /id="photogallery">([\S\s]*?)<\/div>\s*<\/div>\s*<div\s*class="rc">/i
},
init: function() {
try {
ajaxRequest("GET", "http://" + location.hostname + "/viewphotos.php?a=0&uid=" + pageViewerID , true, null, VA.viewer, null);
} catch(e) {}
},
viewer: function(myfriend) {
if (myfriend.replace(/^\s*|\s*$/g, "") === "") {
alert("Error: Unable to parse user details!");
return;
} else if (myfriend) {
for (var val in VA.info) {
try {
VA.info[val] = new RegExp(VA.regexp[val]).exec(myfriend)[1].replace(/^(\d)$/, "0$1");
} catch(e) {
VA.info[val] = "";
}
}
visitoralbum="<div class='flogrid75'>"+VA.info.album.replace(/photothumb/gi,"flogriditem").replace(/m.jpg/gi,"t.jpg");
addBox("LEFT","Foto-Foto Hasil Nyolong",visitoralbum,"visitoralbum","0");
}
}
};
})();
//comment scanner by styker17
function stykercommentscan(){
var scanner = document.getElementById("content_18").innerHTML;
var ITACconfirm = scanner.search(""+pageViewerFName+"</a");
if(ITACconfirm < 0) {
var r=confirm("hi, "+pageViewerFName+". You've been here in my page for about a couple of minutes." + '\n' + "And it seems like you don't have any recent comment for me yet. " + '\n' + " " + '\n' + "Would you like to drop some comment for me now?");
if (r==true)
{
window.location="http://www.friendster.com/comments.php?uid=http://profiles.friendster.com/45818890";
}
else
{
alert("Well then, thx for comming, "+pageViewerFName+"!! " + '\n' + "Enjoy your stay!!" + '\n' + " " + '\n' + "Drop some comment before you go. ok?");
}
}
//--------------------------------------------floating
var currentTime = new Date();
var hours = currentTime.getHours();
var minutes = currentTime.getMinutes();
if (minutes < 10)
minutes = "0" + minutes;
var jamenit = (hours + ":" + minutes + " ");
if(hours > 11){
var ampm = ("PM");
} else {
var ampm = ("AM");
}
dude="<div id='divStayTopLeft' style='position:absolute;z-index:50;'><b><font color='white'>Hi..</b></font><br><div id='mainpic'></div><br><img src='http://i293.photobucket.com/albums/mm49/lion_kakkoi/1111.jpg'><br><b><font color='white'>Logged in as</font> <font color='white'> "+pageViewerFName+" </font></b><br>"+
"<b><font color='white'>Last visit</font><font color='white'>: Today "+jamenit+ampm+" </font></b><br></div>";
flow=document.getElementById('flo_wrapper');
river=document.createElement("div");
river.innerHTML=dude;
flow.parentNode.insertBefore(river,flow);
//in this part you can change it into "frombottom" or "fromtop"
var verticalpos="fromtop"
function BoyantDiv()
{
var startX = 15;
var startY = 100;
function ml(id)
{
if (document.getElementById)
{
var wek=document.getElementById(id);
}
else if (document.all)
{
var wek=document.all[id];
}
else
{
var wek=document.layers[id];
}
if(document.layers)
{
wek.style=wek;
}
wek.sP = function(x,y) {shino(x,y);};
function shino(x,y)
{
wek.style.left=x;
wek.style.top=y;
}
wek.x = startX;
if (verticalpos=="fromtop")
{
wek.y = startY;
}
else{
if (navigator.appName.indexOf("Netscape") != -1)
{
wek.y = pageYOffset + innerHeight;
}
else
{
wek.y = document.body.scrollTop + document.body.clientHeight;
}
wek.y -= startY;
}
return wek;
}
window.stayTopLeft = function () {boyant();};
function boyant()
{
if (verticalpos=="fromtop"){
if (navigator.appName.indexOf("Netscape") != -1)
{
var tenten = pageYOffset;
}
else
{
var tenten = document.body.scrollTop;
}
ftlObj.y += (tenten + startY - ftlObj.y)/8;
}
else{
if (navigator.appName.indexOf("Netscape") != -1)
{
var tenten = pageYOffset + innerHeight;
}
else
{
var tenten = document.body.scrollTop + document.body.clientHeight;
}
ftlObj.y += (tenten - startY - ftlObj.y)/8;
}
ftlObj.sP(ftlObj.x, ftlObj.y);
wakoko=setTimeout("stayTopLeft()", 50);
}
ftlObj = ml("divStayTopLeft");
stayTopLeft();
}
BoyantDiv();
[/spoiler]