function get_twitter() { let url = window.location.href; let pattern = /twitter.com\/(\w+).*/ let match = url.match(pattern); if (match) { let twitter_handle = match[1] let feed_url = `${base_url}/?action=display&bridge=Twitter&context=By+username&u=${twitter_handle}&format=` let feeds = get_all_types(feed_url) let feed_url_norep = `${base_url}/?action=display&bridge=Twitter&context=By+username&u=${twitter_handle}&norep=on&format=` let feeds_norep = get_all_types(feed_url, "no replies") return feeds.concat(feeds_norep) } return [] } register(["twitter"], get_twitter)