Paste button
This commit is contained in:
@@ -52,6 +52,12 @@ function e($s)
|
||||
return htmlspecialchars($s, ENT_HTML5 | ENT_QUOTES);
|
||||
}
|
||||
|
||||
function je($s)
|
||||
{
|
||||
return htmlspecialchars(json_encode($s), ENT_HTML5);
|
||||
}
|
||||
|
||||
|
||||
function tr($key)
|
||||
{
|
||||
global $_messages;
|
||||
|
||||
@@ -20,6 +20,8 @@ return [
|
||||
'term_nav.wifi' => 'WiFi',
|
||||
'term_nav.help' => 'Help',
|
||||
'term_nav.about' => 'About',
|
||||
'term_nav.paste' => 'Paste',
|
||||
'term_nav.paste_prompt' => 'Paste text to send:',
|
||||
|
||||
'net.ap' => 'DHCP Server (AP)',
|
||||
'net.sta' => 'DHCP Client (Station)',
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<div class="Box">
|
||||
<a href="#" onclick="hpfold(1)">Expand all</a> | <a href="#" onclick="hpfold(0)">Collapse all</a>
|
||||
<a href="#" onclick="hpfold(1);return false">Expand all</a> | <a href="#" onclick="hpfold(0);return false">Collapse all</a>
|
||||
</div>
|
||||
|
||||
<?php require __DIR__ . "/help/troubleshooting.php"; ?>
|
||||
|
||||
@@ -25,7 +25,8 @@
|
||||
<textarea id="softkb-input" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"></textarea>
|
||||
|
||||
<nav id="term-nav">
|
||||
<a href="#" onclick="toggleSoftKb(true); return false" class="icn-keyboard mq-tablet-max"></a><!--
|
||||
<a href="#" onclick="toggleSoftKb(true);return false" class="icn-keyboard mq-tablet-max"></a><!--
|
||||
--><a href="#" onclick="termPaste();return false"><?= tr('term_nav.paste') ?></a><!--
|
||||
--><a href="<?= url('cfg_term') ?>" class="x-term-conf-btn"><?= tr('term_nav.config') ?></a><!--
|
||||
--><a href="<?= url('cfg_wifi') ?>" class="x-term-conf-btn"><?= tr('term_nav.wifi') ?></a><!--
|
||||
--><a href="<?= url('help') ?>" class="x-term-conf-btn"><?= tr('term_nav.help') ?></a><!--
|
||||
@@ -59,4 +60,9 @@
|
||||
if (yes) i.focus();
|
||||
else i.blur();
|
||||
}
|
||||
|
||||
function termPaste() {
|
||||
var t = prompt(<?= je(tr('term_nav.paste_prompt')) ?>);
|
||||
if (t !== null && t.length) Input.sendString(t);
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user