Skip to content

Instantly share code, notes, and snippets.

0400d683e3b13f080ae79281391daeda72fe6859392372575dc78d15cf537e9049ef8b3bbc600a71463974fe5439d55365e271bb6d44d4945c1efba959992cf83d
@JaneOri
JaneOri / lolscript.md
Created June 19, 2018 22:32
Perception Exploit

https://github.com/James0x57/lolscript

// What if I told you the final value of 'lol' depends on the website you're on?
// YOU WON'T BELIEVE WHAT IT IS WHEN YOU'RE ON https://google.com !!
var lol = this;
var lo󠅥󠅮󠅤󠅩󠅡󠅮l = lol => (new TextDecoder()).decode(new Uint8Array(Uint16Array.from(lol, x => x.codePointAt(0)).buffer));
var lo󠅵󠅮l = lo󠅥󠅮󠅤󠅩󠅡󠅮l("湵");
var lo󠅥󠅳󠅣󠅡󠅰󠅥l = lo󠅥󠅮󠅤󠅩󠅡󠅮l("獥慣数");
@JaneOri
JaneOri / insertedandremoveddom.js
Created July 11, 2018 03:29
inserted and removed callbacks for given selectors. Useful for user scripts or other hacks when you don't have source access.
// Given parent container selector and child selector, call inserted and removed for elements that match the selector.
// Inserted and removed callbacks are called with an array of the relevant matching dom nodes.
// Intention is to use this for User Scripts or other cases when you don't have access to source
//## Begin Selector Observation Code
var selectors = [];
(new MutationObserver(
function (mutationsList) {
var s, selector, nodeMatches
var slen = selectors.length
@JaneOri
JaneOri / stealjs.wasm.md
Created March 11, 2019 12:11
Load/Import webassembly modules with StealJS

Couldn't find a plugin to load web assembly modules so I wrote one. Posting it here in case anyone else needs it whenever:

./wasm.js:

exports.fetch = () => ""
exports.instantiate = function (load) {
  const loader = this
  return fetch(load.address).then(r => {
 const contentType = r.headers.get("content-type")
@JaneOri
JaneOri / challenge.md
Created March 14, 2019 17:13
CSS "Tristate with hold" Like (off) / Liked (on) / Unlike (on & hover, but not right away)

via: https://twitter.com/mikesherov/status/1106187591529975810

CSS challenge: make a pure CSS “tristate with hold” toggle

Requirements:
1. If off, show “like”
2. If on + no hover, show “liked”
3. If on + hover, show “unlike”
4. (The twist!) Right after toggling on, before unhovering, show “liked”
@JaneOri
JaneOri / nth-vars.css
Created June 25, 2021 05:49
CSS --nth-child & --nth-of-type variables for every element 🎉
/* adds --nth-child and --nth-of-type variables to every element */
/* when placed in a calc, it holds the expected value in range [1,512] */
/* --nth-child and --nth-of-type greater than 512 will evaluate to 0 */
/* by Jane @ https://github.com/propjockey */
* {
--nth-__cb0:0;--nth-__cb1:0;--nth-__cb2:0;--nth-__cb3:0;
--nth-__cb4:0;--nth-__cb5:0;--nth-__cb6:0;--nth-__cb7:0;
--nth-__cb8:0;--nth-child:(
var(--nth-__cb8) * 256 + var(--nth-__cb7) * 128 + var(--nth-__cb6) * 64 +
var(--nth-__cb5) * 32 + var(--nth-__cb4) * 16 + var(--nth-__cb3) * 8 +