forked from retoor/devplacepy
The diff adds the mandatory `retoor <retoor@molodetz.nl>` header comment to every `.py` file under `devplacepy/` (including `__init__.py` and `routers/__init__.py`), and updates the `StyleAgent` in `agents/style.py` to instruct agents to only add the header on created or already-edited files rather than sweeping the entire repo. The `agents/base.py` operating protocol is also revised to reorder and clarify tool discipline rules.
16 lines
421 B
JavaScript
16 lines
421 B
JavaScript
// retoor <retoor@molodetz.nl>
|
|
|
|
export class Toast {
|
|
static flash(element, message, ms = 2000, revertTo = null) {
|
|
const original = revertTo === null ? element.textContent : revertTo;
|
|
element.textContent = message;
|
|
setTimeout(() => {
|
|
if (element.textContent === message) {
|
|
element.textContent = original;
|
|
}
|
|
}, ms);
|
|
}
|
|
}
|
|
|
|
window.Toast = Toast;
|