From b1c473c837943d6b6356111848559f23f2ddca3a Mon Sep 17 00:00:00 2001 From: William Entriken Date: Sat, 11 Nov 2017 20:16:54 -0500 Subject: [PATCH] Move javascript to docs folder --- In Javascript/airgap.html | 64 --------- In Javascript/main.css | 103 -------------- docs/.gitignore | 1 + docs/Gemfile | 2 + docs/Gemfile.lock | 220 ++++++++++++++++++++++++++++++ {In Javascript => docs}/airgap.js | 16 +-- docs/index.html | 64 +++++++++ docs/main.css | 83 +++++++++++ {In Javascript => docs}/worker.js | 0 9 files changed, 377 insertions(+), 176 deletions(-) delete mode 100644 In Javascript/airgap.html delete mode 100644 In Javascript/main.css create mode 100644 docs/.gitignore create mode 100644 docs/Gemfile create mode 100644 docs/Gemfile.lock rename {In Javascript => docs}/airgap.js (62%) create mode 100644 docs/index.html create mode 100644 docs/main.css rename {In Javascript => docs}/worker.js (100%) diff --git a/In Javascript/airgap.html b/In Javascript/airgap.html deleted file mode 100644 index b734e21..0000000 --- a/In Javascript/airgap.html +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - System Bus Radio - - - - - -
- System Bus Radio -
-
-
- -

- -

