mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-26 09:45:23 +03:00
Move code for the debug trace window to an external script
Chrome doesn't allow inline scripts, only external ones
This commit is contained in:
parent
b98d7a8f3b
commit
08a54197c0
4 changed files with 16 additions and 10 deletions
|
@ -125,6 +125,10 @@ sources.receiverJs = [
|
|||
'./tabs/receiver_msp.js'
|
||||
];
|
||||
|
||||
sources.debugTraceJs = [
|
||||
'./js/debug_trace.js'
|
||||
];
|
||||
|
||||
sources.hexParserJs = [
|
||||
'./js/workers/hex_parser.js',
|
||||
];
|
||||
|
@ -136,6 +140,7 @@ var output = {
|
|||
mapJs: 'map.js',
|
||||
receiverCss: 'receiver-msp.css',
|
||||
receiverJs: 'receiver-msp.js',
|
||||
debugTraceJs: 'debug-trace.js',
|
||||
hexParserJs: 'hex_parser.js',
|
||||
};
|
||||
|
||||
|
|
9
js/debug_trace.js
Normal file
9
js/debug_trace.js
Normal file
|
@ -0,0 +1,9 @@
|
|||
function debugTraceOnLoad()
|
||||
{
|
||||
var output = document.getElementById('debug-trace');
|
||||
setInterval(function() {
|
||||
output.innerText = getDebugTrace();
|
||||
}, 100);
|
||||
}
|
||||
|
||||
window.onload = debugTraceOnLoad;
|
|
@ -172,9 +172,8 @@
|
|||
float: right;
|
||||
margin-right: 1em;
|
||||
font-size: 90%;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.tab-sensors a.debug-trace::hover {
|
||||
.tab-sensors a.debug-trace:hover {
|
||||
text-decoration: underline;
|
||||
}
|
|
@ -1,14 +1,7 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>Debug Trace</title>
|
||||
<script type="text/javascript">
|
||||
window.onload = function() {
|
||||
var output = document.getElementById('debug-trace');
|
||||
setInterval(function() {
|
||||
output.innerText = getDebugTrace();
|
||||
}, 100);
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript" src="/build/debug-trace.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<pre><code id="debug-trace"></code></pre>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue