Giter Site home page Giter Site logo

drawpage's Introduction

drawpage

Draw outline of your web page and disappear.

Inspired by svg drawing animation, I thought we can draw any outline of any webpage by following the paths of box models, and this is the result.

How to use

  • To draw page every time when page loads, append the following code at the end of your page

    <script src="https://rawgit.com/allenhwkim/drawpage/master/draw-page.js"></script>
    <script>drawPage()</script>
    
  • Or, only to test how it looks like

    1. Go to any web page, and open a console

    2. copy paste the following code if "Content-Security-Policy" is allowed

        (function() {
           var dp = document.createElement('script'); dp.type = 'text/javascript'; dp.async = true;
           dp.src = 'https://rawgit.com/allenhwkim/drawpage/master/draw-page.js';
           document.documentElement.appendChild(dp);
         })();
      
    3. run drawPage() command

Functions

  1. drawPage function
    Draw all given elements, and disappear when finished.
  • argument
    • optional, css selector
      in default, "div". For example;
      drawPage("table") will draw all tables in the document.
      drawPage(".drawme") will draw all elements that has drawme class.
  1. cutIntoEl function
    Draw a single element, and highlight it with the effect of cutting into the element.
    The drawing canvas will not disappear and wait for the user to click that element.
  • argument
    • required, css selector or HTML element
      cutIntoEl("#myDiv") will draw an element with id, myDiv, then wait for click

drawpage's People

Contributors

allenhwkim avatar povse avatar

Watchers

 avatar  avatar

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.