welby 4 Posted March 5, 2017 Report Share Posted March 5, 2017 Hi, I would like to have a "Splashscreen" that loads a BASE64 image onload before the main bot loads. Is this possible without a plugin? Thanks in advance. Quote Link to post Share on other sites
deliter 203 Posted March 5, 2017 Report Share Posted March 5, 2017 had a quick google around for you, but this performs awfully bad in the ubot browser, but im sure it'l help you towards getting a solution, the black and white flag is a base64 image, replace it with your own , its not suggested though, you should just download the picture, it is stored in the browsers cache will perform much better load html("<style> #page \{ display: none; \} #loading \{ display: block; position: absolute; top: 0; left: 0; z-index: 100; width: 100vw; height: 100vh; background-color: rgba(192, 192, 192, 0.5); background-image: url(\" data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAIAAACRXR/mAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RDUxRjY0ODgyQTkxMTFFMjk0RkU5NjI5MEVDQTI2QzUiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RDUxRjY0ODkyQTkxMTFFMjk0RkU5NjI5MEVDQTI2QzUiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpENTFGNjQ4NjJBOTExMUUyOTRGRTk2MjkwRUNBMjZDNSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpENTFGNjQ4NzJBOTExMUUyOTRGRTk2MjkwRUNBMjZDNSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PuT868wAAABESURBVHja7M4xEQAwDAOxuPw5uwi6ZeigB/CntJ2lkmytznwZFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYW1qsrwABYuwNkimqm3gAAAABJRU5ErkJggg==\"); background-repeat: no-repeat; background-position: center; \} </style> <div id=\"page\"> </div> <div id=\"loading\"></div> <script> function onReady(callback) \{ var intervalID = window.setInterval(checkReady, 1000); function checkReady() \{ if (document.getElementsByTagName(\'body\')[0] !== undefined) \{ window.clearInterval(intervalID); callback.call(this); \} \} \} function show(id, value) \{ document.getElementById(id).style.display = value ? \'block\' : \'none\'; \} onReady(function () \{ show(\'page\', true); \}); </script>") wait(3) load html("<h1 style=\"color:red;\">Bot Ready</h1>") Quote Link to post Share on other sites
welby 4 Posted March 6, 2017 Author Report Share Posted March 6, 2017 Thanks Deliter, It was a "nice to have feature" but thank you for your suggestion - appreciated. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.