-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathsql.html
More file actions
42 lines (38 loc) · 1.36 KB
/
Copy pathsql.html
File metadata and controls
42 lines (38 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<title>JUSH - SQL</title>
<link rel="stylesheet" media="(prefers-color-scheme: dark)" href="demo-dark.css">
<body>
<p>
<input id="source" name="source" size="50" oninput="highlight(this.value);" autocomplete="off">
</p>
<table cellspacing="0">
<tr><th>MySQL</th><td id="sql"></td></tr>
<tr><th>SQLite</th><td id="sqlite"></td></tr>
<tr><th>PostgreSQL</th><td id="pgsql"></td></tr>
<tr><th>MS SQL </th><td id="mssql"></td></tr>
<tr><th>Oracle </th><td id="oracle"></td></tr>
</table>
<script src="modules/jush.js"></script>
<script src="modules/jush-sql.js"></script>
<script src="modules/jush-sqlite.js"></script>
<script src="modules/jush-pgsql.js"></script>
<script src="modules/jush-mssql.js"></script>
<script src="modules/jush-oracle.js"></script>
<script>
function highlight(source) {
for (const lang in { sql: 1, sqlite: 1, pgsql: 1, mssql: 1, oracle: 1 }) {
document.getElementById(lang).innerHTML = '<code class="jush-' + lang + '">' + jush.highlight(lang, source) + '</code>';
}
location.hash = encodeURIComponent(source);
}
jush.create_links = 'target="_blank"';
jush.style('jush.css');
jush.style('jush-dark.css', '(prefers-color-scheme: dark)');
if (location.hash) {
const source = document.getElementById('source');
source.value = decodeURIComponent(location.hash.slice(1));
highlight(source.value);
}
</script>