Make base URL copyable

这个提交包含在:
phl0 2023-01-31 13:00:23 +01:00
父节点 5e5136fa44
当前提交 b9b0d0e483
找不到此签名对应的密钥
GPG 密钥 ID: 48EA1E640798CA9A
共有 2 个文件被更改,包括 20 次插入2 次删除

查看文件

@ -15,11 +15,11 @@
</tr>
<tr>
<td>Language</td>
<td><?php echo $this->config->item('language')."\n"; ?></td>
<td><?php echo ucfirst($this->config->item('language'))."\n"; ?></td>
</tr>
<tr>
<td>Base URL</td>
<td><?php echo $this->config->item('base_url')."\n"; ?></td>
<td><span id="baseUrl"><a href="<?php echo $this->config->item('base_url')?>" target="_blank"><?php echo $this->config->item('base_url'); ?></a></span> <span data-toggle="tooltip" data-original-title="<?php echo $this->lang->line('copy_to_clipboard'); ?>" onclick='copyURL("<?php echo $this->config->item('base_url'); ?>")'><i class="copy-icon fas fa-copy"></span></td>
</tr>
</table>
</div>

查看文件

@ -122,6 +122,24 @@ function load_was_map() {
<script src="<?php echo base_url() ;?>assets/js/sections/station_logbooks.js"></script>
<?php } ?>
<?php if ($this->uri->segment(1) == "debug") { ?>
<script type="text/javascript">
function copyURL(url) {
var urlField = $('#baseUrl');
navigator.clipboard.writeText(url).then(function() {
});
urlField.addClass('flash-copy')
.delay('1000').queue(function() {
urlField.removeClass('flash-copy').dequeue();
});
}
$(function () {
$('[data-toggle="tooltip"]').tooltip({'delay': { show: 500, hide: 0 }, 'placement': 'right'});
});
</script>
<?php } ?>
<?php if ($this->uri->segment(1) == "api" && $this->uri->segment(2) == "help") { ?>
<script type="text/javascript">
function copyApiKey(apiKey) {