Skip to content

Commit

Permalink
Merge branch 'dev' into gh-pages
Browse files Browse the repository at this point in the history
Conflicts:
	index.html
	script.js
  • Loading branch information
briankchan committed Jun 5, 2014
2 parents 8b3f8db + 4af845d commit ce57254
Show file tree
Hide file tree
Showing 7 changed files with 710 additions and 341 deletions.
Binary file modified favicon.ico
Binary file not shown.
77 changes: 22 additions & 55 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,22 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

<meta name="viewport" content="width=device-width, initial-scale=1.0" />

<link rel="shortcut icon" href="favicon.ico" />

<link rel="apple-touch-icon" href="logo.png" />
<meta name="apple-mobile-web-app-capable" content="yes" />

<title>Bell Schedule</title>

<script type="text/javascript" src="script.js"></script>
<script type="text/javascript" src="doge.js"></script>

<link rel="stylesheet" type="text/css" href="style.css" />



</head>

<body>
Expand Down Expand Up @@ -126,8 +134,10 @@
5/22/14 48
5/23/14 3
5/26/14 Memorial Day
5/27/14 2a
5/29/14 41a
5/30/14 1
6/2/14 1a
6/3/14 F14 s2d1
6/4/14 F14 s2d2
6/5/14 F14 s2d3
Expand Down Expand Up @@ -522,73 +532,30 @@
Lunch 11:00-12:00
Science 12:00-2:00</div>

<h1 id="header" class="noHighlight">
<span id="leftArrow" title="Last Week">&#8249;</span>
<span id="rightArrow" title="Next Week">&#8250;</span>
<span id="title">Bell Schedule</span>
</h1>
<div id="header" class="noHighlight">
<h1>
<span id="leftArrow" title="Last Week">&#8249;</span>
<span id="rightArrow" title="Next Week">&#8250;</span>
<span id="title">Bell Schedule</span>
</h1>
<div id="warning"></div>
</div>

<!--<div class="noHighlight" id="currWeekWrapper" class="noHighlight"><h2>
<button class="noHighlight" type="button" id="currWeek" title="Go to Current Week" onclick="goCurrWeek()">Current Week</button>
</h2></div>-->
<!--<input type="button" value="Current Week" id = "currWeek" title = "Current Week" onclick="goCurrWeek()">-->

<div id="warning">This is a future week, so the schedule may be incorrect. (In particular, special/alternate schedules may be missing.)</div>
<table id="schedule"></table>

<div id="container">
<table id="schedule"></table>
</div>
<div id="refresh" class="noHighlight" title="Update Schedule">&#8635;</div><!--&#8681;-->
<div id="version"><a href="https://github.com/HarkerDev/bellschedule/releases" title="Changelog">V1.3.06</a></div>

<div id="options">
<div id="optionsArrow" class="noHighlight">&#8598;</div>
<h2 id="optionsTitle">Options</h2>
<table id="optionsContent">
<tr><th colspan="2">General</th></tr>
<tr>
<td>Show passing periods:</td>
<td><input name="showPassingPeriods" type="checkbox" checked="checked" /></td>
</tr>
<tr>
<td>Enable period change notifications</td>
<td><input name="enablePeriodNotifications" type="checkbox" /></td>
</tr>
<tr>
<td>Notification display time (seconds)</td>
<td><input name="notificationDuration" type="number" min="0" value="1" /></td>
</tr>

<tr><th colspan="2"><span title="Set to 0 to disable automatic updating">Automatic Updating <sup class="tooltipIndicator">?</sup></span></th></tr>
<tr>
<td><span title="Applies while tab is selected and window is active">Active update interval (seconds): <sup class="tooltipIndicator">?</sup></span></td>
<td><input name="activeUpdateInterval" type="number" min="0" value="10" /></td>
</tr>
<tr>
<td><span title="Applies while tab is selected, but window is not active">Inactive update interval (seconds): <sup class="tooltipIndicator">?</sup></span></td>
<td><input name="inactiveUpdateInterval" type="number" min="0" value="60" /></td>
</tr>
<tr>
<td><span title="Applies while tab is not selected or window is minimized">Hidden update interval (seconds): <sup class="tooltipIndicator">?</sup></span></td>
<td><input name="hiddenUpdateInterval" type="number" min="0" value="0" /></td>
</tr>

<tr><th colspan="2"><span title="Override default keyboard shortcuts for refresh and update the schedule instead.&#13;(Only really useful with automatic updating disabled.)">
Override refresh <sup class="tooltipIndicator">?</sup>
</span></th></tr>
<tr>
<td>Override F5:</td>
<td><input name="interceptF5" type="checkbox" /></td>
</tr>
<tr>
<td>Override Ctrl/Cmd-R:</td>
<td><input name="interceptCtrlR" type="checkbox" /></td>
</tr>

