Skip to content

Commit

Permalink
Fixed clock not rendering properly and more;
Browse files Browse the repository at this point in the history
Minute hand in analog clock is now rotated correctly;
Fixed mysterious "undefined" key in localStorage caused by the options page.
  • Loading branch information
derek1906 committed Mar 4, 2018
1 parent 8e1cb81 commit cabe47b
Show file tree
Hide file tree
Showing 9 changed files with 694 additions and 731 deletions.
102 changes: 53 additions & 49 deletions about.html
Original file line number Diff line number Diff line change
@@ -1,50 +1,54 @@
<!DOCTYPE HTML>
<html>
<head>
<title trans="about">About</title>
<meta charset="UTF-8">
<link rel="stylesheet" href="/bootstrap/bootstrap.min.css">
<link type="text/css" rel="stylesheet" href="/scripts/about/css.css">
<script src="/jquery.js"></script>
<script src="/bootstrap/bootstrap.min.js"></script>
<script src="/scripts/about/js.js"></script>
</head>
<body>
<div class="jumbotron topbar">
<h2 trans="about">About</h2>
</div>
<div class="container">
<div class="row">
<div class="col-xs-12 main">

<div id="mainBlock">
<img src="/icons/128x128.png" id="icon">
<button id="settingsButton" class="btn btn-default" trans="settings">Settings</button>
<button id="updateLogButton" class="btn btn-default" trans="whatsnew">Log</button>
<button id="permissionButton" class="btn btn-default">View Granted Permissions</button>

<h3 trans="extName" id="appName">Cool Clock</h3>
<span id="version"></span>
</div>
<p trans="extDes">Description</p>

<div class="emptySpace"></div>
<p>
This app was originally created as a simple clock displayed in <a href="https://developer.chrome.com/extensions/browserAction#badge" target="_blank">a badge</a> to test the new extension feature introduced back in Chrome 4.<br>
It has been growing since then. Initial release was on Dec 22, 2009.<br>
</p>

<div class="emptySpace"></div>
<p>
Copyright 2017 Derek Leung<br>
Special thanks to people who created <a href="/options_new.html#credits">these</a> which made this extension possible.<br>
All data are kept locally. No analytical data is collected. Server hosting is expensive!
</p>
<p>
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
</p>
</div>
</div>
</div>
</body>
<!DOCTYPE HTML>
<html>
<head>
<title trans="about">About</title>
<meta charset="UTF-8">
<link rel="stylesheet" href="/bootstrap/bootstrap.min.css">
<link type="text/css" rel="stylesheet" href="/scripts/about/css.css">
<script src="/jquery.js"></script>
<script src="/bootstrap/bootstrap.min.js"></script>
<script src="/scripts/about/js.js"></script>
</head>
<body>
<div class="jumbotron topbar">
<h2 trans="about">About</h2>
</div>
<div class="container">
<div class="row">
<div class="col-xs-12 main">

<div id="mainBlock">
<img src="/icons/128x128.png" id="icon">
<button id="settingsButton" class="btn btn-default" trans="settings">Settings</button>
<button id="updateLogButton" class="btn btn-default" trans="whatsnew">Log</button>
<button id="permissionButton" class="btn btn-default">View Granted Permissions</button>

<h3 trans="extName" id="appName">Cool Clock</h3>
<span id="version"></span>
</div>
<p trans="extDes">Description</p>

<div class="emptySpace"></div>
<p>
This app was originally created as a simple clock displayed in <a href="https://developer.chrome.com/extensions/browserAction#badge" target="_blank">a badge</a> to test the new extension feature introduced back in Chrome 4.<br>
It has been growing since then. Initial release was on Dec 22, 2009.<br>
</p>

<p>
This is an open source project. The source code can be found <a href="https://github.com/derek1906/CoolClock" target="_blank">here</a>.
</p>