Feel free to edit the code below or copy and paste any valid code.
Column one is time in milliseconds, and column two is frequency.
If you are opening this file locally (file://) Chrome will give you errors. Try using php -S localhost:8000 or similar for a quick web server.

- -
Ported by Yeo Quan Yang & maintained by Elliot Gerchak. -
- Original machine code by William Entriken.

-
Project site at https://github.com/fulldecent/system-bus-radio

-
List of computers that work and what frequency to try at https://github.com/fulldecent/system-bus-radio/blob/master/TEST-DATA.tsv
-
- - diff --git a/In Javascript/main.css b/In Javascript/main.css deleted file mode 100644 index ae93926..0000000 --- a/In Javascript/main.css +++ /dev/null @@ -1,103 +0,0 @@ -body { - background-color: #3498db; - font-family: Futura, Helvetica, "Century Gothic"; - text-shadow: 1px 1px 0px black; - margin: 0px; - padding: 0px; -} - -.header { - color: white; - font-size: 50px; - padding-top: 20px; - text-align: center; -} - -.content { - text-align: center; - margin: auto; - width: 80%; - font-size: 12px; - color: white; -} - -a.button, -input.button { - cursor: pointer; - font-family: Futura, Century Gothic; - background: #44c650; - border: 0px; - padding: 5px 80px; - font-weight: bold; - text-transform: uppercase; - color: white; - font-size: 15px; - text-shadow: 1px 1px 0px #222; - box-shadow: 3px 3px 0px #006633; - -webkit-transition: background-color 0.15s ease-in-out; - -moz-transition: background-color 0.15s ease-in-out; - -o-transition: background-color 0.15s ease-in-out; - transition: background-color 0.15s ease-in-out; -} - -a.button { - display: inline-block; - text-decoration: none; - padding: 6px 12px 6px 12px; -} - -input.button { - padding: 5px 20px; -} - -a.button:active, -input.button:active { - position: relative; - top: 1px; -} - -a.button:hover, -input.button:hover { - background: #00b200; - color: white; - text-shadow: 1px 1px 0px #222; - position: relative; - cursor: pointer; - cursor: hand; -} - -input[type="text"], -textarea { - margin-left: 0px; - background-color: #F7f7f7; - border: 1px solid black; - padding: 5px; - color: #444; - -webkit-transition: border-color 0.2s ease-in-out; - -moz-transition: border-color 0.2s ease-in-out; - -o-transition: border-color 0.2s ease-in-out; - transition: border-color 0.2s ease-in-out; -} - -input[type="text"]:hover, -textarea:hover { - box-shadow: 0px 0px 9px black; -} - -input, -textarea, -button { - outline: none; - resize: none; -} - -a { - color: white; - font-weight: bold; - background-color: rgba(242, 242, 242, 0.2); - text-decoration: none; -} - -a:hover { - background-color: rgba(255, 255, 255, 0.38); -} diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 0000000..0baf015 --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1 @@ +/_site diff --git a/docs/Gemfile b/docs/Gemfile new file mode 100644 index 0000000..37f5eaa --- /dev/null +++ b/docs/Gemfile @@ -0,0 +1,2 @@ +source 'https://rubygems.org' +gem 'github-pages', group: :jekyll_plugins diff --git a/docs/Gemfile.lock b/docs/Gemfile.lock new file mode 100644 index 0000000..47d816e --- /dev/null +++ b/docs/Gemfile.lock @@ -0,0 +1,220 @@ +GEM + remote: https://rubygems.org/ + specs: + activesupport (4.2.9) + i18n (~> 0.7) + minitest (~> 5.1) + thread_safe (~> 0.3, >= 0.3.4) + tzinfo (~> 1.1) + addressable (2.5.2) + public_suffix (>= 2.0.2, < 4.0) + coffee-script (2.4.1) + coffee-script-source + execjs + coffee-script-source (1.11.1) + colorator (1.1.0) + concurrent-ruby (1.0.5) + ethon (0.11.0) + ffi (>= 1.3.0) + execjs (2.7.0) + faraday (0.13.1) + multipart-post (>= 1.2, < 3) + ffi (1.9.18) + forwardable-extended (2.6.0) + gemoji (3.0.0) + github-pages (168) + activesupport (= 4.2.9) + github-pages-health-check (= 1.3.5) + jekyll (= 3.6.2) + jekyll-avatar (= 0.5.0) + jekyll-coffeescript (= 1.0.2) + jekyll-default-layout (= 0.1.4) + jekyll-feed (= 0.9.2) + jekyll-gist (= 1.4.1) + jekyll-github-metadata (= 2.9.3) + jekyll-mentions (= 1.2.0) + jekyll-optional-front-matter (= 0.2.0) + jekyll-paginate (= 1.1.0) + jekyll-readme-index (= 0.1.0) + jekyll-redirect-from (= 0.12.1) + jekyll-relative-links (= 0.5.1) + jekyll-sass-converter (= 1.5.0) + jekyll-seo-tag (= 2.3.0) + jekyll-sitemap (= 1.1.1) + jekyll-swiss (= 0.4.0) + jekyll-theme-architect (= 0.1.0) + jekyll-theme-cayman (= 0.1.0) + jekyll-theme-dinky (= 0.1.0) + jekyll-theme-hacker (= 0.1.0) + jekyll-theme-leap-day (= 0.1.0) + jekyll-theme-merlot (= 0.1.0) + jekyll-theme-midnight (= 0.1.0) + jekyll-theme-minimal (= 0.1.0) + jekyll-theme-modernist (= 0.1.0) + jekyll-theme-primer (= 0.5.2) + jekyll-theme-slate (= 0.1.0) + jekyll-theme-tactile (= 0.1.0) + jekyll-theme-time-machine (= 0.1.0) + jekyll-titles-from-headings (= 0.4.0) + jemoji (= 0.8.1) + kramdown (= 1.14.0) + liquid (= 4.0.0) + listen (= 3.0.6) + mercenary (~> 0.3) + minima (= 2.1.1) + rouge (= 2.2.1) + terminal-table (~> 1.4) + github-pages-health-check (1.3.5) + addressable (~> 2.3) + net-dns (~> 0.8) + octokit (~> 4.0) + public_suffix (~> 2.0) + typhoeus (~> 0.7) + html-pipeline (2.7.1) + activesupport (>= 2) + nokogiri (>= 1.4) + i18n (0.9.1) + concurrent-ruby (~> 1.0) + jekyll (3.6.2) + addressable (~> 2.4) + colorator (~> 1.0) + jekyll-sass-converter (~> 1.0) + jekyll-watch (~> 1.1) + kramdown (~> 1.14) + liquid (~> 4.0) + mercenary (~> 0.3.3) + pathutil (~> 0.9) + rouge (>= 1.7, < 3) + safe_yaml (~> 1.0) + jekyll-avatar (0.5.0) + jekyll (~> 3.0) + jekyll-coffeescript (1.0.2) + coffee-script (~> 2.2) + coffee-script-source (~> 1.11.1) + jekyll-default-layout (0.1.4) + jekyll (~> 3.0) + jekyll-feed (0.9.2) + jekyll (~> 3.3) + jekyll-gist (1.4.1) + octokit (~> 4.2) + jekyll-github-metadata (2.9.3) + jekyll (~> 3.1) + octokit (~> 4.0, != 4.4.0) + jekyll-mentions (1.2.0) + activesupport (~> 4.0) + html-pipeline (~> 2.3) + jekyll (~> 3.0) + jekyll-optional-front-matter (0.2.0) + jekyll (~> 3.0) + jekyll-paginate (1.1.0) + jekyll-readme-index (0.1.0) + jekyll (~> 3.0) + jekyll-redirect-from (0.12.1) + jekyll (~> 3.3) + jekyll-relative-links (0.5.1) + jekyll (~> 3.3) + jekyll-sass-converter (1.5.0) + sass (~> 3.4) + jekyll-seo-tag (2.3.0) + jekyll (~> 3.3) + jekyll-sitemap (1.1.1) + jekyll (~> 3.3) + jekyll-swiss (0.4.0) + jekyll-theme-architect (0.1.0) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-theme-cayman (0.1.0) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-theme-dinky (0.1.0) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-theme-hacker (0.1.0) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-theme-leap-day (0.1.0) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-theme-merlot (0.1.0) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-theme-midnight (0.1.0) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-theme-minimal (0.1.0) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-theme-modernist (0.1.0) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-theme-primer (0.5.2) + jekyll (~> 3.5) + jekyll-github-metadata (~> 2.9) + jekyll-seo-tag (~> 2.2) + jekyll-theme-slate (0.1.0) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-theme-tactile (0.1.0) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-theme-time-machine (0.1.0) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-titles-from-headings (0.4.0) + jekyll (~> 3.3) + jekyll-watch (1.5.0) + listen (~> 3.0, < 3.1) + jemoji (0.8.1) + activesupport (~> 4.0, >= 4.2.9) + gemoji (~> 3.0) + html-pipeline (~> 2.2) + jekyll (>= 3.0) + kramdown (1.14.0) + liquid (4.0.0) + listen (3.0.6) + rb-fsevent (>= 0.9.3) + rb-inotify (>= 0.9.7) + mercenary (0.3.6) + mini_portile2 (2.3.0) + minima (2.1.1) + jekyll (~> 3.3) + minitest (5.10.3) + multipart-post (2.0.0) + net-dns (0.8.0) + nokogiri (1.8.1) + mini_portile2 (~> 2.3.0) + octokit (4.7.0) + sawyer (~> 0.8.0, >= 0.5.3) + pathutil (0.16.0) + forwardable-extended (~> 2.6) + public_suffix (2.0.5) + rb-fsevent (0.10.2) + rb-inotify (0.9.10) + ffi (>= 0.5.0, < 2) + rouge (2.2.1) + safe_yaml (1.0.4) + sass (3.5.3) + sass-listen (~> 4.0.0) + sass-listen (4.0.0) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + sawyer (0.8.1) + addressable (>= 2.3.5, < 2.6) + faraday (~> 0.8, < 1.0) + terminal-table (1.8.0) + unicode-display_width (~> 1.1, >= 1.1.1) + thread_safe (0.3.6) + typhoeus (0.8.0) + ethon (>= 0.8.0) + tzinfo (1.2.4) + thread_safe (~> 0.1) + unicode-display_width (1.3.0) + +PLATFORMS + ruby + +DEPENDENCIES + github-pages + +BUNDLED WITH + 1.15.0 diff --git a/In Javascript/airgap.js b/docs/airgap.js similarity index 62% rename from In Javascript/airgap.js rename to docs/airgap.js index bc177f4..ef9a9d1 100644 --- a/In Javascript/airgap.js +++ b/docs/airgap.js @@ -1,7 +1,9 @@ var player; // Define "player" var to make my code linter happy function start() { // Start Web Worker & send song data to player - var logs = document.getElementById('logs'); // Define log element + var logs = document.getElementById('progress'); // Define log element + window.logs = logs; // Make variable Global + window.logs.value = ""; // Create Web Worker if it doesn't already exist if (window.Worker && typeof(player) == "undefined") { @@ -9,21 +11,17 @@ function start() { // Start Web Worker & send song data to player window.player = player; // Make variable Global player.onmessage = function(event) { var data = event.data; - window.logs.value += data; + console.log(data) + window.logs.value += "x\n"; }; // Send song data to player - var song = document.getElementById("tones").innerHTML; + var song = document.getElementById("tune").innerHTML; player.postMessage(song); } } function end() { // Stops the Web Worker + window.logs.value = ""; player.terminate(); } - -function pause(time) { - window.logs.value += "\nPaused / " + time*.001 + " seconds"; - var dt = new Date(); - while ((new Date()) - dt <= time) { /* Do nothing */ } -} \ No newline at end of file diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000..5fa06c6 --- /dev/null +++ b/docs/index.html @@ -0,0 +1,64 @@ + + + + + + + System Bus Radio + + + + +
+

System Bus Radio

+
+

Tested on MacBook Air / Chrome with AM tuner at 1560 Hz. See field reports for other equipment and frequencies.

+

+ + +

+
+ + +
+

Edit the above to make any music you like. Tune file format is time (ms) and frequency (Hz).

+

Chrome has errors if you open this file locally (file://). Try using php -S localhost:8000 or similar for a quick web server.

+

Ported by Yeo Quan Yang & maintained by Elliot Gerchak.

+

Original machine code by William Entriken.

+

Project site at https://github.com/fulldecent/system-bus-radio

+ + diff --git a/docs/main.css b/docs/main.css new file mode 100644 index 0000000..df41d30 --- /dev/null +++ b/docs/main.css @@ -0,0 +1,83 @@ +/* Main style */ +body { + background-color: #3498db; + color: white; + font-family: Futura, Helvetica, "Century Gothic"; + text-shadow: 1px 1px 0px black; +} +p { + font-size: 1.2rem; +} + +a { + color: white; +} +a:hover { + color: red; +} +h1 { + font-size: 3rem; + font-weight: normal; + text-align: center; +} + +textarea { + font-size: 1.25rem; + font-family: courier; +} + +/* BUTTON FROM https://github.com/eisenfox/css3-button-hovers */ +button { + background: purple; + text-align: center; + display: inline-block; + position: relative; + text-decoration: none; + color: #fff; + text-transform: capitalize; + font-size: 18px; + padding: 20px 0px; + width: 150px; + border-radius: 6px; + overflow: hidden; + -webkit-transition: all 0.2s linear 0s; + transition: all 0.2s linear 0s; +} +button#play:before { + content: "\25BA"; +} +button#stop:before { + content: "\25FC"; +} +button:before { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center; + position: absolute; + top: 0; + left: 0px; + height: 100%; + width: 30px; + background-color: rgba(255, 255, 255, 0.3); + border-radius: 0 50% 50% 0; + -webkit-transform: scale(0, 1); + transform: scale(0, 1); + -webkit-transform-origin: left center; + transform-origin: left center; + -webkit-transition: all 0.2s linear 0s; + transition: all 0.2s linear 0s; +} +button:hover { + text-indent: 30px; +} +button:hover:before { + -webkit-transform: scale(1, 1); + transform: scale(1, 1); + text-indent: 0; +} diff --git a/In Javascript/worker.js b/docs/worker.js similarity index 100% rename from In Javascript/worker.js rename to docs/worker.js