-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
26791e5
commit 6a6d158
Showing
4 changed files
with
502 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
async function sloadimg(){ | ||
let fetd= await fetch("https://api.github.com/repos/microintel/Resources/contents/photo"); | ||
|
||
let con=await fetd.json(); | ||
let ranN=await Math.floor(Math.random()*parseInt(con.length)); | ||
// alert(ranN); | ||
document.getElementById('proim').src=con[ranN]["download_url"]; | ||
document.getElementById('tpost').innerHTML=con.length+"<br>posts"; | ||
document.getElementById('tfol').innerHTML=ranN*15+"<br>followers"; | ||
document.getElementById('tflw').innerHTML=ranN*20+"<br>following"; | ||
document.getElementById('abbt').innerHTML=con[ranN]["sha"]; | ||
document.getElementById('loadd').style.display="none"; | ||
|
||
|
||
|
||
const max = parseInt(con.length-2);; | ||
const unar = []; | ||
|
||
while (unar.length <= max) { | ||
const rann = Math.floor(Math.random() * (max + 1)); | ||
if (!unar.includes(rann)) { | ||
unar.push(rann); | ||
} | ||
} | ||
|
||
|
||
for(let xm in unar){ | ||
|
||
let imgli=con[unar[xm]]["download_url"]; | ||
|
||
let imgna=con[unar[xm]]["name"]; | ||
|
||
if (imgna == "xxx.html" || imgna == "index.html" || imgna == "home.html" || imgna == "home.css" || imgna == "home.js" || imgna == "pro.html" || imgna == "pro.css" || imgna == "pro.js" || imgna == "search.html" || imgna == "search.css" || imgna == "search.js" || imgna == "ctus.html") { | ||
continue; | ||
} else { | ||
console.log("html files not included"); | ||
} | ||
|
||
const pa = document.createElement("img"); | ||
pa.className ="imaggg"; | ||
pa.loading="lazy"; | ||
pa.src=imgli; | ||
document.getElementById("po").appendChild(pa); | ||
//document.getElementById("postt").innerHTML+=xxd; | ||
|
||
} | ||
|
||
} | ||
sloadimg(); | ||
|
||
function fff(x){ | ||
document.getElementById('po').style.opacity="0.4"; | ||
document.getElementById('cat').style.opacity="0.4"; | ||
document.getElementById('esp').style.opacity="0.4"; | ||
document.getElementById('pf').style.opacity="0.4"; | ||
document.getElementById('idd').style.opacity="0.4"; | ||
|
||
document.getElementById('imm').src=x; | ||
document.getElementById('con').style.display='block'; | ||
|
||
} | ||
|
||
function hi(){ | ||
document.getElementById('po').style.opacity="1.0"; | ||
document.getElementById('cat').style.opacity="1.0"; | ||
document.getElementById('esp').style.opacity="1.0"; | ||
document.getElementById('pf').style.opacity="1.0"; | ||
document.getElementById('idd').style.opacity="1.0"; | ||
document.getElementById('con').style.display="none"; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
async function sloadimg(){ | ||
let fetd= await fetch("https://api.github.com/repos/microintel/Resources/contents/photo"); | ||
let con=await fetd.json(); | ||
|
||
const max = parseInt(con.length-2);; | ||
const unar = []; | ||
|
||
while (unar.length <= max) { | ||
const rann = Math.floor(Math.random() * (max + 1)); | ||
if (!unar.includes(rann)) { | ||
unar.push(rann); | ||
} | ||
} | ||
|
||
|
||
for(let xm in unar){ | ||
|
||
let imglikee=con[unar[xm]]["download_url"]; | ||
|
||
let imgna=con[unar[xm]]["name"]; | ||
|
||
|
||
if (imgna == "xxx.html" || imgna == "index.html" || imgna == "home.html" || imgna == "home.css" || imgna == "home.js" || imgna == "pro.html" || imgna == "pro.css" || imgna == "pro.js" || imgna == "search.html" || imgna == "search.css" || imgna == "search.js" || imgna == "ctus.html") { | ||
continue; | ||
} else { | ||
console.log("html files not included"); | ||
} | ||
|
||
|
||
let xxd=` | ||
<img class="imaggg" name="${imgna}" onclick="fff(this.src,this.name)" src="${imglikee}" loading="lazy"> | ||
`; | ||
|
||
const pa = document.createElement("div"); | ||
pa.innerHTML =xxd; | ||
pa.id="fffl"; | ||
document.getElementById("ddddi").appendChild(pa); | ||
//document.getElementById("postt").innerHTML+=xxd; | ||
|
||
} | ||
|
||
|
||
|
||
} | ||
sloadimg(); | ||
|
||
function see() { | ||
let da = document.getElementById('wht').value; | ||
let xxx = document.getElementsByClassName('imaggg'); | ||
for (let c = 0; c < xxx.length; c++) { | ||
if (xxx[c].name.includes(da)) { | ||
xxx[c].style.display = "block"; | ||
} else { | ||
xxx[c].style.display = "none"; | ||
} | ||
} | ||
} | ||
function hi(){ | ||
document.getElementById('pari').style.opacity="1.0"; | ||
document.getElementById('con').style.display="none"; | ||
} | ||
function fff(x,m){ | ||
document.getElementById('imm').src=x; | ||
document.getElementById('gfgf').name=x; | ||
document.getElementById('ghgh').href=m; | ||
document.getElementById('pari').style.opacity="0.4"; | ||
document.getElementById('con').style.display='block'; | ||
|
||
} |
Oops, something went wrong.