<tr><th colspan="2">Miscellaneous</th></tr>
<tr>
<td>Doge mode:</td>
<td><input name="enableDoge" type="checkbox" /></td>
</tr>
</table>
<table id="optionsContent"></table>
<div id="repo">
<a href="https://github.com/HarkerDev/bellschedule" target="_blank" title="GitHub repository">GitHub repository</a>
</div>
Expand Down
Binary file added logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
92 changes: 92 additions & 0 deletions options.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
{
"sections": [
{
"name": "General",
"options": [
{
"name": "showPassingPeriods",
"type": "checkbox",
"default": true,
"description": "Show passing periods"
},
{
"name": "enablePeriodNotifications",
"type": "checkbox",
"default": true,
"description": "Enable period change notifications"
},
{
"name": "notificationDuration",
"type": "number",
"default": 5,
"description": "Notification display time (seconds)"
},
{
"name": "enableDayView",
"type": "checkbox",
"default": false,
"mobileDefault": true,
"description": "Enable day view"
}
]
},
{
"name": "Automatic Updating",
"tooltip": "Set to 0 to disable automatic updating",
"options": [
{
"name": "activeUpdateInterval",
"type": "number",
"default": 10,
"description": "Active update interval (seconds)",
"tooltip": "Applies while tab is selected and window is active"
},
{
"name": "inactiveUpdateInterval",
"type": "number",
"default": 30,
"description": "Inactive update interval (seconds)",
"tooltip": "Applies while tab is selected, but window is not active"
},
{
"name": "hiddenUpdateInterval",
"type": "number",
"default": 30,
"description": "Hidden update interval (seconds)",
"tooltip": "Applies while tab is not selected or window is minimized"
}
]
},
{
"name": "Override Refresh",
"tooltip": "Override default keyboard shortcuts for refresh and update the schedule instead.&#13;(Only really useful with automatic updating disabled.)",
"platforms": ["desktop"],
"options": [
{
"name": "interceptF5",
"type": "checkbox",
"default": false,
"description": "Override F5"
},
{
"name": "interceptCtrlR",
"type": "checkbox",
"default": false,
"description": "Override Ctrl/Cmd-R"
}
]
},
{
"name": "Miscellaneous",
"platforms": ["desktop"],
"options": [
{
"name": "enableDoge",
"type": "checkbox",
"default": false,
"description": "Doge mode"
}
]
}
]
}
69 changes: 69 additions & 0 deletions pre-commit.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
#!/bin/sh

# Instructions on how to install this script in your own environment can be found
# at http://mananshah99.github.io/scripts
#
# More information and other scripts at http://www.github.com/mananshah99/scripts


# A git hook script to find and fix trailing whitespace in your commits. Bypass
# it with the --no-verify option to git-commit.

# detect platform
platform="win"
uname_result=`uname`
if [[ "$uname_result" == "Linux" ]]; then
platform="linux"
elif [[ "$uname_result" == "Darwin" ]]; then
platform="mac"
fi

# change IFS to ignore filename's space in |for|
IFS="
"

# remove trailing whitespace in modified lines
for line in `git diff --check --cached | sed '/^[+-]/d'` ; do
# get file name
if [[ "$platform" == "mac" ]]; then
file="`echo $line | sed -E 's/:[0-9]+: .*//'`"
line_number="`echo $line | sed -E 's/.*:([0-9]+).*/\1/'`"
else
file="`echo $line | sed -r 's/:[0-9]+: .*//'`"
line_number="`echo $line | sed -r 's/.*:([0-9]+).*/\1/'`"
fi

backup_file="${file}.working_directory_backup"
cat "$file" > "$backup_file"
git checkout -- "$file" # discard unstaged changes in working directory

# remove trailing whitespace in $file (modified lines only)
if [[ "$platform" == "win" ]]; then
sed "${line_number}s/[[:space:]]*$//" "$file" > "${file}.bak"
mv -f "${file}.bak" "$file"
elif [[ "$platform" == "mac" ]]; then
sed -i "" "${line_number}s/[[:space:]]*$//" "$file"
else
sed -i "${line_number}s/[[:space:]]*$//" "$file"
fi
git add "$file"

# restore unstaged changes in $file from its working directory backup, fixing
# whitespace that we fixed above
sed "${line_number}s/[[:space:]]*$//" "$backup_file" > "$file"
rm "$backup_file"

[[ "$platform" == "mac" ]] || e_option="-e" # mac does not understand -e
echo $e_option "Removed trailing whitespace in \033[31m$file\033[0m:$line_number"
done

if [[ "x`git status -s | grep '^[A|D|M]'`" == "x" ]]; then
echo "Empty commit, aborting."
exit 1
fi

echo
exec git diff-index --check --cached $against --

# Commit
exit
Loading

0 comments on commit ce57254

Please sign in to comment.