mirror of
https://github.com/end-4/dots-hyprland.git
synced 2026-06-06 15:29:27 -05:00
booru: add domain name to go to source button
This commit is contained in:
@@ -3,3 +3,8 @@ function format(str, ...args) {
|
||||
typeof args[index] !== 'undefined' ? args[index] : match
|
||||
);
|
||||
}
|
||||
|
||||
function getDomain(url) {
|
||||
const match = url.match(/^(?:https?:\/\/)?(?:www\.)?([^\/]+)/);
|
||||
return match ? match[1] : null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user