<div class="emptySpace"></div>
<p>
Copyright 2018 <a href="http://derek-leung.com">Derek Leung</a><br>
Special thanks to people who created <a href="/options_new.html#credits">these</a> which made this extension possible.<br>
All data are kept locally. No analytical data is collected. Server hosting is expensive!
</p>
<p>
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
</p>
</div>
</div>
</div>
</body>
</html>
22 changes: 12 additions & 10 deletions background.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,19 @@
<html>
<!--
Cool Clock - An extension for Google Chrome.
Derek Leung 2017
Cool Clock - A time-keeping extension for Chrome.
Derek Leung 2018
https://github.com/derek1906/CoolClock
Rm9yIHRoZSBicmF2ZSBzb3VscyB3aG8gZ2V0IHRo
aXMgZmFyOiBZb3UgYXJlIHRoZSBjaG9zZW4gb25l
cy4gTmV2ZXIgZ29ubmEgZ2l2ZSB5b3UgdXAsIG5l
dmVyIGdvbm5hIGxldCB5b3UgZG93biwgbmV2ZXIg
Z29ubmEgcnVuIGFyb3VuZCBhbmQgZGVzZXJ0IHlv
dS4gTmV2ZXIgZ29ubmEgbWFrZSB5b3UgY3J5LCBu
ZXZlciBnb25uYSBzYXkgZ29vZGJ5ZS4gTmV2ZXIg
Z29ubmEgdGVsbCBhIGxpZSBhbmQgaHVydCB5b3Uu
Rm9yIHRoZSBicmF2ZSBzb3VscyB3aG8gZ2V0IHRoaXM
gZmFyIC0geW91IGFyZSB0aGUgY2hvc2VuIG9uZS4KCk
5ldmVyIGdvbm5hIGdpdmUgeW91IHVwLApuZXZlciBnb
25uYSBsZXQgeW91IGRvd24sCm5ldmVyIGdvbm5hIHJ1
biBhcm91bmQgYW5kIGRlc2VydCB5b3UuCk5ldmVyIGd
vbm5hIG1ha2UgeW91IGNyeSwKbmV2ZXIgZ29ubmEgc2
F5IGdvb2RieWUuCk5ldmVyIGdvbm5hIHRlbGwgYSBsa
WUgYW5kIGh1cnQgeW91LgoKLSBSaWNrIEFzdGxleQ==
-->

Expand Down
2 changes: 1 addition & 1 deletion components/GraphicsPresets/GraphicsPresets.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ Components.define(function(argFormatter, Graphics, Formatter, storage){
// generate GraphicsEntity
var controller = new GraphicsEntity(analogClock, {
setTime: function(currentTime){
currentTime.setSeconds(currentTime.getSeconds() + 100);
currentTime.setSeconds(currentTime.getSeconds() /*+ 100*/);
var minAngle = (currentTime.getMinutes() / 60 + currentTime.getSeconds() / 60 / 60) * Math.PI * 2,
hrAngle = ((currentTime.getHours() % 12) / 12 + currentTime.getMinutes() / 60 / 12 + currentTime.getSeconds() / 60 / 60 / 12) * Math.PI * 2;

Expand Down
5 changes: 3 additions & 2 deletions components/UpdateChecker/UpdateChecker.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ Components.define(
displayUpdateNotice = storage.get("showupdate"),

// updated if the previously stored version is not the same as the current version
isUpdated = storedVersion !== currentVersion;
isUpdated = storedVersion !== currentVersion,
hasUpdateMsg = false; // no update message for this version

log("UpdateChecker", "Update status:", isUpdated);

if(displayUpdateNotice && isUpdated){
if(displayUpdateNotice && isUpdated && hasUpdateMsg){
// display update notice

var language = Localization.getSelectedLanguage(),
Expand Down
2 changes: 1 addition & 1 deletion flipclock.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<script type="text/javascript" src="/scripts/flipclock/js.js"></script>
<title>Clock</title>
<style>
@font-face { font-family: "Roboto"; src: url("/fonts/Roboto-Regular.tff"); }
@font-face { font-family: "Roboto"; src: url("/fonts/Roboto-Regular.ttf"); }
body{
font-family: "Roboto";
overflow: hidden;
Expand Down
2 changes: 1 addition & 1 deletion options_new.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ <h3 class="panel-title"><gly icon="picture"></gly> <span trans="display">Display
</li>
<li class="list-group-item" data-requires="digital">
<label class="checkbox-inline">
<input type="checkbox" id="dark_mode"> (Removed) <span trans="usedarkmode">Use Dark Mode</span>
<input type="checkbox" id="dark_mode"> (Removed) <span trans="usedarkmode" style="text-decoration: line-through">Use Dark Mode</span>
</label>
</li>
<li class="list-group-item" data-requires="digital">
Expand Down
Loading

0 comments on commit cabe47b

Please sign in to comment.