aboutsummaryrefslogtreecommitdiff
path: root/twitter.js
blob: 1f210474c7b95a8f80c063d62cb1a2b073acea0a (plain)
1
2
3
4
5
6
7
8
9
10
function get_twitter(url) {
    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=`
        return get_all_types(feed_url)
    }
    return []
}