We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d2504e0 + b5eb532 commit 6661156Copy full SHA for 6661156
plugins/available/base.plugin.bash
@@ -16,10 +16,16 @@ function ips() {
16
17
function down4me() {
18
about 'checks whether a website is down for you, or everybody'
19
- param '1: website url'
+ param '1: website url or domain'
20
example '$ down4me http://www.google.com'
21
+ example '$ down4me google.com'
22
group 'base'
- curl -Ls "http://downforeveryoneorjustme.com/$1" | sed '/just you/!d;s/<[^>]*>//g'
23
+ # Strip protocol (http:// or https://) if present
24
+ local site="${1#http://}"
25
+ site="${site#https://}"
26
+ # Strip trailing slash if present
27
+ site="${site%/}"
28
+ command curl -Ls "http://downforeveryoneorjustme.com/${site}" | command sed '/just you/!d;s/<[^>]*>//g'
29
}
30
31
function myip() {
0 commit comments