From cabe47be14cd8056d13b9a2ff5d9fd30ffad5c81 Mon Sep 17 00:00:00 2001 From: Derek Leung Date: Sun, 4 Mar 2018 00:53:12 -0600 Subject: [PATCH] Fixed clock not rendering properly and more; Minute hand in analog clock is now rotated correctly; Fixed mysterious "undefined" key in localStorage caused by the options page. --- about.html | 102 +- background.html | 22 +- components/GraphicsPresets/GraphicsPresets.js | 2 +- components/UpdateChecker/UpdateChecker.js | 5 +- flipclock.html | 2 +- options_new.html | 2 +- scripts/bg.js | 1263 ++++++++--------- scripts/options/js_new.js | 16 +- update.html | 11 + 9 files changed, 694 insertions(+), 731 deletions(-) diff --git a/about.html b/about.html index fbde056..facb323 100755 --- a/about.html +++ b/about.html @@ -1,50 +1,54 @@ - - - - About - - - - - - - - -
-

About

-
-
-
-
- -
- - - - - -

Cool Clock

- -
-

Description

- -
-

- This app was originally created as a simple clock displayed in a badge to test the new extension feature introduced back in Chrome 4.
- It has been growing since then. Initial release was on Dec 22, 2009.
-

- -
-

- Copyright 2017 Derek Leung
- Special thanks to people who created these which made this extension possible.
- All data are kept locally. No analytical data is collected. Server hosting is expensive! -

-

- 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. -

-
-
-
- + + + + About + + + + + + + + +
+

About

+
+
+
+
+ +
+ + + + + +

Cool Clock

+ +
+

Description

+ +
+

+ This app was originally created as a simple clock displayed in a badge to test the new extension feature introduced back in Chrome 4.
+ It has been growing since then. Initial release was on Dec 22, 2009.
+

+ +

+ This is an open source project. The source code can be found here. +

+ +
+

+ Copyright 2018 Derek Leung
+ Special thanks to people who created these which made this extension possible.
+ All data are kept locally. No analytical data is collected. Server hosting is expensive! +

+

+ 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. +

+
+
+
+ \ No newline at end of file diff --git a/background.html b/background.html index f0cae2e..8741e32 100755 --- a/background.html +++ b/background.html @@ -2,17 +2,19 @@ diff --git a/components/GraphicsPresets/GraphicsPresets.js b/components/GraphicsPresets/GraphicsPresets.js index 2c59fd8..2d93c21 100644 --- a/components/GraphicsPresets/GraphicsPresets.js +++ b/components/GraphicsPresets/GraphicsPresets.js @@ -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; diff --git a/components/UpdateChecker/UpdateChecker.js b/components/UpdateChecker/UpdateChecker.js index 01b3d94..65fc318 100644 --- a/components/UpdateChecker/UpdateChecker.js +++ b/components/UpdateChecker/UpdateChecker.js @@ -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(), diff --git a/flipclock.html b/flipclock.html index 0141e86..c525d12 100755 --- a/flipclock.html +++ b/flipclock.html @@ -12,7 +12,7 @@ Clock