https://www.framer.com/blog/how-we-pick-translation-models-for-framer/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Queue of functions to invoke | |
| * @type {Array<(time: number) => void>} | |
| */ | |
| let callbacks = []; | |
| let channel = new MessageChannel(); | |
| let postMessage = (function() { | |
| this.postMessage(undefined); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * DevTools snippet – find potential stutter sources | |
| * Run in the Chrome DevTools console on any page | |
| * Flags: | |
| * 1. Elements > 1000×1000 px that have any transform-* or opacity set | |
| * 2. Elements that have any filter applied | |
| * If at least one of each category exists → we have a match. | |
| * Matching elements get a red 3 px outline and a console table. | |
| */ | |
| (() => { |
Add this to before you load any 3p (especially GTM) in the document.
What it does is when it executes:
- for click, auxclick, mousedown, keyup and submit, installs a
documentleveladdEventListeneroverride that intercepts added listeners if it's likely they from from a 3p (-> based on the 3rd argument passed to the fn)
On the document load event (so that it executes after GTM etc.):
- for the same events, installs a
document.bodylevel override - overrides
dataLayer.pushandgtag()to yield first
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // no leading call, only trailing | |
| function debounce(callback, timeout, _time) { | |
| timeout = timeout || 100; | |
| return function debounce() { | |
| window.clearTimeout(_time); | |
| _time = window.setTimeout(callback, timeout); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function on_resize(namespace, callback, t) { | |
| $(window).on('resize.' + namespace, function () { | |
| clearTimeout(t); | |
| t = setTimeout(callback, 100); | |
| }); | |
| return callback; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| +function(proto, Object) { | |
| 'use strict' | |
| var originalBind = proto.bind | |
| Object.defineProperty(proto, 'bind', { | |
| value: function bind(context) { | |
| var callback = this | |
| return arguments.length === 1 ? function () { return callback.apply(context, arguments) } : originalBind.apply(callback, arguments) | |
| } | |
| }) | |
| }(Function.prototype, Object) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| node_modules/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @keyframes parade{ | |
| 0% { | |
| } | |
| 50% { | |
| left: -100px; | |
| transform: rotate(-50deg); | |
| } | |
| 75% { | |
| } | |
| 100% { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #torwart { | |
| position: relative; | |
| top: -20.5em; | |
| left: 13.5em; | |
| } | |
| #torwart > img { | |
| height: 14em; | |
| } |
NewerOlder