Skip to content

Commit

Permalink
PHP comments removed
Browse files Browse the repository at this point in the history
  • Loading branch information
webfoolery committed Mar 31, 2018
1 parent b95b115 commit b2e9001
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 23 deletions.
12 changes: 1 addition & 11 deletions gears.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ TODO::
*/
jQuery(document).ready(function($){
var gears = {
//debug: <?php echo ($debug ? 'true' : 'false'); ?>,
debug: true,
debug: false,
// debug: (window.location.hash == 'debug' ? true : false),
chainringCount: 0,
sprocketCount: 0,
Expand All @@ -18,27 +17,18 @@ TODO::
targetCadence: 0,
units: 'metric',
varDump: function(dumpData, title) {
// console.log(this);
console.log(title, (dumpData ? JSON.parse(JSON.stringify(this)) : ''));
},
initialise: function() {
var self = this;
this.resetTable();
$("#clearAll").click(function(){self.clearAll()});
$("input").change(function(){
// if (this.name.indexOf('targetCadence') === 0) self.targetCadence = Number(this.value);
// else if (this.name.indexOf('chainring') === 0) self.recalculate();
// else if (this.name.indexOf('sprocket') === 0) self.recalculate();
// else if (this.name.indexOf('unitToggler') === 0) self.recalculate();
if (self.debug) self.varDump(false, 'Input changed');
self.recalculate();
});
$("select").change(function(){
if (this.name.indexOf('preset') === 0) return self.usePreset(this.value);
// if (this.name.indexOf('tyreDiameter') === 0) self.tyreDiameter = Number(this.value);
// else if (this.name.indexOf('chainringCount') === 0) self.chainringCount = Number(this.value);
// else if (this.name.indexOf('sprocketCount') === 0) self.sprocketCount = Number(this.value);
// else if (this.name.indexOf('wheelDiameter') === 0) self.wheelDiameter = Number(this.value);
if (self.debug) self.varDump(false, 'Select changed');
self.recalculate();
});
Expand Down
18 changes: 6 additions & 12 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

// DEV BRANCH CREATED TO SWAP PHP TO HTML

/* REFERENCES:
<!DOCTYPE html>
<html lang="en-UK">
<head>
<!--
REFERENCES:
TYRE SIZES
http://www.ctc.org.uk/cyclists-library/components/wheels-tyres/tyre-sizes
SIMILAR TOOL
Expand All @@ -11,13 +11,7 @@
JQUERY MOBILE
http://www.w3schools.com/jquerymobile/
http://demos.jquerymobile.com/1.4.5/forms/
*/


?>
<!DOCTYPE html>
<html lang="en-UK">
<head>
-->
<meta charset="UTF-8">
<title>Gear ratio calculator</title>
<link rel="stylesheet" type="text/css" href="style.css" />
Expand Down

1 comment on commit b2e9001

@webfoolery
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed all PHP so code is now just HTML, JavaScript & CSS

Please sign in to comment.