generated from hejny/spacetrim
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathoptions.ts
76 lines (64 loc) · 1.93 KB
/
options.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
export interface IUkraineOptions {
/**
* In which element should the flag + text + blood be inserted.
* Note: If not specified, a new element will be created and appended to the body.
*/
element: HTMLElement;
/**
* List of banned countries by ISO 3166
*/
countries: string[];
/**
* What text to show
* Note: It is possible to use HTML tags - do not pass here user input
*/
text: string;
/**
* Link to more information about this war
* Note: Using type string (not URL class) to keep maximal compatibility
*/
moreInfoUrl: string;
/**
* If set, ribbon with Ukraine flag leading to `moreInfoUrl` will be shown in corner of the page for all users
*/
ribbon: null | 'TOP_LEFT' | 'TOP_RIGHT' | 'BOTTOM_LEFT' | 'BOTTOM_RIGHT';
/**
* If true, shadow will be shown on the ribbon and other graphic elements
*/
hasShadow: boolean;
/**
* If true, information will be shown also in dev console
*/
isInConsole: boolean;
/**
* If true, image of the blood will be shown.
*/
isBloodIncluded: boolean;
/**
* If true, images from war will be shown.
* If string, image with given URL will be shown
*/
isGraphicIncluded: boolean | string;
/**
* If true, there will be option to proceed to website
* This will change HARD ban to SOFT ban
*/
isCancelable: boolean;
}
export const defaultOptions: Omit<IUkraineOptions, 'element'> = {
/**
* TODO: Add more countries like chechnya
*/
countries: [/* Russia and Belarus */ 'ru', 'by'],
text: `Остановить войну с <b>Украиной</b>`,
/**
* TODO: Probbably better default URL
*/
moreInfoUrl: `https://github.com/hejny/Ukraine`,
ribbon: 'TOP_LEFT',
hasShadow: false,
isInConsole: true,
isBloodIncluded: true,
isGraphicIncluded: true,
isCancelable: false,
};