Skip to content

Instantly share code, notes, and snippets.

View novweb's full-sized avatar

Valeriy Novikov novweb

View GitHub Profile
@novweb
novweb / @aws-amplify+auth+6.11.4.patch
Last active April 29, 2025 21:59
Patched @aws-amplify/auth signInWithRedirect for CapacitorJS support
diff --git a/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/apis/signInWithRedirect.mjs b/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/apis/signInWithRedirect.mjs
index ed3ad4b..e88dcca 100644
--- a/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/apis/signInWithRedirect.mjs
+++ b/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/apis/signInWithRedirect.mjs
@@ -17,6 +17,9 @@ import { completeOAuthFlow } from '../utils/oauth/completeOAuthFlow.mjs';
import '../../../types/Auth.mjs';
import { createOAuthError } from '../utils/oauth/createOAuthError.mjs';
import { listenForOAuthFlowCancellation } from '../utils/oauth/cancelOAuthFlow.mjs';
+import { Browser } from '@capacitor/browser';
+import { App } from '@capacitor/app';
ln -s /path/to/original /path/to/link
@novweb
novweb / reverse.css
Created September 21, 2020 12:07
Invert block colors based on background
.reverse {
mix-blend-mode: exclusion;
filter: invert(1);
}
const { body } = document
/**
* Opening the modal:
* Record the body width
* Set body overflow to hidden
* Explicitly set the body width to what it was in step 1.
*/
const oldWidth = body.offsetWidth
body.classList.add('overflow-hidden')
@novweb
novweb / better-font-smoothing.css
Created February 3, 2019 11:10 — forked from hsleonis/better-font-smoothing.css
Better font smoothing in cross browser
html {
/* Adjust font size */
font-size: 100%;
-webkit-text-size-adjust: 100%;
/* Font varient */
font-variant-ligatures: none;
-webkit-font-variant-ligatures: none;
/* Smoothing */
text-rendering: optimizeLegibility;
-moz-osx-font-smoothing: grayscale;
@mixin media($media) {
@if $media == phone-only {
@media only screen and (max-width: 599px) { @content; }
}
@else if $media == tablet-p {
@media only screen and (min-width: 600px) { @content; }
}
@else if $media == tablet-p-only {
@media only screen and (min-width: 600px) and (max-width: 899px) { @content; }
}