[quote=oblack]
kunti
mana niy quick commentnya
[/quote]
nih kodenya.... taruh di ekternal js......
[spoiler]/*
* Name: Friendster Quick Testimonial Box
* version: 4.0.2
* Copyright (c) 2007-2008 FeRuZZ <http://profiles.friendster.com/feruzz>
* Support:
http://tempek.net78.net
* Updates: September 1, 2008
* Cross-Browser Compatibility
*/
//-----------------------------
/*global testi, document, window, location, navigator, event*/
(function () {
testi = {
/* private property */
$doc: document,
$win: window,
$linker: [],
$max: 5000,
$time: 2000,
$timer: 5,
$speed: 10,
$locHost: location.hostname,
$ie: /*@cc_on!@*/false,
$evtbs: true,
$onsc: false,
$fader: 1000,
$dir: "http://i94.photobucket.com/albums/l116/feruzz/",
$dircss: "http://www.stormpages.com/",
details: {
photo: null,
name: null
},
regexp: {
photo: /imgblock200"><a[\S\s]*?>([\S\s]*?)<\/div>/i,
name: /controlpanel_header">([\S\s]*?)<a[\S\s]*?><\/a><a\s*name="controlpanel/i
},
Style: {
"postimage": ["bold", "italic", "underline", "line-through", "left", "center", "right"]
},
addEvent: function (obj, type, fn) {
if (typeof obj === "string") {
obj = testi.$(obj);
}
if (!obj) {
return;
}
if (obj.addEventListener) {
obj.addEventListener(type, fn, false);
} else if (obj.attachEvent) {
obj["e" + type + fn] = fn;
obj[type + fn] = function () {
obj["e" + type + fn](testi.$win.event);
};
obj.attachEvent("on" + type, obj[type + fn]);
} else {
obj["on" + type] = obj["e" + type + fn];
}
},
removeEvent: function (obj, type, fn) {
if (typeof obj === "string") {
obj = testi.$(obj);
}
if (!obj) {
return;
}
try {
obj.removeEventListener(type, fn, false);
} catch (e) {
try {
obj.detachEvent("on" + type, fn);
} catch (er) {
obj["on" + type] = null;
}
}
},
cancelEvent: function (e) {
e = e ? e : testi.$win.event;
if (e.stopPropagation) {
e.stopPropagation();
}
if (e.preventDefault) {
e.preventDefault();
}
e.cancelBubble = true;
e.cancel = true;
e.returnValue = false;
return false;
},
init: function () {
/*global pageOwnerFName, pageViewerID, pageOwnerID*/
var mf = "no", cs = testi.$("controlPanelButtons").innerHTML,
sf = cs.search(/Add as Friend/), qt, ol, k, l, x, y, cl, r, s, ob;
if (sf > 0) {
mf = "yes";
}
if (pageViewerID !== "" && mf === "no") {
qt = [];
ol = testi.$doc.links;
try {
for (x = 0, y = ol.length; x < y; x += 1) {
if (ol[x].innerHTML.match(/Post a Comment|Add Comment/)) {
qt.push(ol[x]);
}
}
testi.$linker = qt;
cl = qt.length;
try {
for (r = 0, s = cl; r < s; r += 1) {
ob = function ob() {
qt[r].href = "#quicktesti";
qt[r].onclick = function () {
testi.openForm();
};
}();
}
} catch (e) {}
if (![].push) {
Array.prototype.push = function () {
for (k in arguments) {
if (Object.hasOwnProperty.call(arguments, k)) {
this[this.length] = arguments[k];
}
}
return this.length;
};
}
testi.exCSS(testi.$dircss + "tempek/script/komen.css");
return ob;
} catch (er) {
testi.$linker = null;
}
}
},
openForm: function () {
var cf = false, smlist, smdiv, sm, hs, mdash, c, x, sty;
for (x in testi.$linker) {
if (Object.hasOwnProperty.call(testi.$linker, x)) {
testi.$linker[x].onclick = testi.$linker[x].href = "#quicktesti";
}
}
try {
testi.$doc.execCommand("BackgroundImageCache", false, true);
} catch (errs) {
cf = true;
}
smlist = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21",
"22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", "43",
"44", "45", "46", "47", "48", "52", "53", "62", "63", "64", "65", "66", "67", "68", "69", "70", "71", "76", "77", "78"];
/*global smileys*/
smileys = [];
for (sm in smlist) {
if (Object.hasOwnProperty.call(smlist, sm)) {
smileys[smlist[sm]] = "http://us.i1.yimg.com/us.yimg.com/i/mesg/emoticons7/" + smlist[sm] + ".gif";
}
}
smdiv = testi.$doc.createElement("div");
smdiv.className = "smileysdiv";
testi.changeText(smdiv, "");
for (sm in smlist) {
if (Object.hasOwnProperty.call(smlist, sm)) {
smdiv.innerHTML += "<span class=\"smbox\"><a href=\"#null\" onclick=\"testi.rtxt('::" + smlist[sm] + "::', testi.$('komen')); return false;\">" +
"<img class=\"smiley\" title=\"" + smlist[sm] + "\" src=\"" + smileys[smlist[sm]] + "\"></a></span>";
}
}
hs = "&nb" + "sp;";
mdash = "&md" + "ash;";
c = "<div class=\"quicktestiprev\">";
c += "<form id=\"testimonial_form_undoable\" name=\"testimonial_form\" method=\"post\" onsubmit=\"return checkFormSubmit('testimonial_form');\">";
c += "<div id=\"commentprevbox\"><div id=\"prevComment\"></div></div>";
c += "<input type=\"hidden\" name=\"testimonial_firstname\" value=\"" + pageOwnerFName + "\">";
c += "<input type=\"hidden\" name=\"testimonial_uid\" value=\"" + pageViewerID + "\">";
c += "<input type=\"hidden\" name=\"_submitted\" value=\"1\">";
c += "<table class=\"formtable\" cellpadding=\"0\" cellspacing=\"0\"><tr>";
c += "<td class=\"field\"><span class=\"q\">To:</span></td><td class=\"value\"><div id=\"outputphoto\"></div><div align=\"center\" id=\"outputname\"></div></td>";
c += "<td class=\"value\"><span class=\"q\">Friendster" + hs + "ID" + hs + ":</span>" + hs + "<input type=\"text\" id=\"txtsearchfs\" value=\"" + pageOwnerID + "\" onkeypress=\"return testi.numkey(event);testi.showPress(event);\" onkeyup=\"testi.mainphoto();\" onblur=\"testi.mainphoto();\" maxlength=\"9\"></td>";
c += "</tr></table>";
c += "<table class=\"formtable\" cellpadding=\"0\" cellspacing=\"0\"><tr>";
for (sty in testi.Style) {
if (Object.hasOwnProperty.call(testi.Style, sty)) {
c += "<td><a href=\"#null\"><img src=\"" + testi.$dir + "testi/bold.gif\" name=\"bold\" onclick=\"testi.insertTag(testi.$doc.testimonial_form.komen, '<span style=font-weight:" + testi.Style[sty][0] + ">','</span>');return false;\" class=\"" + sty + "\" title=\"Bold\"></a></td>";
c += "<td><a href=\"#null\"><img src=\"" + testi.$dir + "testi/italics.gif\" name=\"italic\" onclick=\"testi.insertTag(testi.$doc.testimonial_form.komen, '<span style=font-style:" + testi.Style[sty][1] + ">','</span>');return false;\" class=\"" + sty + "\" title=\"Italic\"></a></td>";
c += "<td><a href=\"#null\"><img src=\"" + testi.$dir + "testi/underline.gif\" name=\"underline\" onclick=\"testi.insertTag(testi.$doc.testimonial_form.komen, '<span style=text-decoration:" + testi.Style[sty][2] + ">','</span>');return false;\" class=\"" + sty + "\" title=\"Underline\"></a></td>";
c += "<td><a href=\"#null\"><img src=\"" + testi.$dir + "testi/superscript.gif\" name=\"superscript\" onclick=\"testi.insertTag(testi.$doc.testimonial_form.komen, '<big>','</big>');return false;\" class=\"" + sty + "\" title=\"Superscript\"></a></td>";
c += "<td><a href=\"#null\"><img src=\"" + testi.$dir + "testi/subscript.gif\" name=\"subscript\" onclick=\"testi.insertTag(testi.$doc.testimonial_form.komen, '<small>','</small>');return false;\" class=\"" + sty + "\" title=\"Subscript\"></a></td>";
c += "<td><a href=\"#null\"><img src=\"" + testi.$dir + "testi/strikethrough.gif\" name=\"strikethrough\" onclick=\"testi.insertTag(testi.$doc.testimonial_form.komen, '<span style=text-decoration:" + testi.Style[sty][3] + ">','</span>');return false;\" class=\"" + sty + "\" title=\"Strikethrough\"></a></td>";
c += "<td><a href=\"#null\"><img src=\"" + testi.$dir + "testi/justify_left.gif\" name=\"left\" onclick=\"testi.insertTag(testi.$doc.testimonial_form.komen, '<div style=text-align:" + testi.Style[sty][4] + ">','</div>');return false;\" class=\"" + sty + "\" title=\"Justifyleft\"></a></td>";
c += "<td><a href=\"#null\"><img src=\"" + testi.$dir + "testi/justify_center.gif\" name=\"center\" onclick=\"testi.insertTag(testi.$doc.testimonial_form.komen, '<div style=text-align:" + testi.Style[sty][5] + ">','</div>');return false;\" class=\"" + sty + "\" title=\"Justifycenter\"></a></td>";
c += "<td><a href=\"#null\"><img src=\"" + testi.$dir + "testi/justify_right.gif\" name=\"right\" onclick=\"testi.insertTag(testi.$doc.testimonial_form.komen, '<div style=text-align:" + testi.Style[sty][6] + ">','</div>');return false;\" class=\"" + sty + "\" title=\"Justifyright\"></a></td>";
c += "<td><a href=\"#null\"><img src=\"" + testi.$dir + "testi/hr.gif\" name=\"horizontalrule\" onclick=\"testi.insertTag(testi.$doc.testimonial_form.komen, '','<hr style=width:100%;height:2px>');return false;\" class=\"" + sty + "\" title=\"Horizontal Rule\"></a></td>";
c += "<td><a href=\"#null\"><img src=\"" + testi.$dir + "testi/undo.gif\" name=\"Undo\" onfocus=\"this.blur();\" onclick=\"testi.undo(this);\" id=\"Undo\" class=\"" + sty + "\" title=\"Undo (CTRL+Z)\"></a></td>";
c += "<td><a href=\"#null\"><img src=\"" + testi.$dir + "testi/redo.gif\" name=\"Redo\" onfocus=\"this.blur();\" onclick=\"testi.redo(this);\" id=\"Redo\" class=\"" + sty + "\" title=\"Redo (CTRL+Y)\"></a></td>";
}
}
c += "<table class=\"formtable\" cellpadding=\"0\" cellspacing=\"0\"><tr><td>";
c += "<select name=\"fnt_size\" id=\"fnt_size\" onchange=\"testi.insertTag(testi.$doc.testimonial_form.komen, '<span style=font-size:' + testi.$('testimonial_form').fnt_size.options[fnt_size.selectedIndex].value + '>', '</span>'); testi.$('testimonial_form').fnt_size.options[0].selected=true\">";
c += "<option value=\"\">Font Size";
c += "<option value=\"10px\">Size 1";
c += "<option value=\"12px\">Size 2";
c += "<option value=\"14px\">Size 3";
c += "<option value=\"16px\">Size 4";
c += "<option value=\"18px\">Size 5";
c += "<option value=\"20px\">Size 6";
c += "<option value=\"22px\">Size 7";
c += "</select></td><td>";
c += "<select name=\"fnt_face\" id=\"fnt_face\" onchange=\"testi.insertTag(testi.$doc.testimonial_form.komen, '<span style=font-family:' + testi.$('testimonial_form').fnt_face.options[fnt_face.selectedIndex].value + '>', '</span>'); testi.$('testimonial_form').fnt_face.options[0].selected=true\">";
c += "<option value=\"\">Font";
c += "<option value=\"Verdana\" style=\"font-family:verdana\">verdana";
c += "<option value=\"Monospace\" style=\"font-family:monospace\">monospace";
c += "<option value=\"Century\" style=\"font-family:century\">century";
c += "<option value=\"Courier New\" style=\"font-family:courier new; courier\">courier new";
c += "</select>";
c += "<td id=\"keyTargetheader\" colspan=\"1\">Target:</td>";
c += "<td id=\"keyTarget\" colspan=\"1\">" + mdash + "</td>";
c += "<td id=\"characterheader\" colspan=\"1\">Character:</td>";
c += "<td id=\"character\" colspan=\"1\">" + mdash + "</td>";
c += "</td></tr></table>";
c += "<table class=\"formtable\" cellpadding=\"0\" cellspacing=\"0\"><tr><td class=\"value\">";
c += "<div id=\"textDiv\">";
c += "<textarea id=\"komen\" tabindex=\"4\" name=\"body\" onfocus=\"testi.showPress(event);testi.xbg('komen', '#e5fff3', null);\" onkeypress=\"testi.showPress(event);\" onkeydown=\"testi.livecomprev();testi.it(this, event);testi.cl(testi.$('komen'), testi.$('minputcount'));\" onkeyup=\"testi.livecomprev();testi.cl(testi.$('komen'), testi.$('minputcount'));\" onblur=\"testi.livecomprev();testi.clearCells();testi.xbg('komen', '#ddd', null);\"></textarea>";
c += "<div id=\"handleBottom\" style=\"top:102px;\"></div></div>";
c += "</td></tr></table>";
c += "<table class=\"formtable\" cellpadding=\"0\" cellspacing=\"0\"><tr>";
c += "<td><a href=\"#null\" onclick=\"testi.rform(testi.$('komen'));testi.livecomprev();testi.sendAction();\" class=\"submitButton\"><span style=\"color:#fff\">Submit</span></a></td>";
c += "<td><a href=\"#null\" onclick=\"testi.cf();\" class=\"submitButton\"><span style=\"color:#fff\">Close</span></a></td>";
c += "<td><a href=\"#null\" onclick=\"testi.boxFX('Smileys');\" id=\"SmileyButton\" class=\"submitButton\"><span style=\"color:#fff\">Smileys</span></a></td>";
c += "<td><span class=\"q\">Characters" + hs + "remaining" + hs + "</span><input id=\"minputcount\" readonly maxlength=\"4\" size=\"4\" value=\"" + testi.$max + "\" name=\"inputcount\">" + hs + hs;
c += "<span class=\"q\" id=\"wc\" style=\"color:red\"></span>";
c += "</td></tr></table>";
c += "<div id=\"Smileys\" style=\"width:465px;display:none;\" align=\"center\">" + smdiv.innerHTML + "</div>";
c += "</form></div>";
testi.testiBox("Quick Testimonial", c, "quicktesti", "18", "above");
testi.$win.location.href = "#quicktesti";
testi.mainphoto();
testi.db(testi.$("handleBottom"), null, new testi.Pos(0, 15), new testi.Pos(0, 500), null, testi.doHeight, null, false);
testi.undoredo();
},
anaconda: function (htm) {
var idVal = testi.$("txtsearchfs").value, m, val, ao;
if (testi.trimX(htm) === "") {
try {
throw new Error("Empty xmlresponse! Unable to parse your details!");
} catch (ey) {
testi.$win.alert(ey);
}
return;
} else if (htm) {
for (val in testi.details) {
if (Object.hasOwnProperty.call(testi.details, val)) {
try {
testi.details[val] = new RegExp(testi.regexp[val]).exec(htm)[1];
} catch (e) {
testi.details[val] = "";
}
}
}
ao = [
["outputphoto", testi.details.photo.replace(/<img/g, "<a href=\"http://" + testi.$locHost + "/" + idVal + "\" target=\"_blank\"><img")],
["outputname", "<a href=\"http://" + testi.$locHost + "/" + idVal + "\" target=\"_blank\">" + testi.details.name + "</a>"]
];
for (m in ao) {
if (Object.hasOwnProperty.call(ao, m)) {
testi.rhtm(testi.$(ao[m][0]), ao[m][1]);
}
}
}
},
mainphoto: function () {
if (testi.$("txtsearchfs") !== "") {
var idVal = testi.$("txtsearchfs").value;
if (testi.$win.location.href.indexOf("user.php") !== -1) {
testi.getRequest("http://" + testi.$locHost + "/user.php?uid=" + idVal, true, testi.anaconda, null);
} else {
testi.getRequest("http://" + testi.$locHost + "/" + idVal, true, testi.anaconda, null);
}
}
},
sendAction: function () {
var idVal, tf, cq, pc, ic;
if (testi.$("txtsearchfs").value === "") {
testi.showtibai("Warning", "Please insert Friendster ID!", "warning", 2);
return false;
} else if (testi.$("komen").value === "") {
testi.showtibai("Warning", "Empty comment!", "warning", 2);
return false;
} else {
idVal = testi.$("txtsearchfs").value;
tf = testi.$("testimonial_form");
tf.action = "http://www.friendster.com/testimonials.php?uid=" + idVal + "&action=add";
tf.submit();
testi.changeText(testi.elmsByTag("h2", testi.$("quicktesti"))[0], "Fetching comment...Please wait...");
pc = testi.cElems("div", {
className: "boxcontent",
align: "center"
});
ic = testi.cElems("img", {
src: testi.$dir + "testi/loader1.gif"
});
pc.appendChild(ic);
cq = testi.$("content_quicktesti");
if (cq !== "") {
testi.replace(pc, cq);
}
try {
testi.remove("commentprevbox");
} catch (e) {}
testi.$win.location.href = "#quicktesti";
return true;
}
},
livecomprev: function (e) {
var cv = testi.$("komen").value, rs, r, as, sm, ls, co;
rs = [
[/\r\n|\r|\n/g, "<br/>"],
[/&l/g, "<"],
[/&g/g, ">"],
[/t;/g, ""]
];
for (r in rs) {
if (Object.hasOwnProperty.call(rs, r)) {
cv = cv.replace(rs[r][0], rs[r][1]);
}
}
as = testi.$("komen").value.match(/:
\d+)?::/gim);
if (as) {
for (sm = 0, ls = as.length; sm < ls; sm += 1) {
if (smileys[as[sm].match(/\d+/)[0]] !== "undefined") {
as[sm] = "<img src=\"" + smileys[as[sm].match(/\d+/)[0]] + "\">";
testi.$("komen").value = testi.$("komen").value.replace(/:
\d+)?::/im, as[sm]);
//fixed
cv = cv.replace(/:
\d+)?::/im, as[sm]);
}
}
}
co = testi.$("prevComment");
co = testi.rhtm(co, cv);
},
rform: function (q) {
var ar = arguments.length, os, r, i;
if (ar > 0) {
r = [
[/(&l)(t;\/*)[\x00-\x20]*s[\x00-\x20]*c[\x00-\x20]*r[\x00-\x20]*i[\x00-\x20]*p[\x00-\x20]*t[\x00-\x20]*/g, "$1$2noscript..."],
[/(&l)(t;\/*)[\x00-\x20]*s[\x00-\x20]*t[\x00-\x20]*y[\x00-\x20]*l[\x00-\x20]*e[\x00-\x20]*/g, "$1$2nostyle..."],
[/(<[^>]+[\x00-\x20\"\'])(on|xmlns)[^>]*>/g, "$1>"],
[/([a-z]*)[\x00-\x20]*=[\x00-\x20]*([\`\'\"]*)[\x00-\x20]*j[\x00-\x20]*a[\x00-\x20]*v[\x00-\x20]*a[\x00-\x20]*s[\x00-\x20]*c[\x00-\x20]*r[\x00-\x20]*i[\x00-\x20]*p[\x00-\x20]*t[\x00-\x20]*
g, "$1=$2nojavascript..."],
[/([a-z]*)[\x00-\x20]*
[\'\"]*)[\x00-\x20]*v[\x00-\x20]*b[\x00-\x20]*s[\x00-\x20]*c[\x00-\x20]*r[\x00-\x20]*i[\x00-\x20]*p[\x00-\x20]*t[\x00-\x20]*
g, "$1=$2novbscript..."],
[/([a-z]*)[\x00-\x20]*
[\'\"]*)[\x00-\x20]*-moz-binding[\x00-\x20]*
g, "$1=$2nomozbinding..."],
[/(<[^>]+)style[\x00-\x20]*=[\x00-\x20]*([\`\'\"]*)\s*expression[\x00-\x20]*\([^>]*>/g, "$1>"],
[/(<[^>]+)style[\x00-\x20]*=[\x00-\x20]*([\`\'\"]*)\s*behaviour[\x00-\x20]*\([^>]*>/g, "$1>"],
[/(<[^>]+)style[\x00-\x20]*=[\x00-\x20]*([\`\'\"]*)\s*s[\x00-\x20]*c[\x00-\x20]*r[\x00-\x20]*i[\x00-\x20]*p[\x00-\x20]*t[\x00-\x20]*:*[^>]*>/g, "$1>"],
[/<\/*\w+:\w[^>]*>/g, ""],
[/(&\#*\w+)[\x00-\x20]+;/g, "$1;"],
[/(&\#x*)([0-9A-F]+);*/g, "$1$2;"],
[/(^[\/]{2}[^\n]*)|([\n]{1,}[\/]{2}[^\n]*)/g, ""]
];
for (i in r) {
if (Object.hasOwnProperty.call(r, i)) {
q.value = q.value.replace(r[i][0], r[i][1]);
}
}
do {
os = q.value;
q.value = q.value.replace(/<\/*(applet|meta|xml|blink|input|form|link|style|script|embed|object|iframe|frame|frameset|ilayer|layer|bgsound|title|base)[^>]*>/g, "");
} while (os !== q.value);
}
return q;
},
cf: function () {
var cp = testi.$("prevComment");
cp = testi.rhtm(cp, "");
testi.$win.setTimeout(function () {
testi.remove("quicktesti");
testi.$win.location.href = "#18";
}, testi.$time);
testi.init();
},
rcomm: function () {
var k = 0, rc = testi.elmsByClass("dtd", "td", testi.$("content_18")),
au = testi.elmsByTag("ul", testi.$("content_18")), uc, lc, lch, rl;
try {
while (k < rc.length) {
uc = testi.elmsByTag("ul", rc[k])[0];
lc = testi.elmsByTag("a", testi.elmsByTag("li", uc)[0])[0];
lch = lc.getAttribute("href");
rl = testi.cElems("div", null, null);
rl.appendChild(testi.cElems("hr", {
width: "100%",
height: "2px"
}));
rl.appendChild(testi.cElems("span", {
className: "q"
}));
testi.elmsByTag("span", rl)[0].appendChild(testi.cElems("a", {
target: "_blank",
href: lch.replace(/profiles\.friendster\.com\//i, "www.friendster.com/comments.php?uid=")
}));
testi.elmsByTag("a", rl)[0].appendChild(testi.$doc.createTextNode("Reply"));
au[k].appendChild(rl);
k += 1;
}
} catch (e) {}
return rc || au;
},
exCSS: function (x) {
var oh = testi.elmsByTag("head", testi.$doc), oc;
if (oh[0]) {
if (testi.$doc.createElementNS && oh[0].tagName === "head") {
oc = oh[0].appendChild(testi.$doc.createElementNS("http://www.w3.org/1999/xhtml", "link"));
} else {
oc = oh[0].appendChild(testi.cElems("link", {
rel: "stylesheet",
href: x,
type: "text/css"
}));
}
}
return oc;
},
xbg: function (e, c, i) {
if (!(e = testi.$(e))) {
return "";
}
var bg = "";
if (e.style) {
if (testi.xStr(c)) {
testi.setStyles(e, {
backgroundColor: c
});
}
if (testi.xStr(i)) {
testi.setStyles(e, {
backgroundImage: (i !== "") ? "url(" + i + ")" : null
});
}
bg = e.style.backgroundColor;
}
return bg;
},
xStr: function (s) {
for (var x in arguments) {
if (Object.hasOwnProperty.call(arguments, x)) {
if (typeof arguments[x] !== "string") {
return false;
}
}
}
return true;
},
cElems: function (t, a, p) {
var el = testi.$doc.createElement(t);
if (a) {
testi.setAttribs(el, a);
}
if (p) {
el.appendChild(p);
}
return el;
},
setAttribs: function (el, a) {
for (var x in a) {
if (Object.hasOwnProperty.call(a, x)) {
el[x] = a[x];
}
}
},
setStyles: function (el, s) {
try {
for (var x in s) {
if (Object.hasOwnProperty.call(s, x)) {[/spoiler]
terus inject pakai js injection di taruh di [b]area A[/b]