Giter VIP home page Giter VIP logo

shoplifter's Introduction

#My solution to the following challenge:

For this challenge your solution should be entirely javascript and should work if pasted directly into the javascript console of the browser after the page has loaded.

Go to www.marmot.com and add at least 2 products to your cart. Then return to the home page. Write a javascript snippet that can be run in the console of a browser that does the following:

Extract the number of items in the cart, the cart total, and item images from the page. Store them in javascript variables.

Create a trigger that activates when the user scrolls into the bottom 10% of the page.

The trigger should show a centered overlay on top of the site that displays the information gathered above and two buttons. One button closes the overlay and the other takes the user to the cart page. It should have a style consistent with the website. Design matters.

Behind the overlay add a semi­transparent black background that obscures the site. The overlay should be able to trigger multiple times if dismissed.

BONUS

  1. Describe some other ways you might be able to obtain the information needed for the overlay (think generally, not specific to THIS website).

shoplifter's People

Contributors

mindfulwizard 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.