From 2bef694a6a64c6044292a57029e82a802cd84932 Mon Sep 17 00:00:00 2001 From: Zach DeCook Date: Tue, 20 Mar 2018 16:41:21 -0400 Subject: * Prosongsa: Prepare to license --- functions.js | 17 ----------------- index.php | 5 +++++ page.js | 12 ++++++------ source.php | 13 +++++++++++++ 4 files changed, 24 insertions(+), 23 deletions(-) delete mode 100644 functions.js create mode 100644 source.php diff --git a/functions.js b/functions.js deleted file mode 100644 index 63480a3..0000000 --- a/functions.js +++ /dev/null @@ -1,17 +0,0 @@ -function array_flip (trans) { // eslint-disable-line camelcase - // discuss at: http://locutus.io/php/array_flip/ - // original by: Kevin van Zonneveld (http://kvz.io) - // improved by: Pier Paolo Ramon (http://www.mastersoup.com/) - // improved by: Brett Zamir (http://brett-zamir.me) - // example 1: array_flip( {a: 1, b: 1, c: 2} ) - // returns 1: {1: 'b', 2: 'c'} - var key - var tmpArr = {} - for (key in trans) { - if (!trans.hasOwnProperty(key)) { - continue - } - tmpArr[trans[key]] = key - } - return tmpArr -} \ No newline at end of file diff --git a/index.php b/index.php index 9520ed3..20aeffd 100755 --- a/index.php +++ b/index.php @@ -97,6 +97,11 @@ include 'page.php'; ?>


All songs are owned by their respective copyright holders. No infringement intended. +
+Powered by Prosongsa. +Suggest features here. +
+Licensed under the . View source here. diff --git a/page.js b/page.js index bb5580d..b7a89f7 100644 --- a/page.js +++ b/page.js @@ -99,12 +99,12 @@ function zj_transparray( transp ) function transpadd( fromkey, integer ) { - var chords = array_flip( [ "C","C#","D","D#","E","F","F#","G","G#","A","A#","B" ]); - chords["Db"] = chords["C#"]; - chords["Eb"] = chords["D#"]; - chords["Gb"] = chords["F#"]; - chords["Ab"] = chords["G#"]; - chords["Bb"] = chords["A#"]; + var chords = {C:0, Db:1, D:2, Eb:3, E:4, F:5, Gb:6, G:7, Ab:8, A:9, Bb:10, B:11}; + chords["C#"] = chords["Db"]; + chords["D#"] = chords["Eb"]; + chords["F#"] = chords["Gb"]; + chords["G#"] = chords["Ab"]; + chords["A#"] = chords["Bb"]; var ochords = [ "C","Db","D","Eb","E","F","Gb","G","Ab","A","Bb","B" ]; var val = ochords[(parseInt(chords[fromkey]) + integer + 24)%12]; diff --git a/source.php b/source.php new file mode 100644 index 0000000..cbaf9f4 --- /dev/null +++ b/source.php @@ -0,0 +1,13 @@ +$file"; + echo '
';
+		echo htmlspecialchars(file_get_contents($file));
+		echo '
'; + } +} -- cgit 1.4.1