Pages: 1

  2008-12-25 11:13:40

bobcbar
» FTalkElite
FTalk Level: zero
5223
0
1969-12-31

Guys, I'm a new in making JS extension. :arrow: How can start with my JS? I want my CSS as my layout code. But, don't know how to insert my CSS code to a JS extension. :arrow: Also, i have this JS

Try using these codes as ur js file. I am not sure the shoutbox marquee codes still work. Also if you are using FF they only work when the viewer hovers the cursor over the box. [spoiler]var css = document.createElement("link"); css.setAttribute("rel","stylesheet"); css.setAttribute("href","CSS_LINK_HERE"); document.getElementsByTagName("head")[0].appendChild(css); function onProfileLoad() { //onload handler //(pattern) addBox("L-R","Header",htm,"cssid","sibling"); ///Moving Friends Box var marqueeFriends = document.getElementById("content_friends_2_2").innerHTML; document.getElementById("content_friends_2_2").innerHTML ="<marquee direction='up' height='300' scrollamount='2' onMouseOver='stop()' onMouseOut='start()'>"+ marqueeFriends+"</marquee>"; //Moving Fan of...Box var marqueeFanof = document.getElementById("content_fanof_2_4").innerHTML; document.getElementById("content_fanof_2_4").innerHTML ="<marquee direction='up' height='200' scrollamount='2' onMouseOver='stop()' onMouseOut='start()'>"+ marqueeFanof+"</marquee>"; //Moving Groups Box var marqueeGroups = document.getElementById("content_groups_2_5").innerHTML; document.getElementById("content_groups_2_5").innerHTML ="<marquee direction='up' height='200' scrollamount='2' onMouseOver='stop()' onMouseOut='start()'>" + marqueeGroups+"</marquee>"; //Moving Photo Gallery var marqueePhotos = document.getElementById("content_photos_1_2").innerHTML; document.getElementById("content_photos_1_2").innerHTML ="<marquee direction='left' height='100%' scrollamount='2' onMouseOver='stop()' onMouseOut='start()'>"+ marqueePhotos+"</marquee>"; //Moving Shoutout Box var marqueeCSbox = document.getElementById("cpShoutoutBox").innerHTML; document.getElementById("cpShoutoutBox").innerHTML ="<marquee direction='left' height='100%' scrollamount='2' onMouseOver='stop()' onMouseOut='start()'>"+ marqueeCSbox+"</marquee>"; } 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); } } function processAjaxRequest(type,url,cont,param,handler,handlerparam) { //by marfillaster //type 'POST' | 'GET' //cont 'true' | 'false' //param string | null //handler string | null //handlerparam string |null if(handlerparam) handlerparam=","+handlerparam; else handlerparam=""; var httprequest= window.XMLHttpRequest? new XMLHttpRequest():new ActiveXObject("Msxml2.XMLHTTP"); if(handler) eval("httprequest.onreadystatechange=function(){if (httprequest.readyState==4) {"+handler+"(httprequest.responseText"+handlerparam+");}}"); httprequest.open( type, url, cont); if(type=="POST") { httprequest.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); httprequest.setRequestHeader("Content-length", param.length); httprequest.setRequestHeader("Connection", "close"); } httprequest.send(param); }[/spoiler]

Last edited by bobcbar (2008-12-25 11:14:40)

Pages: 1

Board footer

© 2025 F Talk

Current time is 20:37

[ 12 queries - 0.011 second ]
Privacy Policy