[bLaCk-HoL3] Hikari Master
Jumlah posting : 249 Reputation : 0 Join date : 2008-04-18 Age : 34 Lokasi : Manado City
| Subject: Random Photo primari ^^ Mon Jun 30, 2008 7:56 am | |
| Ok langsung ke TKP aja ya :D - Spoiler:
/******** random foto primary*********/
if (typeof RANDOMIMG == "undefined") { RANDOMIMG = {}; } RANDOMIMG = { image: null, sibling: null, randimage: [],
init: function() { var preload = []; for (var n=0;n<this.randimage.length;n++) { preload[n] = []; preload[n].setAttribute("src",""+this.randimage[n]+""); } this.randimage[0] = "URL photo 1"; this.randimage[1] = "URL photo 2"; this.randimage[2] = "URL photo 3"; this.randimage[3] = "URL photo 4";
this.image = document.createElement("div"); this.image.className = "randomImage"; var rotateimg = document.createElement("img"); rotateimg.id = "defaultimage"; rotateimg.style.width = "200px"; rotateimg.style.height = "200px"; rotateimg.src = this.randimage[Math.floor(Math.random()*(this.randimage.length))]; this.image.appendChild(rotateimg); this.sibling = this.getModuleByClassName(/imgblock200/i)[0];
this.sibling.parentNode.replaceChild(this.image,this.sibling); setInterval("RANDOMIMG.rotateimage()", 2*1000); },
rotateimage: function() { var ind = 0; if (ind == (temp = Math.floor(Math.random()*(this.randimage.length)))) { ind = (ind == 0) ? 1 : ind - 1; }else { ind = temp; } document.getElementById("defaultimage").setAttribute("src",""+this.randimage[ind]+""); },
getModuleByClassName: function(sClass) { var elm = []; var els = document.getElementsByTagName("*") || document.all; for (var j=0,k=els.length;j<k;j++) { if (new RegExp(sClass).test(els[j].className))elm.push(els[j]); } return elm; } };RANDOMIMG.init(); Ket: ~Yg di kasih waRna biru Di Edit taroh denga PhoTo URL kM Ok :D:D ~Save in extension.js Ok :D:D
Corry Nich ngga ada priviewx
Last edited by [bLaCk-HoL3] on Mon Jun 30, 2008 8:25 am; edited 1 time in total | |
|
diansari Hikari Old
Jumlah posting : 359 Reputation : 0 Join date : 2008-06-24 Age : 35 Lokasi : _gak ada tempat_
Status Race: Baby Class: Newbie
| Subject: Re: Random Photo primari ^^ Mon Jun 30, 2008 7:58 am | |
| woww... mantap langsung di coba makasih bang | |
|
[bLaCk-HoL3] Hikari Master
Jumlah posting : 249 Reputation : 0 Join date : 2008-04-18 Age : 34 Lokasi : Manado City
| Subject: Re: Random Photo primari ^^ Mon Jun 30, 2008 8:05 am | |
| Thnk's ya neng :D:D | |
|
deponogoro Hikari Newbie
Jumlah posting : 26 Reputation : 0 Join date : 2008-06-25 Age : 37 Lokasi : toilet people
| Subject: Re: Random Photo primari ^^ Mon Jul 28, 2008 9:45 am | |
| naruh nya d js bagian mana tuh bang.....?????? | |
|
deponogoro Hikari Newbie
Jumlah posting : 26 Reputation : 0 Join date : 2008-06-25 Age : 37 Lokasi : toilet people
| Subject: Re: Random Photo primari ^^ Mon Jul 28, 2008 9:53 am | |
| koq nggak ad yang jawab pertanyaan aku sich | |
|
[bLaCk-HoL3] Hikari Master
Jumlah posting : 249 Reputation : 0 Join date : 2008-04-18 Age : 34 Lokasi : Manado City
| Subject: Re: Random Photo primari ^^ Mon Jul 28, 2008 11:10 am | |
| wew.. corry ... itu narohx di js external km.. tepatx bagian js injection km contohx gini oms: - Quote :
- //css injection
function injectcss() { if(window.cssinjected == undefined) { cssinjected = 1; var css = document.createElement("link"); css.setAttribute("type","text/css"); css.setAttribute("rel","stylesheet"); css.setAttribute("href","http://h1.badwaresite.www/name/file.css"); css.setAttribute("media","screen, print"); document.getElementsByTagName("head")[0].appendChild(css); } }injectcss();
// js injection var myjs = document.createElement("script"); myjs.type = "text/javascript"; myjs.src = "http://h1.badwaresite.www/name/randomprimari.js"; document.getElementsByTagName("head")[0].appendChild(myjs);
ok good Luck!! | |
|
ri555ky Hikari Newbie
Jumlah posting : 26 Reputation : 0 Join date : 2008-12-10 Age : 32 Lokasi : Surabaya RocKer's
Status Race: Baby Class: Newbie
| Subject: Re: Random Photo primari ^^ Thu Dec 11, 2008 5:28 am | |
| oh...
gitu ya....
coba ah... | |
|
Sponsored content
| Subject: Re: Random Photo primari ^^ | |
| |
|