Skip to content

Commit 1427582

Browse files
save file
1 parent b543d9b commit 1427582

File tree

1 file changed

+69
-69
lines changed

1 file changed

+69
-69
lines changed

utils/github/search-for-a-file-across-all-github-repos/search-for-a-file-across-all-github-repos.html

Lines changed: 69 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,21 @@
55

66
<head>
77
<meta charset=utf-8>
8-
8+
99
<title>
1010
Search For A File Across Github Repos
1111
</title>
1212

1313
<meta name=description content='search for a file across all github repos'>
14-
14+
1515
<base href='https://ext-code.com/utils/github/search-for-a-file-across-all-github-repos/'>
1616
<base href='https://javascript-2020.github.io/utils/github/search-for-a-file-across-all-github-repos/'>
1717

1818
<link rel='canonical' href='https://ext-code.com/utils/github/search-for-a-file-across-all-github-repos/search-for-a-file-across-all-github-repos.html'>
1919

2020
<meta name=viewport content='width=device-width, initial-scale=1'>
2121
<link rel='shortcut icon' type='image/x-icon' href='/favicon.ico'>
22-
22+
2323
<script type='application/ld+json'>
2424
{
2525
"@context" : "https://schema.org",
@@ -35,25 +35,25 @@
3535
"offers" : {"@type":"Offer","price":"0","priceCurrency":"GBP"}
3636
}
3737
</script>
38-
39-
4038

41-
42-
<script src='https://libs.ext-code.com/js/dom/component/component.js'></script>
43-
39+
40+
41+
42+
<script src='https://libs.ext-code.com/js/dom/component/v3.0/component.js'></script>
43+
4444
<script>
4545
console.clear();
4646
console.log('search-for-a-file-across-all-github-repos-v2.0.html');
4747
console.log();
4848
console.json=v=>console.log(JSON.stringify(v,null,4));
49-
49+
5050
var ext;
5151
var $;
5252
var datatype;
5353
var menumod;
5454
var keydown;
5555
var github;
56-
56+
5757
var menu;
5858

5959
var hdr;
@@ -67,7 +67,7 @@
6767

6868

6969
menu = menumod();
70-
70+
7171
mod.base.add({ext,$,datatype,keydown,menu,menumod});
7272

7373

@@ -82,7 +82,7 @@
8282
log.init(),
8383
]);
8484

85-
85+
8686
initdom(document.body);
8787

8888

@@ -94,7 +94,7 @@
9494
mod.stack.add;
9595

9696
({ext} = await import('https://libs.ext-code.com/js/io/ext-loader/ext-loader.m.js'));
97-
97+
9898
var promise = ext.load.libs(
9999
'js/dom/$.js',
100100
'js/core/datatype.js',
@@ -103,16 +103,16 @@
103103
'github/github.js.api',
104104
);
105105
[$,datatype,menumod,keydown,github] = await promise;
106-
106+
107107
mod.stack.complete;
108-
108+
109109
})();
110-
111110

112-
</script>
113111

112+
</script>
113+
114114
<style>
115-
115+
116116
html
117117
{height:100%;font-family:arial}
118118
body
@@ -164,11 +164,11 @@
164164
.item:nth-child(odd)
165165
{background:whitesmoke}
166166

