Giter Club home page Giter Club logo

usefuljssnippetextension's Introduction

extension icon Useful Snippets Extension

A Chrome Extension with Useful JavaScript snippets for testing.

Feel free to contribute to this set of snippets.

What we are looking for are short JavaScript snippets that can run from a popup menu and provide small useful aids to support testing.

The snippets should also be small enough that they provide useful examples of using JavaScript from the console or as Bookmarklets and help people learn to use JavaScript in their testing.

Basic Install Instructions

  • Download and extract this repository somewhere
  • Navigate to chrome://extensions within Chrome
  • Ensure to switch 'Developer mode' on (a toggle at the top right of the page)
  • Select 'Load unpacked' and then navigate to the /extension folder
  • Navigate to a website and then right click it to access the Useful Snippets context menu
  • After executing a snippet you can see the bot code and get the code as a bookmarklet by viewing the DevTools console

how to install extension

Current Snippets

Below is a list of snippets currently available with this extension. Have an idea? Want to contribute? Please feel free to fork this repository, add snippets and then create a pull request.

Accessibility

  • Remove images which do not have alt tags
  • Show images which do not have alt tags
  • Remove inputs which do not have matching for labels
  • Show inputs which do not have matching for labels
  • Remove elements with duplicate id's
  • Show elements with duplicate id's
  • Remove page style sheets
  • Visualise page tab flow

Exploits

  • Insert JS Script Injection in all inputs
  • Insert SQL Injection in all inputs

Styling

  • Check label text overflow
  • Check button text overflow
  • Check link text overflow
  • Check page text overflow
  • Check all elements text overflow

Utilities

  • Switch document edit mode on
  • Switch document edit mode off
  • Pretty print a JSON string
  • Encode a string as Base64
  • Decode a Base64 string
  • For Every element Do this
    • will prompt twice, first for a CSS selector, next for some javascript to execute against the element variable.
    • e.g. "p" and then "console.log(element.innerText)" would write out the text of all paragraphs to the console
    • e.g. "[role='checkbox']" and then "element.click()" would toggle all checkboxes
  • Link Checker
    • A simple link checker - all CORS and mixed content errors are displayed in console, console.table used for report output

Validation (Client side)

  • Remove max length attributes from fields
  • Remove required field attributes from fields
  • Remove paste restrictions from fields
  • Change all inputs types to text

Contributors

See commit history for the authorship of the ongoing snippets.

usefuljssnippetextension's People

Contributors

eviltester avatar vivrichards600 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.