Skip to content

Instantly share code, notes, and snippets.

View Sandstedt's full-sized avatar

Jonas Sandstedt Sandstedt

View GitHub Profile
@Sandstedt
Sandstedt / FullyReveal
Last active April 28, 2021 10:15
A helpclass to use IntersectionObserver API to detect if an element is in view or not
/**
* @class FullyReveal
* Use IntersectionObserver to detect if an element
* is in view or not. Then add and delete a class.
* Use this to animate the element
*
* Usage: Add `data-reveal` on the DOM objects you wanna listen to.
* You can also set `data-revealThreshold="0.5"` for a different threshold,
* else it fallbacks to 0.25
* If you only want it to trigger once, write `data-reveal="once"`
@Restuta
Restuta / framework-sizes.md
Last active March 7, 2024 00:01
Sizes of JS frameworks, just minified + minified and gzipped, (React, Angular 2, Vue, Ember)

Below is the list of modern JS frameworks and almost frameworks – React, Vue, Angular, Ember and others.

All files were downloaded from https://cdnjs.com and named accordingly. Output from ls command is stripped out (irrelevant stuff)

As-is (minified)

$ ls -lhS
566K Jan 4 22:03 angular2.min.js
@nathansmith
nathansmith / detect_full_screen.html
Created May 18, 2011 15:42
Detect full-screen mode for desktop browsers.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Detect Full-Screen</title>
<style>
* {
font-family: sans-serif;
line-height: 1.5;