-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Conflicts: index.html script.js
- Loading branch information
Showing
7 changed files
with
710 additions
and
341 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. (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" | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.