mirror of
https://github.com/xykt/NetQuality.git
synced 2026-01-12 20:15:34 +08:00
Update net.sh
Update ads
This commit is contained in:
14
net.sh
14
net.sh
@@ -2673,7 +2673,7 @@ exit 0
|
||||
}
|
||||
show_ad(){
|
||||
local RANDOM=$(date +%s)
|
||||
local indices=(1 2)
|
||||
local indices=(1 2 3)
|
||||
for ((i=${#indices[@]}-1; i>0; i--));do
|
||||
j=$((RANDOM%(i+1)))
|
||||
temp=${indices[i]}
|
||||
@@ -2683,22 +2683,28 @@ done
|
||||
aad[0]=$(curl -sL --max-time 5 "${rawgithub}main/ref/sponsor.ans")
|
||||
aad[${indices[0]}]=$(curl -sL --max-time 5 "${rawgithub}main/ref/ad1.ans")
|
||||
aad[${indices[1]}]=$(curl -sL --max-time 5 "${rawgithub}main/ref/ad2.ans")
|
||||
aad[${indices[2]}]=$(curl -sL --max-time 5 "${rawgithub}main/ref/ad3.ans")
|
||||
local rows
|
||||
local cols
|
||||
read rows cols < <(stty size)
|
||||
if [[ $cols -ge 150 ]];then
|
||||
echo "${aad[0]}" 1>&2
|
||||
mapfile -t aad0 <<<"${aad[0]}"
|
||||
mapfile -t aad1 <<<"${aad[1]}"
|
||||
mapfile -t aad2 <<<"${aad[2]}"
|
||||
mapfile -t aad3 <<<"${aad[3]}"
|
||||
for ((i=0; i<12; i++));do
|
||||
printf "%-72s$Font_Suffix %-72s\n" "${aad1[$i]}" "${aad2[$i]}" 1>&2
|
||||
printf "%-72s$Font_Suffix %-72s\n" "${aad0[$i]}" "${aad1[$i]}" 1>&2
|
||||
done
|
||||
for ((i=0; i<12; i++));do
|
||||
printf "%-72s$Font_Suffix %-72s\n" "${aad2[$i]}" "${aad3[$i]}" 1>&2
|
||||
done
|
||||
ADLines=24
|
||||
else
|
||||
echo "${aad[0]}" 1>&2
|
||||
echo "${aad[1]}" 1>&2
|
||||
echo "${aad[2]}" 1>&2
|
||||
ADLines=36
|
||||
echo "${aad[3]}" 1>&2
|
||||
ADLines=48
|
||||
fi
|
||||
}
|
||||
read_ref(){
|
||||
|
||||
Reference in New Issue
Block a user