Backend for songs.zachdecook.com
* Title: Set to first line of song
Zach DeCook 2018-05-15
parent 35e7dee · commit 5b65a94
-rw-r--r--index.js4
-rwxr-xr-xindex.php1
2 files changed, 5 insertions, 0 deletions
diff --git a/index.js b/index.js
new file mode 100644
index 0000000..ca20261
--- /dev/null
+++ b/index.js
@@ -0,0 +1,4 @@
+$(document).ready( function(){
+ document.title = $("pre").text().split("\n")[0];
+});
+
diff --git a/index.php b/index.php
index 5f64590..1559125 100755
--- a/index.php
+++ b/index.php
@@ -124,6 +124,7 @@ licensed under the <a href='chordsdata/LICENSE'>GNU LGPLv3</a>.
<script src="https://code.jquery.com/jquery-1.12.4.min.js"
integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ="
crossorigin="anonymous"></script>
+<script type="text/javascript" src="index.js"></script>
<script src="toc-filter.js"></script>
<script type="text/javascript" src="chordsdata/chords.js"></script>
<script type="text/javascript" src="chordsdata/ukulelechords.js"></script>