167-
167+
168168
.item
169169
{margin:5px auto;white-space:nowrap;cursor:pointer}
170-
171-
.item td
170+
171+
.item td
172172
{padding:5px 20px;border:none}
173173
.item .rem img
174174
{border:none;width:15px;height:15px;padding:2px 0;
@@ -185,8 +185,8 @@
185185

186186
#progress
187187
{}
188-
189-
188+
189+
190190
.spc
191191
{flex:1}
192192
.icon
@@ -197,39 +197,39 @@
197197
.paste
198198
{content:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAYxJREFUOE/NlLFKw1AUhs9thDSSNhYEC1LIdWj2bl07OPcJxMUXMFsHjUsXrdBdB3HwARxLwIIQXJxcUooHbCOEutRKh9AYucXGtknTGhw8Y3Lud89//stP4I+LRPEopdb3/31EbKxydyhQluVjQoiaTCZTPM9Dv98Hz/M0nufPTdMcRIF9oKIoKcdx3ifNHMeBJEkgiiJYlgWu605zsohoh4F9IJsqs+5pp+UeHNxsgSAIQMiPgOFwCGflHjTbAtw+ia+IuL0UmE1/asbhyxgYVuyyq4c01JuZ3wGjdlS/2/hnQNcDePvg/KEvDQkuDMkejUYF9rHT6TBzfMdmTJnscFry3nUW7p+FqC00EHF30rAUuHNCoVqtQrFYDEANw4BKpQKI6HNWBtZqtQBQVdX4QNM0A0BFUeIDmbT5YquILXmRK7GBsSZcSxBtU5wJAbAH3NjlfD4fGLLVai2WzLpZQMyfIoQclUqlRC6XCwC73S7ouh7+bBbtiFLKkuIx4mUXpqMsMrFXSej5ni+XXuAVg6oGswAAAABJRU5ErkJggg==');
199199
}
200-
200+
201201

202202
input
203203
{font-size:16px;padding:5px 10px}
204204
[type=button],[type=checkbox]
205205
{cursor:pointer}
206-
207-
206+
207+
208208
.visually-hidden
209209
{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;
210210
clip:rect(0 0 0 0) !important;white-space:nowrap !important;border:0 !important}
211-
212-
211+
212+
213213
</style>
214-
215-
214+
215+
216216
</head>
217-
217+
218218

219219
<body>
220-
221-
220+
221+
222222
<github-hdr component=grp>
223223
<h1 class=visually-hidden>
224224
Download Github Directory
225225
</h1>
226226
<img style='top:0px;height:50px' class=title src='images/github-file-search-2.png' alt='Search For A File Across Github Repos'>
227227
<time slot=date datetime=2025-10-31>31 Oct 2025</time>
228228
</github-hdr>
229-
230-
231-
232-
229+
230+
231+
232+
233233
<div id=desc>
234234
<div>
235235
search for a file across all github repos
@@ -243,7 +243,7 @@ <h1 class=visually-hidden>
243243
</a>
244244
</div>
245245
</div>
246-
246+
247247

248248
<div id=token-root class=field>
249249
<span class=label>
@@ -307,7 +307,7 @@ <h1 class=visually-hidden>
307307
<div id=bar>
308308
</div>
309309
</div>
310-
310+
311311
<div id=results>
312312

313313
<table>
@@ -327,8 +327,8 @@ <h1 class=visually-hidden>
327327
no files found
328328
</td>
329329
</tr>
330-
331-
</tbody>
330+
331+
</tbody>
332332

333333
</table>
334334

@@ -337,10 +337,10 @@ <h1 class=visually-hidden>
337337

338338
<log-mod component></log-mod>
339339

340-
340+
341341
</body>
342-
343-
342+
343+
344344

345345
<script>
346346

@@ -365,7 +365,7 @@ <h1 class=visually-hidden>
365365
var create = {};
366366
var fn = {};
367367

368-
368+
369369
function initdom(rootnode){
370370

371371
var root = rootnode;
@@ -394,7 +394,7 @@ <h1 class=visually-hidden>
394394
$.icon.copy2(icon,search);
395395
icon = $(root,'#search-paste');
396396
$.icon.paste2(icon,search);
397-
397+
398398

399399
$('[value=search]').onclick = btn.search;
400400

@@ -452,33 +452,33 @@ <h1 class=visually-hidden>
452452
chk.regex.checked = false;
453453

454454
}//plain
455-
456-
455+
456+
457457
btn.wildcard = function(){
458458

459459
type = 'wildcard';
460460

461461
chk.plain.checked = false;
462462
chk.wildcard.checked = true;
463463
chk.regex.checked = false;
464-
464+
465465
}//wildcard
466466

467467

468468
btn.regex = function(){
469-
469+
470470
type = 'regex';
471471

472472
chk.plain.checked = false;
473473
chk.wildcard.checked = false;
474474
chk.regex.checked = true;
475-
475+
476476
}//regex
477477

478-
479-
//:
480-
481478

479+
//:
480+
481+
482482
create.item = function(owner,repo,branch,item){console.log(item);
483483

484484
var url = github.build.website({owner,repo,branch,path:item.path});
@@ -506,7 +506,7 @@ <h1 class=visually-hidden>
506506
function remove(e){
507507

508508
e.stopPropagation();
509-
nitem.remove();
509+
nitem.remove();
510510

511511
}//remove
512512

@@ -534,7 +534,7 @@ <h1 class=visually-hidden>
534534
console.log(error);
535535
return;
536536
}
537-
537+
538538
var ct = 0;
539539

540540
await Promise.all(list.map(async repo=>{
@@ -560,7 +560,7 @@ <h1 class=visually-hidden>
560560
if(ct==0){
561561
results.append(node.notfound);
562562
}
563-
563+
564564
}//search
565565

566566

@@ -570,7 +570,7 @@ <h1 class=visually-hidden>
570570
return result;
571571

572572
}//plain
573-
573+
574574

575575
fn.wildcard = function(name,search){
576576

@@ -596,10 +596,10 @@ <h1 class=visually-hidden>
596596

597597

598598
function wildcard(search,pattern,mode){
599-
599+
600600
var re = '';
601601
var esc = '.+^${}()|[]\\';
602-
var n = pattern.length;
602+
var n = pattern.length;
603603
for(var i=0;i<n;i++){
604604

605605
var c = pattern[i];
@@ -637,15 +637,15 @@ <h1 class=visually-hidden>
637637
}
638638
if(!mode || mode=='ends'){
639639
re = re+'$';
640-
}
640+
}
641641
var regex = new RegExp(re);
642642

643643
var result = regex.test(search);
644644
return result;
645645

646646
}//wildcard
647-
648-
647+
648+
649649
function parse_regex(str){
650650

651651
var index = 0;
@@ -662,19 +662,19 @@ <h1 class=visually-hidden>
662662
}
663663

664664
var [first,pattern,mods] = match;
665-
665+
666666
var flags = Array.from(new Set(mods));
667667
flags = flags.filter(flag=>'gimsuy'.includes(flag))
668668
flags = flags.join('');
669-
669+
670670
var regex = new RegExp(pattern,flags);
671671
return {regex};
672-
672+
673673
}//parse_regex
674-
675-
674+
675+
676676
function hs(size){
677-
677+
678678
size = Number(size);
679679

680680
var t = Math.floor(Math.log(size)/Math.log(1000));

0 commit comments

Comments
 (0)