-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcc-restrictions.ts
More file actions
49 lines (44 loc) · 1.15 KB
/
cc-restrictions.ts
File metadata and controls
49 lines (44 loc) · 1.15 KB
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
let enableEmpty
let radioButtonA
let radioButtonB
function switchRadioButtonAV1() {
if (enableEmpty) {
radioButtonA = !radioButtonA
radioButtonB = radioButtonA ? false : radioButtonB
} else {
radioButtonA = radioButtonA ? radioButtonA : !radioButtonA
radioButtonB = !radioButtonA
}
}
function switchRadioButtonAV2() {
radioButtonA = !enableEmpty || !radioButtonA
radioButtonB = false
}
function figureGoingToFromUrl(path: string) {
if (path) {
if (path.includes('reports/budgets')) return 'budgets'
if (path.includes('reports/content')) return 'content'
if (path.includes('reports/byDay')) return 'byDay'
if (path.includes('reports/byMonth')) return 'byMonth'
if (path.includes('reports/byDayAndHour')) return 'byDayAndHour'
if (path.includes('reports/byDayOfWeek')) return 'byDayOfWeek'
if (path.includes('reports/byHour')) return 'byHour'
}
}
function maxPrime(limit) {
let prime = 0,
i = 0,
j = 0
OUTER: for (i = 0; i < limit; ++i) {
if (i < 2) {
continue
}
for (j = 2; j < i; ++j) {
if (i % j === 0) {
continue OUTER
}
}
prime = i
}
return prime
}