@@ -14,6 +14,12 @@ function create_issue(issue_url, domain_name, author_name, creator_name, comment
14
14
return html ;
15
15
}
16
16
17
+ function get_domain_from_url ( issue ) {
18
+ var regExp = / h t t p s : \/ \/ i n s t a n t v i e w \. t e l e g r a m \. o r g \/ c o n t e s t \/ ( .* ?) \/ t e m p l a t e [ 0 - 9 ] + \/ i s s u e [ 0 - 9 ] + \/ ? / g;
19
+ var domain_name = regExp . exec ( issue . url ) [ 1 ] ;
20
+ return domain_name ;
21
+ }
22
+
17
23
function filter ( ) {
18
24
// Get all filters
19
25
self_made_cb = document . getElementById ( "self-made-cb" ) ;
@@ -90,7 +96,12 @@ function filter() {
90
96
if ( domain_search != "" ) {
91
97
tmp_result_set = [ ] ;
92
98
ret_result_set . forEach ( issue => {
93
- if ( issue . domain . toLowerCase ( ) . includes ( String ( domain_search ) . toLowerCase ( ) ) ) {
99
+ domain = issue . domain ;
100
+ if ( domain == undefined ) {
101
+ domain = get_domain_from_url ( issue ) ;
102
+ }
103
+
104
+ if ( domain . toLowerCase ( ) . includes ( String ( domain_search ) . toLowerCase ( ) ) ) {
94
105
tmp_result_set . push ( issue ) ;
95
106
}
96
107
} ) ;
@@ -161,8 +172,13 @@ function draw_result_set() {
161
172
let html = "" ;
162
173
163
174
result_set . forEach ( issue => {
175
+ domain = issue . domain ;
176
+ if ( domain == undefined ) {
177
+ domain = get_domain_from_url ( issue ) ;
178
+ }
179
+
164
180
if ( issue . author . includes ( String ( name ) ) || issue . template_creator . includes ( String ( name ) ) ) {
165
- html += create_issue ( issue . url , issue . domain , issue . author , issue . template_creator , issue . comment , issue . creator_comment ) ;
181
+ html += create_issue ( issue . url , domain , issue . author , issue . template_creator , issue . comment , issue . creator_comment ) ;
166
182
}
167
183
} ) ;
168
184
list . innerHTML = html ;
0 commit comments