Advertisement
EnterApps

Untitled

Apr 13th, 2019
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.17 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <link rel="stylesheet" href="style.css" type="text/css" media="screen"/>
  6. </head>
  7. <body onload="init()">
  8. <div id="console">
  9. <div id="bar">
  10. <div id="red"></div>
  11. <div id="yellow"></div>
  12. <div id="green"></div>
  13. </div>
  14. <div id="head"></div>
  15. <div id="write"></div>
  16. <div id="music"></div>
  17. <div id="customtxt"></div>
  18. </div>
  19.  
  20.  
  21. <script type="text/javascript">
  22.  
  23. var i = 0;
  24. var j = -1;
  25. var t=document.getElementById("console"),e=document.getElementById("write"),m=document.getElementById("music"),h=document.getElementById("head");
  26. var loc = 'Loading...';
  27. var wea,info,batt,wifis,ram,name,cust;
  28. var txt = [loc]; /* The text */
  29. var speed = 55; /* The speed/duration of the effect in milliseconds */
  30. var time = 5500;
  31.  
  32. function typeWriter() {
  33. //e.innerHTML = txt[j];
  34.  
  35. //e.style.opacity = 1;
  36.  
  37. if (i < txt[j].length) {
  38. e.innerHTML += txt[j].charAt(i);
  39. i++;
  40. setTimeout(typeWriter, speed);
  41. }else{
  42. i = 0;
  43. setTimeout(next, time);
  44. }
  45. }
  46.  
  47. function next() {
  48. e.innerHTML = "#Terminal: ";
  49.  
  50. j++;
  51.  
  52. if(j > txt.length - 1){
  53. j = 0;
  54. }
  55.  
  56. //e.style.opacity = 0;
  57.  
  58. setTimeout(typeWriter, 500);
  59. }
  60.  
  61. function checkColors(){
  62. document.getElementById("head").style.color = headC;
  63. document.getElementById("write").style.color = terminalC;
  64. document.getElementById("music").style.color = musicC;
  65. document.getElementById("customtxt").style.color = customC;
  66.  
  67. if(txtBlur === 1){
  68. t.classList.add("withBlur");
  69. }
  70.  
  71. if(White === 1){
  72. t.classList.add("white");
  73. }
  74. }
  75.  
  76. next();
  77. checkColors();
  78.  
  79. </script>
  80.  
  81. <script type="text/javascript">
  82.  
  83. function mainUpdate(type){
  84. if(type == "weather"){
  85. //document.getElementById('wea').innerHTML = weather.temperature + "&deg;" + weather.condition;
  86. wea = "Feels like " + weather.feelsLike + "ΒΊ in " + weather.address.city + ", condition: " + weather.naturalCondition;
  87. }else if (type == "system"){
  88. if(Name === 1){
  89. name = deviceName + "-" + deviceType + ":~ ";
  90. }else{
  91. name = "";
  92. }
  93.  
  94. document.getElementById("customtxt").innerHTML = Custom;
  95.  
  96. }else if (type == "battery"){
  97. //document.getElementById('batt').innerHTML = batteryPercent + "%";
  98. batt = "battery level " + batteryPercent + "%";
  99. wifis = "wifi strength " + wifiStrength;
  100. ram = "ram used " + ramUsed + ", ram free " + ramFree;
  101. if(Weather === 1){
  102. txt.push(wea);
  103. }
  104. if(Battery === 1){
  105. txt.push(batt);
  106. }
  107. if(Wifi === 1){
  108. txt.push(wifis);
  109. }
  110. if(Ram === 1){
  111. txt.push(ram);
  112. }
  113. var u=function(){
  114. batt = "battery level " + batteryPercent + "%";
  115. };
  116. setInterval(u,30000);
  117. //txt.push(wea, batt, wifis, ram);
  118. }else if (type == "music"){
  119. if(title === "(null)"){
  120. document.getElementById('music').innerHTML = "";
  121. }else{
  122. document.getElementById('music').innerHTML = title + " -- " + artist + " -- " + album;
  123. }
  124. }
  125. }
  126.  
  127. </script>
  128.  
  129.  
  130. </body>
  131. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement