Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a link to the stats page for quickly visiting the URL that's shown #52

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions dist/-/stats.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,9 @@ function stats_get_UTC_offset() {
return date('P');
}

/* put a span around the protocol */
/* put a span around the protocol & adds a link after the URL */
function stats_display_url($url) {
$url = htmlspecialchars($url, ENT_QUOTES, 'UTF-8');
echo preg_replace( '/^https?:\/\//', '<span>$0</span>', $url );
}
echo ' <a href="'.$url.'" target="_blank" title="Open URL"><i class="fas fa-external-link-alt"></i></a>';
}
1 change: 1 addition & 0 deletions dist/-/stubs/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<style>
<?php include BCURLS_PATH . '/css/lessn.css'; ?>
</style>
<script defer src="//use.fontawesome.com/releases/v5.0.1/js/all.js"></script>
</head>
<body id="<?php echo $id; ?>">
<div id="top-bar">
Expand Down