Skip to content

Instantly share code, notes, and snippets.

View codefrau's full-sized avatar
🦩
hacking on @croquet

Vanessa Freudenberg codefrau

🦩
hacking on @croquet
View GitHub Profile
@codefrau
codefrau / es.po
Created May 10, 2011 22:04
Etoys Plugin Launcher Translation
msgid ""
msgstr ""
"Project-Id-Version: Etoys Plugin Launcher\n"
"POT-Creation-Date: 2011-05-10 17:59-0000\n"
"PO-Revision-Date: 2011-05-10 18:52-0300\n"
"Last-Translator: Name <[email protected]>\n"
"Language-Team: Spanish\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
// Replacement for setTimeout/clearTimeout in Cloudflare Workers
// Avoids "Cannot clear a timeout created in a different request context" error
//
// Usage:
// import { setTimeout, clearTimeout } from "./cloudflare-timeout.mjs"
//
// Author: Vanessa "Codefrau" Freudenberg <[email protected]>
export function setTimeout(func, ...args) {
const timeout = { cancelled: false };
@codefrau
codefrau / cloudflare-timeout.mjs
Last active September 6, 2021 21:06
Workaround for "Cannot clear a timeout created in a different request context" error in Cloudflare Workers
// Replacement for setTimeout/clearTimeout in Cloudflare Workers
// Avoids "Cannot clear a timeout created in a different request context" error
//
// Usage:
// import { setTimeout, clearTimeout } from "./cloudflare-timeout.mjs"
//
// Author: Vanessa "Codefrau" Freudenberg <[email protected]>
export function setTimeout(func, ...opts) {
const timeout = { cancelled: false };