Giter Site home page Giter Site logo

naturaldoc / devtools-snippets Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bgrins/devtools-snippets

0.0 2.0 0.0 2.36 MB

A collection of helpful snippets to use inside of browser devtools

Home Page: http://bgrins.github.io/devtools-snippets/

devtools-snippets's Introduction

devtools-snippets

A collection of helpful snippets to use inside of browser devtools.

View them all on a single page: http://bgrins.github.io/devtools-snippets/ or all of them inside of github. I have a more long winded article about snippets detailing why you might use them and additional features that would be nice, if you are interested.

If you have a useful snippet or updates to an existing one that you'd like to share, please contribute it or open an issue! Feel free to use, modify, or share any of these snippets.

To Enable DevTools Snippets in Chrome

Note: snippets are enabled by default in Chrome Canary and will be usable without changing your settings soon. You can read more about snippets at the Chrome developer tools documentation.

  • Open Chrome.
  • Navigate to chrome://flags -> Enable Developer Tools experiments.
  • Open Devtools -> Settings -> Developer Tools Experiments -> Enable "Snippets support".
  • Close and reopen devtools.
  • Open "Sources" panel.
  • Go to "Snippets" tab, and add whichever ones you want.

Chrome Flags

Chrome Enable Snippets

Chrome Snippets

To Use DevTools Snippets in Firefox Scratchpad

Note: you can read more about scratchpad at the Firefox developers tools documentation.

  • Open Firefox.
  • Go to Tools > Web Developer > Scratchpad.
  • Copy/paste and Cmd-R / Ctrl-R to run.
  • File > Save, then File > Open Recent to reuse them.

Firefox Scratchpad

Snippet screenshots

Or, view all on a single page with code: http://bgrins.github.io/devtools-snippets/

jquerify.js

Includes jQuery onto a page if it is not yet included.

jquerify

log.js

Adds a log function to window object.

log

showheaders.js

Pretty prints the HTTP headers for the current page into the console. Uses console.table.

showheaders

dataurl.js

Convert all images on the page to data URLs. Note: this only works for images that are on the same domain as the current page.

dataurl

allcolors.js

Print out all colors from computed styles used in elements on the page. Uses styled console.log calls to visualize each color.

allcolors

performance.js

Print out information about the window.performance object. Uses console.table and grouping to organize the information.

performance

cssprettifier.js

Script for unminifying and prettifying a CSS file written by addyosmani and sindresorhus. View the cssprettifier-bookmarklet project on github.

cssprettifier

hashlink.js

Handy way to find the closest linkable element on a page. Run it, then click on an element, and it will give you the closest #link to that page.

hashlink

hashlink

querystringvalues.js

Print a table of query string (GET) values. This can be helpful, especially when trying to read the values from a long or complicated URL that may otherwise need to be pasted into another editor to read. Implementation by mattpass.

querystringvalues

devtools-snippets's People

Contributors

bgrins avatar danharper avatar delapouite avatar fmovlex avatar kienz avatar mattpass avatar sergeylukin avatar yawboakye 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.