Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions extension-ready/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,6 @@ class DraftApplyExtension {
return 'textarea,' +
'input:not([type]),' +
'input[type="text"],input[type="email"],input[type="tel"],input[type="search"],input[type="url"],' +
'input[type="number"],' +
'[contenteditable="true"],[role="textbox"]';
}

Expand Down Expand Up @@ -1204,7 +1203,12 @@ class DraftApplyExtension {

if (el instanceof HTMLInputElement) {
const setter = Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, 'value')?.set;
setter?.call(el, value);
try {
setter?.call(el, value);
} catch {
// number/date/range inputs throw when value doesn't conform to their type
el.value = value;
}
return;
}
}
Expand Down
4 changes: 3 additions & 1 deletion render-proxy/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ if (!GROQ_API_KEY || !TOKEN_SECRET) {
const app = express();
app.disable('x-powered-by');
app.use(helmet());
app.use(cors());
app.use(cors({
exposedHeaders: ['RateLimit-Limit', 'RateLimit-Remaining', 'RateLimit-Reset', 'RateLimit-Policy']
}));
app.use(express.json({ limit: '1mb' }));

function base64url(buf) {
Expand Down
Loading