Skip to content

Instantly share code, notes, and snippets.

View rockinghelvetica's full-sized avatar

Nicholas Macias rockinghelvetica

View GitHub Profile
document.addEventListener('DOMContentLoaded', (event) => {
const twitterVideoMenu = () => {
// The scripts are loaded, so you can run your code now
document.getElementById('react-root').addEventListener('click', async (event) => {
// This intercepts all clicks so let's make the test lightweight
if(!event.target.textContent.includes('Copy video address')) return false;
const getVariantsFromMemo = (domElement) => {
let variantsArray = [];
for (let key in domElement) {
@rockinghelvetica
rockinghelvetica / DJNavigation.as
Last active October 3, 2022 22:31
Old ActionScript code for Dancejam header effect
//Regarding https://twitter.com/nicholasmacias/status/1577057407112314881
import DJNavigationControl;
import DJNavigationModel;
import flash.display.BitmapData;
import flash.geom.Matrix;
import flash.geom.ColorTransform;
import flash.geom.Point;
import flash.geom.Rectangle;
// POLYFILLS
// Event.composedPath
// Possibly normalize to add window to Safari's chain, as it does not?
(function(E, d, w) {
if(!E.composedPath) {
E.composedPath = function() {
if (this.path) {
return this.path;
}
var target = this.target;
// POLYFILLS
// Event.composedPath
// Possibly normalize to add window to Safari's chain, as it does not?
(function(E, d, w) {
if(!E.composedPath) {
E.composedPath = function() {
if (this.path) {
return this.path;
}
var target = this.target;
1. Banana
2. Strawberry
3. Pretzel
@rockinghelvetica
rockinghelvetica / jquery.fixbaselines.js
Created March 18, 2011 06:08
Fix broken baseline alignment in Webkit when using multiple columns.
/*
* Fix baseline alignment in Webkit for CSS3 columns.
* Copyright 2011 Nicholas Macias
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*/
(function($){