TechMates
member?
If not be one of us!Join us guys!
Login if your a member!
Enjoy!

TechMates

Life is Useless without TechMates
 
HomePortalSearchRegisterLog in

Share
 

 Reduce Comment

Go down 
AuthorMessage
JorgyRom
Admin
Admin
JorgyRom

Posts : 49
Points : 78
Reputation : 3
Join date : 2009-07-26
Age : 27
Location : Manila

Reduce Comment Empty
PostSubject: Reduce Comment   Reduce Comment EmptySun Aug 02, 2009 12:22 pm

This code will reduce your comment...

Change the number 5 if you want.
the num: 5 mean you will just have 5 comments on your profile..,

Add this to your javascript file.

Quote :
/*global rCOMM, document*/
rCOMM = {};

(function () {
rCOMM = {
comm: null,
num: 5,

init: function () {
rCOMM.comm = rCOMM.getElementsByClassName(document.getElementById("content_18"), "div", /fitem1wrapper/i);
for (var x = rCOMM.num, y = rCOMM.comm.length; x < y; x += 1) {
if (rCOMM.comm[x]) {
rCOMM.comm[x].parentNode.removeChild(rCOMM.comm[x]);
}
}
},

getElementsByClassName: function (oElm, sTag, sClass) {
var elm = [];
if (!oElm) {
oElm = document;
}
if (!sTag) {
sTag = "*";
}
var els = oElm.getElementsByTagName(sTag) || document.all;
for (var j = 0, k = els.length; j < k; j += 1) {
if (new RegExp(sClass).test(els[j].className)) {
elm.push(els[j]);
}
}
return elm;
}
};
})();
rCOMM.init();


credits:Feruz

_________________
"Life is Useless Without Techmates"

http://profiles.friendster.com/111675865

How to make JS(javascript) File?
Click here

How to make CSS(cascading style sheets file)?
Click here
Back to top Go down
 
Reduce Comment
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
TechMates :: Friendster Design and Development :: Friendster Tricks and Tutorials :: JavaScript-
Jump to: