Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8">
- <link rel="stylesheet" href="style.css" type="text/css" media="screen"/>
- </head>
- <body onload="init()">
- <div id="console">
- <div id="bar">
- <div id="red"></div>
- <div id="yellow"></div>
- <div id="green"></div>
- </div>
- <div id="head"></div>
- <div id="write"></div>
- <div id="music"></div>
- <div id="customtxt"></div>
- </div>
- <script type="text/javascript">
- var i = 0;
- var j = -1;
- var t=document.getElementById("console"),e=document.getElementById("write"),m=document.getElementById("music"),h=document.getElementById("head");
- var loc = 'Loading...';
- var wea,info,batt,wifis,ram,name,cust;
- var txt = [loc]; /* The text */
- var speed = 55; /* The speed/duration of the effect in milliseconds */
- var time = 5500;
- function typeWriter() {
- //e.innerHTML = txt[j];
- //e.style.opacity = 1;
- if (i < txt[j].length) {
- e.innerHTML += txt[j].charAt(i);
- i++;
- setTimeout(typeWriter, speed);
- }else{
- i = 0;
- setTimeout(next, time);
- }
- }
- function next() {
- e.innerHTML = "#Terminal: ";
- j++;
- if(j > txt.length - 1){
- j = 0;
- }
- //e.style.opacity = 0;
- setTimeout(typeWriter, 500);
- }
- function checkColors(){
- document.getElementById("head").style.color = headC;
- document.getElementById("write").style.color = terminalC;
- document.getElementById("music").style.color = musicC;
- document.getElementById("customtxt").style.color = customC;
- if(txtBlur === 1){
- t.classList.add("withBlur");
- }
- if(White === 1){
- t.classList.add("white");
- }
- }
- next();
- checkColors();
- </script>
- <script type="text/javascript">
- function mainUpdate(type){
- if(type == "weather"){
- //document.getElementById('wea').innerHTML = weather.temperature + "°" + weather.condition;
- wea = "Feels like " + weather.feelsLike + "ΒΊ in " + weather.address.city + ", condition: " + weather.naturalCondition;
- }else if (type == "system"){
- if(Name === 1){
- name = deviceName + "-" + deviceType + ":~ ";
- }else{
- name = "";
- }
- document.getElementById("customtxt").innerHTML = Custom;
- }else if (type == "battery"){
- //document.getElementById('batt').innerHTML = batteryPercent + "%";
- batt = "battery level " + batteryPercent + "%";
- wifis = "wifi strength " + wifiStrength;
- ram = "ram used " + ramUsed + ", ram free " + ramFree;
- if(Weather === 1){
- txt.push(wea);
- }
- if(Battery === 1){
- txt.push(batt);
- }
- if(Wifi === 1){
- txt.push(wifis);
- }
- if(Ram === 1){
- txt.push(ram);
- }
- var u=function(){
- batt = "battery level " + batteryPercent + "%";
- };
- setInterval(u,30000);
- //txt.push(wea, batt, wifis, ram);
- }else if (type == "music"){
- if(title === "(null)"){
- document.getElementById('music').innerHTML = "";
- }else{
- document.getElementById('music').innerHTML = title + " -- " + artist + " -- " + album;
- }
- }
- }
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement