Bài viết này xin phép share cho toàn thể ae một con web hacker ngầu lòi, một sản phẩm của sharescript.net viết chơi để lòe crush.
Anh em có thể xem demo nóng hổi ở đây: Hacked 🙂 (sharescript.net)
Ae tải code ở link download bên dưới nhé, ở bản demo mình mã hóa js rồi.
Một số tính năng trong code
1. Tính năng mưa code

Để làm được tính năng này ta chỉ cần một đoạn code:
<style> *{ margin: 0; padding: 0; } canvas { display:block; } body{ background-color: black; } </style> <canvas id="c" style="position: fixed; z-index:-9999"></canvas> <script> var c = document.getElementById("c"); var ctx = c.getContext("2d"); c.height = window.innerHeight; c.width = window.innerWidth; var matrix = "Hacked by GrouSrlpPrsc :)"; matrix = matrix.split(""); var font_size = 10; var columns = c.width/font_size; var drops = []; for(var x = 0; x < columns; x++) drops[x] = 1; function draw() { ctx.fillStyle = "rgba(0, 0, 0, 0.04)"; ctx.fillRect(0, 0, c.width, c.height); ctx.fillStyle = "#0F0"; ctx.font = font_size + "px arial"; for(var i = 0; i < drops.length; i++) { var text = matrix[Math.floor(Math.random()*matrix.length)]; //x = i*font_size, y = value of drops[i]*font_size ctx.fillText(text, i*font_size, drops[i]*font_size); if(drops[i]*font_size > c.height && Math.random() > 0.975) drops[i] = 0; drops[i]++; } } setInterval(draw, 35); </script>
Trong đó, ae có thể thay Hacked by GrouSrlpPrsc 🙂 thành text tùy chọn mà ae muốn mưa rơi random theo hàng dọc nhé
2. Chữ Sharescript.net to đùng

Để làm được chữ đẹp như vậy, ta chỉ cần một đoạn code:
<span style="background: url("http://i106.photobucket.com/albums/m280/YukioKenshin/chopnhay.gif") repeat scroll 0% 0% transparent; color:white; text-shadow: #00ff00 0px 0px 6px, #00ff00 0px 0px 5px, #00ff00 0px 0px 5px;font-size: 50px; font-weight: bold;">Sharescript.net</span>
Nên nhớ để nền đen để bắt mắt hơn, nếu không ae có thể sửa màu đi và để nền trắng
3. Nhạc nền
Hiện tại thì các trình duyệt đã chặn tính năng auto phát video và audio nên mình đành nhờ youtube làm thay vậy. Youtube nó là thằng được chấp thuận tự động phát media trên các trình duyệt hiện đại nên mình lợi dụng nó để lúc vừa vào web đã có nhạc nghe.
Chỉ cần embed video youtube vào và cho autoplay thôi nà:
<embed src="https://www.youtube.com/v/taukA1Sy1uc&autoplay=1&loop=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="0" height="0"></embed>
Rồi, kết bài thì chỉ hy vọng ae thích quả code này của mình là được, mong ae ủng hộ thêm! Nhớ tải code bên dưới về upload lên share với ny/crush cho ngầu :v
[khungdownload manguon=”” redirectbanggi=”sharescript-redirect” tenfilezip=”index-hacker” linkbutton1=”https://sharescript.net/demo/web-hacker/” tenbutton1=”Demo” linkbutton2=”https://drive.google.com/file/d/1NHpFSxxMqVhHpsYK0t92upW47pVKUNxZ/view?usp=sharing” tenbutton2=”Download”]