BLOCKLY18

Control Panel

Aug 19th, 2020
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.01 KB | None | 0 0
  1. var a = le._settings.sounds.blop;
  2. if ((le._settings.sounds.blop) = "undefined") {
  3. var blop = "/c/sys/sounds/BLOP.ogg"
  4. } else {
  5. var blop = a
  6. };
  7. function emohelp(){
  8. $alert.info("Ugly emoticons; probably not meant to be used unironically.<br><br><img src='https://i.imgur.com/qrApi8F.png' width='200'>")
  9. };
  10. function colorhelp(){
  11. $alert.info("Can be the name of any HTML colors, or hex codes")
  12. };
  13. function fonthelp(){
  14. $alert.info("Fonts: Graffiti (default), 3D-ASCII, ANSI Shadow, Bloody, Calvin S, Delta Corps Priest 1, Electronic, Elite, Stronger Than All, THIS, The Edge")
  15. };
  16. function sinhelp(){
  17. $alert.info("The most popular way of getting blocked by everyone")
  18. };
  19. function ythelp(){
  20. $alert.info("Embeds a YouTube video in the Trollbox when someone posts a YT link if on.")
  21. };
  22. function imghelp(){
  23. $alert.info("Shows images in the Trollbox when someone posts an image link if on.")
  24. };
  25. // wallpapers
  26. function wall1(){
  27. le._dom.background.style.backgroundImage = "url('https://i.imgur.com/6JlhfYT.png')";$file.save('/a/boot/.wallpaper.js','var url = "https://i.imgur.com/6JlhfYT.png"; le._dom.background.style.backgroundImage = "url(" + url + ")"');
  28. };
  29. function wall2(){
  30. le._dom.background.style.backgroundImage = "url('https://i.imgur.com/XmTbC7r.jpg')";$file.save('/a/boot/.wallpaper.js','var url = "https://i.imgur.com/XmTbC7r.jpg"; le._dom.background.style.backgroundImage = "url(" + url + ")"');
  31. };
  32. function wall3(){
  33. le._dom.background.style.backgroundImage = "url('https://i.imgur.com/Hkh6jvP.jpg')";$file.save('/a/boot/.wallpaper.js','var url = "https://i.imgur.com/Hkh6jvP.jpg"; le._dom.background.style.backgroundImage = "url(" + url + ")"');
  34. };
  35. function wall4(){
  36. le._dom.background.style.backgroundImage = "url('https://i.imgur.com/YqWsWai.jpg')";$file.save('/a/boot/.wallpaper.js','var url = "https://i.imgur.com/YqWsWai.jpg"; le._dom.background.style.backgroundImage = "url(" + url + ")"');
  37. };
  38. function wall5(){
  39. le._dom.background.style.backgroundImage = "url('https://i.imgur.com/e0yPUci.jpg')";$file.save('/a/boot/.wallpaper.js','var url = "https://i.imgur.com/e0yPUci.jpg"; le._dom.background.style.backgroundImage = "url(" + url + ")"');
  40. };
  41. function wall6(){
  42. le._dom.background.style.backgroundImage = "url('https://i.imgur.com/g3vy2hF.jpg')";$file.save('/a/boot/.wallpaper.js','var url = "https://i.imgur.com/g3vy2hF.jpg"; le._dom.background.style.backgroundImage = "url(" + url + ")"');
  43. };
  44. function wall7(){
  45. le._dom.background.style.backgroundImage = "url('https://i.imgur.com/fd9g8Hp.png')";$file.save('/a/boot/.wallpaper.js','var url = "https://i.imgur.com/fd9g8Hp.png"; le._dom.background.style.backgroundImage = "url(" + url + ")"');
  46. };
  47. function wall8(){
  48. le._dom.background.style.backgroundImage = "url('https://i.imgur.com/7yFl8Ra.png')";$file.save('/a/boot/.wallpaper.js','var url = "https://i.imgur.com/7yFl8Ra.png"; le._dom.background.style.backgroundImage = "url(" + url + ")"');
  49. };
  50. function wall9(){
  51. le._dom.background.style.backgroundImage = "url('https://i.imgur.com/GvRf42p.png')";$file.save('/a/boot/.wallpaper.js','var url = "https://i.imgur.com/GvRf42p.png"; le._dom.background.style.backgroundImage = "url(" + url + ")"');
  52. };
  53. function wall10(){
  54. le._dom.background.style.backgroundImage = "url('https://i.imgur.com/UNxNE3i.jpg')";$file.save('/a/boot/.wallpaper.js','var url = "https://i.imgur.com/UNxNE3i.jpg"; le._dom.background.style.backgroundImage = "url(" + url + ")"');
  55. };
  56. function wall11(){
  57. le._dom.background.style.backgroundImage = "url('https://i.imgur.com/YXhTbZX.png')";$file.save('/a/boot/.wallpaper.js','var url = "https://i.imgur.com/YXhTbZX.png"; le._dom.background.style.backgroundImage = "url(" + url + ")"');
  58. };
  59. // styles
  60. function left(){
  61. $file.save('/a/boot/.btns.css',".ui_window__head__close {order:-4} .ui_window__head__maximize {order:-3} .ui_window__head__maximized {order:-3} .ui_window__head__minimize {order:-2} .ui_window__head__help {order:-1} .ui_window__head__title {order:3;text-align:center;margin-right:4px;} .ui_window__head__icon {order:4}");document.getElementById('btns-prev-right').style.opacity = '0';document.getElementById('btns-prev-left').style.opacity = '100';
  62. };
  63. function right(){
  64. $db.del('boot/.btns.css');document.getElementById('btns-prev-left').style.opacity = '0';document.getElementById('btns-prev-right').style.opacity = '100';
  65. };
  66. // ---
  67. function save(){
  68. le._settings.sounds.boot = document.getElementById('boot').value;
  69. le._settings.sounds.alert = document.getElementById('alert').value;
  70. le._settings.sounds.error = document.getElementById('error').value;
  71. le._settings.sounds.blop = document.getElementById('blop').value;
  72. le._settings.defaultApp.html = document.getElementById('html').value;
  73. le._settings.defaultApp.htm = document.getElementById('htm').value;
  74. le._settings.defaultApp.php = document.getElementById('php').value;
  75. le._settings.defaultApp.xml = document.getElementById('xml').value;
  76. le._settings.defaultApp.svg = document.getElementById('svg').value;
  77. le._settings.defaultApp.gif = document.getElementById('gif').value;
  78. le._settings.defaultApp.png = document.getElementById('png').value;
  79. le._settings.defaultApp.jpeg = document.getElementById('jpeg').value;
  80. le._settings.defaultApp.jpg = document.getElementById('jpg').value;
  81. le._settings.defaultApp.js = document.getElementById('js').value;
  82. le._settings.defaultApp.cur = document.getElementById('cur').value;
  83. le._settings.defaultApp.md = document.getElementById('md').value;
  84. le._settings.defaultApp.zip = document.getElementById('zip').value;
  85. le._settings.defaultApp.rar = document.getElementById('rar').value;
  86. $file.save('/a/.config/trollbox/nick',document.getElementById('nick').value);
  87. $file.save('/a/.config/trollbox/color',document.getElementById('color').value);
  88. $file.save('/a/.config/trollbox/img',document.getElementById('img').value);
  89. $file.save('/a/.config/trollbox/yt',document.getElementById('yt').value);
  90. $file.save('/a/.config/trollbox/speech',document.getElementById('speech').value);
  91. $file.save('/a/.config/trollbox/rate',document.getElementById('rate').value);
  92. $file.save('/a/.config/trollbox/pitch',document.getElementById('pitch').value);
  93. $file.save('/a/.config/trollbox/font',document.getElementById('font').value);
  94. $file.save('/a/.config/trollbox/sin',document.getElementById('sin').value);
  95. $file.save('/a/.config/trollbox/emoticons',document.getElementById('emoticons').value);
  96. $explorer.refresh();
  97. };
  98. // --ui-
  99. function general(){
  100. $window.current.changeSize({width: 503, height: 635});$window.current.el.body.innerHTML = "<h4>Sounds </h4><div><div class='ui_form__field'><label>Boot</label><input type='text' value='" + le._settings.sounds.boot + "' id='boot' style='width: 355px'></div><div class='ui_form__field'><label>Alert</label><input type='text' value='" + le._settings.sounds.alert + "' id='alert' style='width: 355px'></div><div class='ui_form__field'><label>Error</label><input type='text' value='" + le._settings.sounds.error + "' id='error' style='width: 355px'></div><div class='ui_form__field'><label>Blop</label><input type='text' value='" + blop + "' id='blop' style='width: 355px'></div></div><br><h4>Default App</h4><div><div class='ui_form__field'><label>html</label><input type='text' value='" + le._settings.defaultApp.html + "' id='html' style='width: 355px'></div><div class='ui_form__field'><label>htm</label><input type='text' value='" + le._settings.defaultApp.htm + "' id='htm' style='width: 355px'></div><div class='ui_form__field'><label>php</label><input type='text' value='" + le._settings.defaultApp.php + "' id='php' style='width: 355px'></div><div class='ui_form__field'><label>xml</label><input type='text' value='" + le._settings.defaultApp.xml + "' id='xml' style='width: 355px'></div><div class='ui_form__field'><label>svg</label><input type='text' value='" + le._settings.defaultApp.svg + "' id='svg' style='width: 355px'></div><div class='ui_form__field'><label>gif</label><input type='text' value='" + le._settings.defaultApp.gif + "' id='gif' style='width: 355px'></div><div class='ui_form__field'><label>png</label><input type='text' value='" + le._settings.defaultApp.png + "' id='png' style='width: 355px'></div><div class='ui_form__field'><label>jpeg</label><input type='text' value='" + le._settings.defaultApp.jpeg + "' id='jpeg' style='width: 355px'></div><div class='ui_form__field'><label>jpg</label><input type='text' value='" + le._settings.defaultApp.jpg + "' id='jpg' style='width: 355px'></div><div class='ui_form__field'><label>js</label><input type='text' value='js' id='js' style='width: 355px'></div><div class='ui_form__field'><label>cur</label><input type='text' value='cur' id='cur' style='width: 355px'></div><div class='ui_form__field'><label>md</label><input type='text' value='code' id='md' style='width: 355px'></div><div class='ui_form__field'><label>zip</label><input type='text' value='download' id='zip' style='width: 355px'></div><div class='ui_form__field'><label>rar</label><input type='text' value='download' id='rar' style='width: 355px'></div></div>"
  101. };
  102. function wallpaper(){
  103. $window.current.changeSize({width: 500, height: 630});$window.current.el.body.innerHTML = "<div style='background: radial-gradient(circle, rgb(0, 241, 255) 0%, rgb(158, 0, 255) 100%); width: 100%; height: 10%; color: white;'><center><br><h3 style='vertical-align: middle;display: table-cell;'>Wallpaper Preferences</h3></center></div><br><br><center><button onclick='wall1()' style='margin: 5px;' title='Win93-a'><img src='https://i.imgur.com/6JlhfYT.png' width='160'></button> <button onclick='wall2()' style='margin: 5px;' title='Win93-b'><img src='https://i.imgur.com/XmTbC7r.jpg' width='160'></button><br><button onclick='wall3()' style='margin: 5px;' title='Bliss'><img src='https://i.imgur.com/Hkh6jvP.jpg' width='160'></button> <button onclick='wall4()' style='margin: 5px;' title='Vista-a'><img src='https://i.imgur.com/YqWsWai.jpg' width='160'></button><br><button onclick='wall5()' style='margin: 5px;' title='Vista-b'><img src='https://i.imgur.com/e0yPUci.jpg' width='160'></button> <button onclick='wall6()' style='margin: 5px;' title='Mac-a'><img src='https://i.imgur.com/g3vy2hF.jpg' width='160'></button><br><button onclick='wall7()' style='margin: 5px;' title='Mac-b'><img src='https://i.imgur.com/fd9g8Hp.png' width='160'></button> <button onclick='wall8()' style='margin: 5px;' title='Gradient-a'><img src='https://i.imgur.com/VCumw5H.png' width='160'></button><br><button onclick='wall9()' style='margin: 5px;' title='Gradient-b'><img src='https://i.imgur.com/TjEKvSl.png' width='160'></button> <button onclick='wall10()' style='margin: 5px;' title='Gradient-c'><img src='https://i.imgur.com/Nsz862Y.jpg' width='160'></button><br><button onclick='wall11()' style='margin: 5px;' title='Gradient-d'><img src='https://i.imgur.com/QjWKkOi.png' width='160'></button></center>"
  104. };
  105. function styles(){
  106. $window.current.changeSize({width: 500, height: 620});$window.current.el.body.innerHTML = "<h3>Style Editor 93</h3><p>Reboot to apply changes.</p><h4><u>Window head<span style='margin-left: 20px;'>Buttons</span></u></h4><button onclick='left()' style='margin: 4px;'><span style='margin-left: 27px; margin-right: 27px;'>Left</span></button><button onclick='right()' style='margin-left: 50px;'><span style='margin-left: 27px; margin-right: 27px;'>Right</span></button><br><br>Preview:<br><div style='width: 248px; height: 45px;'><img id='btns-prev-left' src='https://i.imgur.com/UQ4qqDU.png' style='opacity: 0;' width='250'><img style='opacity: 0;' id='btns-prev-right' src='https://i.imgur.com/77TJ8Le.png' width='250'></div>note: this page is unfinished"
  107. };
  108. function trollbox(){
  109. $window.current.changeSize({width: 500, height: 620});$window.current.el.body.innerHTML = "<div class='ui_form__field'><label>Nickname</label><input type='text' placeholder='Nick' value='" + $store.get('.config/trollbox/nick') + "' id='nick' style='width: 355px'></div><div class='ui_form__field'><label>Color</label><input placeholder='#" + $io.arr.random(["abc123","123456","abcdef","red","cyan","white"]) + "' type='text' value='" + $store.get('.config/trollbox/color') + "' id='color' style='width: 330px'><button style='width: 25px' onclick='colorhelp()'>?</button></div><div class='ui_form__field'><label>Show Images</label><input type='text' placeholder='" + $io.arr.random(["true","false"]) + "' value='" + $store.get('.config/trollbox/img') + "' id='img' style='width: 330px'><button style='width: 25px' onclick='imghelp()'>?</button></div><div class='ui_form__field'><label>Embed YouTube Videos</label><input type='text' placeholder='" + $io.arr.random(["true","false"]) + "' value='" + $store.get('.config/trollbox/yt') + "' id='yt' style='width: 330px'><button style='width: 25px' onclick='ythelp()'>?</button></div><div class='ui_form__field'><label>Speech</label><input placeholder='true (default)' type='text' value='" + $store.get('.config/trollbox/speech') + "' id='speech' style='width: 355px'></div><div class='ui_form__field'><label><span style='color: #757575'>Speech:</span> Rate</label><input type='text' placeholder='1.0 (default)' value='" + $store.get('.config/trollbox/rate') + "' id='rate' style='width: 355px'></div><div class='ui_form__field'><label><span style='color: #757575'>Speech:</span> Pitch</label><input type='text' placeholder='1.0 (default)' value='" + $store.get('.config/trollbox/pitch') + "' id='pitch' style='width: 355px'></div><div class='ui_form__field'><label>Font</label><input type='text' value='" + $store.get('.config/trollbox/font') + "' id='font' placeholder='Graffiti (default)' style='width: 330px'><button style='width: 25px' onclick='fonthelp()'>?</button></div><div class='ui_form__field'><label>Sin</label><input placeholder='false (recommended)' type='text' value='" + $store.get('.config/trollbox/sin') + "' id='sin' style='width: 330px'><button style='width: 25px' onclick='sinhelp()'>?</button></div><div class='ui_form__field'><label>Emoticons</label><input placeholder='false (recommended)' type='text' value='" + $store.get('.config/trollbox/emoticons') + "' id='emoticons' style='width: 330px'><button style='width: 25px' onclick='emohelp()'>?</button></div>"
  110. };
  111. $window({
  112. help: "This was made by Blockly. why are the general and trollbox tabs so BUGGYYYYYY",
  113. center: true,
  114. footer: "<button style='margin-left: 490px; margin-right: 5px; margin-bottom: 5px;' onclick='save()'><span style='margin-left: 15px; margin-right: 15px;'>Save</span></button>",
  115. animationIn: false,
  116. title: "Control Panel",
  117. icon: "/c/sys/skins/w93/settings.png",
  118. maximizable: false,
  119. width: 500,
  120. height: 620,
  121. menu: [
  122. {
  123. name: "General",
  124. icon: "/c/sys/skins/w93/settings.png",
  125. action: function(){general()}
  126. },
  127. {
  128. name: "Wallpaper",
  129. icon: "/c/files/images/icons/window.png",
  130. action: function(){wallpaper()}
  131. },
  132. {
  133. name: "Styles",
  134. icon: "/c/sys/skins/w93/stats.png",
  135. action: function(){styles()}
  136. },
  137. {
  138. name: "Trollbox",
  139. icon: "/c/sys/skins/w93/apps/chat.gif",
  140. action: function(){trollbox()}
  141. }
  142. ],
  143. html: "<body id='body'></body>"
  144. });general();
Add Comment
Please, Sign In to add comment