Skip to content

Instantly share code, notes, and snippets.

View cdr6934's full-sized avatar

Chris Ried cdr6934

View GitHub Profile
@cdr6934
cdr6934 / detect-js-framework.js
Created August 15, 2023 18:28 — forked from rambabusaravanan/detect-js-framework.js
Detect JS Framework used in a Website
// Paste these lines into website's console (Win/Linux: Ctrl + Shift + I / Mac: Cmd + Alt + I)
if(!!window.React ||
!!document.querySelector('[data-reactroot], [data-reactid]') ||
Array.from(document.querySelectorAll('*')).some(e => e._reactRootContainer !== undefined || Object.keys(e).some(k => k.startsWith('__reactContainer')))
)
console.log('React.js');
if(!!document.querySelector('script[id=__NEXT_DATA__]'))
console.log('Next.js');
@cdr6934
cdr6934 / 0_reuse_code.js
Created July 22, 2014 13:10
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console