File size: 397 Bytes
bee6636
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import { ScramjetClient } from "../client";

export default function (client: ScramjetClient) {
	client.Proxy("IDBFactory.prototype.open", {
		apply(ctx) {
			ctx.args[0] = `${client.url.origin}@${ctx.args[0]}`;
		},
	});

	client.Trap("IDBDatabase.prototype.name", {
		get(ctx) {
			const name = ctx.get() as string;

			return name.substring(name.indexOf("@") + 1);
		},
	});
}