Rocky_Mountain_Vending/.pnpm-store/v10/files/9c/17b099fd1ab69535c14cdab3ba305edaf1863e27c5831c4b30476554e9cdcb31ba8edcf4ce237ace6bae791c3e3f68aa54e478728851e28f52f3ff313aec4d
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

27 lines
661 B
Text

/* IMPORT */
/* MAIN */
class Interceptor {
/* CONSTRUCTOR */
constructor() {
/* VARIABLES */
this.callbacks = new Set();
/* API */
this.exit = () => {
for (const callback of this.callbacks) {
callback();
}
};
this.hook = () => {
window.addEventListener('beforeunload', this.exit);
};
this.register = (callback) => {
this.callbacks.add(callback);
return () => {
this.callbacks.delete(callback);
};
};
this.hook();
}
}
/* EXPORT */
export default new Interceptor();