This file contains 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
{ | |
"scripts": { | |
"postinstall": "patch-package" | |
}, | |
"devDependencies": { | |
"patch-package": "6.5.1", | |
"shaka-player": "4.3.4" | |
} | |
} |
This file contains 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
""" | |
Draws the text <text> on the ImageDraw <image_draw> in the box (specified as a 4-ple of [x,y,width,height]) | |
with the font <font> and the allignments as given. Passes other arguments to the ImageDraw.text function | |
(for example, fill is a good one to use here). | |
Can be used to center text horizontally and vertically, as well as right-align and bottom-allign (although it defaults to | |
left- and top-allignment). Nothing is done to prevent overflow, but the y and height values from the box will be used for vertical | |
allignment | |
Example usage: |
This file contains 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
export default scope => { | |
// match the filter on autofilled elements in Firefox | |
const mozFilterMatch = /^grayscale\(.+\) brightness\((1)?.*\) contrast\(.+\) invert\(.+\) sepia\(.+\) saturate\(.+\)$/ | |
scope.addEventListener('animationstart', onAnimationStart) | |
scope.addEventListener('input', onInput) | |
scope.addEventListener('transitionstart', onTransitionStart) | |
function onAnimationStart(event) { | |
// detect autofills in Chrome and Safari by: |