aboutsummaryrefslogtreecommitdiff
path: root/common/url_item.js
blob: 102f1178d9b5416f8462eaaf721c8e3572ec22fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/**
 * Myext stripping url from query and target
 *
 * Copyright (C) 2021 Wojtek Kosior
 * Redistribution terms are gathered in the `copyright' file.
 */

function url_item(url)
{
    let url_re = /^([^?#]*).*$/;
    let match = url_re.exec(url);
    return match[1];
}

/*
 * EXPORTS_START
 * EXPORT url_item
 * EXPORTS_END
 */