Git Product home page Git Product logo

webwindows's Introduction

webwindows

JavaScript desktop window management system.

Chrome Only as of now! Working example click here

Would like contributors for the betterment of Web Applications! ( Names in credits, yay!) I'm actively using, building, and maintaining this in several large-scale projects, but obviously can't cover as much ground alone as I could with help. If you're interested in using this system and helping make it phenomenal, please dive in!

A desktop window manager for windowed web applications.

As of this writing, this system/API was designed for and tested with Google Chrome >= Version 93. Other developers are encouraged to help make this system more cross-browser compatible!

Significant documentation will be coming soon.

(Very) Quick Start:

<!DOCTYPE html>
<html>
    <head>
        <script src='windows.js'></script>
    </head>
    <body onload='start()'>

        <script>
            var win1, win2, win3, win4, win5;
            var title_array = [];

            function start() {
                win = new WINDOW("0", "0", "50%", "50%", "Window 1");
                win.show();
                
                // Set the window's icon.  For the best results, it should be 32x32 or 64x64.
                // win.icon = "https://some_icon.png";

                win2 = new WINDOW("50%", "0", "50%", "50%", "Window 2");
                win2.show();
                
                win2.contents = "<span class='myclass'>An HTML string</span>";
                
                let myspan = win2.get_single_element("span", "myclass");
                
                myspan.style.textDecoration = "underline";

                win3 = new WINDOW("0", "50%", "50%", "50%", "Window 3");
                win3.show();

                win4 = new WINDOW("50%", "50%", "50%", "50%", "Window 4");
                win4.show();

                win5 = new WINDOW(null, null, "50%", "50%", "Center Window");
                win5.show();

                setTimeout(()=>{
                    win5.show_busy = true;
                    for (i = 5; i >= 1; i--) {
                        title_array.push("Loading " + i.toString() + "/5");
                        setTimeout(()=>{
                            win5.title = title_array.pop();
                            if (title_array.length === 0) {
                                win5.show_busy = false;
                                win5.title = "Everything has loaded!";
                            }
                        }, i*1000);
                    }
                }, 1000);
            }


        </script>
    </body>
</html>
  • Double click a minimized/docked window to restore it.
  • Drag a docked window to "unmanage" it. That means it will minimize/restore where it is dropped.
  • Windows may be set with no resize thumb in the lower-right-hand corner
  • Set the "draggable" property to false if the window should not be draggable.
  • Geez, I could go on forever.. I'll stop here for now.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.