~jochen/Calculateur-Extension

0efdccb20b3f7778418ef7f862dd822a8a14b438 — Jochen 11 months ago master
initial commit
169 files changed, 191 insertions(+), 0 deletions(-)

A .DS_Store
A LICENSE
A README.md
A c-1/.DS_Store
A c-1/background.js
A c-1/icon96.png
A c-1/img/b0.png
A c-1/img/b1.png
A c-1/img/b2.png
A c-1/img/b3.png
A c-1/img/b4.png
A c-1/img/b5.png
A c-1/img/b6.png
A c-1/img/b7.png
A c-1/img/b8.png
A c-1/img/b9.png
A c-1/img/be.png
A c-1/img/bn.png
A c-1/img/bw.png
A c-1/img/g0.png
A c-1/img/g1.png
A c-1/img/g2.png
A c-1/img/g3.png
A c-1/img/g4.png
A c-1/img/g5.png
A c-1/img/g6.png
A c-1/img/g7.png
A c-1/img/g8.png
A c-1/img/g9.png
A c-1/img/ge.png
A c-1/img/gn.png
A c-1/img/gw.png
A c-1/img/r0.png
A c-1/img/r1.png
A c-1/img/r2.png
A c-1/img/r3.png
A c-1/img/r4.png
A c-1/img/r5.png
A c-1/img/r6.png
A c-1/img/r7.png
A c-1/img/r8.png
A c-1/img/r9.png
A c-1/img/re.png
A c-1/img/rn.png
A c-1/img/rw.png
A c-1/img/w0.png
A c-1/img/w1.png
A c-1/img/w2.png
A c-1/img/w3.png
A c-1/img/w4.png
A c-1/img/w5.png
A c-1/img/w6.png
A c-1/img/w7.png
A c-1/img/w8.png
A c-1/img/w9.png
A c-1/img/we.png
A c-1/img/wn.png
A c-1/img/ww.png
A c-1/manifest.json
A c-2/background.js
A c-2/icon96.png
A c-2/img/b0.png
A c-2/img/b1.png
A c-2/img/b2.png
A c-2/img/b3.png
A c-2/img/b4.png
A c-2/img/b5.png
A c-2/img/b6.png
A c-2/img/b7.png
A c-2/img/b8.png
A c-2/img/b9.png
A c-2/img/be.png
A c-2/img/bn.png
A c-2/img/bw.png
A c-2/img/g0.png
A c-2/img/g1.png
A c-2/img/g2.png
A c-2/img/g3.png
A c-2/img/g4.png
A c-2/img/g5.png
A c-2/img/g6.png
A c-2/img/g7.png
A c-2/img/g8.png
A c-2/img/g9.png
A c-2/img/ge.png
A c-2/img/gn.png
A c-2/img/gw.png
A c-2/img/r0.png
A c-2/img/r1.png
A c-2/img/r2.png
A c-2/img/r3.png
A c-2/img/r4.png
A c-2/img/r5.png
A c-2/img/r6.png
A c-2/img/r7.png
A c-2/img/r8.png
A c-2/img/r9.png
A c-2/img/re.png
A c-2/img/rn.png
A c-2/img/rw.png
A c-2/img/w0.png
A c-2/img/w1.png
A c-2/img/w2.png
A c-2/img/w3.png
A c-2/img/w4.png
A c-2/img/w5.png
A c-2/img/w6.png
A c-2/img/w7.png
A c-2/img/w8.png
A c-2/img/w9.png
A c-2/img/we.png
A c-2/img/wn.png
A c-2/img/ww.png
A c-2/manifest.json
A c-3/background.js
A c-3/icon96.png
A c-3/img/b0.png
A c-3/img/b1.png
A c-3/img/b2.png
A c-3/img/b3.png
A c-3/img/b4.png
A c-3/img/b5.png
A c-3/img/b6.png
A c-3/img/b7.png
A c-3/img/b8.png
A c-3/img/b9.png
A c-3/img/be.png
A c-3/img/bn.png
A c-3/img/bw.png
A c-3/img/g0.png
A c-3/img/g1.png
A c-3/img/g2.png
A c-3/img/g3.png
A c-3/img/g4.png
A c-3/img/g5.png
A c-3/img/g6.png
A c-3/img/g7.png
A c-3/img/g8.png
A c-3/img/g9.png
A c-3/img/ge.png
A c-3/img/gn.png
A c-3/img/gw.png
A c-3/img/r0.png
A c-3/img/r1.png
A c-3/img/r2.png
A c-3/img/r3.png
A c-3/img/r4.png
A c-3/img/r5.png
A c-3/img/r6.png
A c-3/img/r7.png
A c-3/img/r8.png
A c-3/img/r9.png
A c-3/img/re.png
A c-3/img/rn.png
A c-3/img/rw.png
A c-3/img/w0.png
A c-3/img/w1.png
A c-3/img/w2.png
A c-3/img/w3.png
A c-3/img/w4.png
A c-3/img/w5.png
A c-3/img/w6.png
A c-3/img/w7.png
A c-3/img/w8.png
A c-3/img/w9.png
A c-3/img/we.png
A c-3/img/wn.png
A c-3/img/ww.png
A c-3/manifest.json
A  => .DS_Store +0 -0
A  => LICENSE +21 -0
@@ 1,21 @@
MIT License

Copyright (c) 2020 SQFMI

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

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.

A  => README.md +23 -0
@@ 1,23 @@
# Calculateur: A decimal watch face

#In contrast to common clocks, Calculateur tells the usable time ahead, mapping each day to 1000 decimal minutes, counting down.

![Watchy](https://jochen.link/experiments/img/calculateur/calculateur-extension.png)

Visit [**https://jochen.link/experiments/calculateur.html**](https://jochen.link/experiments/calculateur.html) for more information, to download the SQFMI Watchy watch face, or to check out the web version.


## Setup
- Download and unzip Calculateur-Extension folder
- Go to “extensions” in your browser options
- Enable “developer mode”
- Click “load unpacked”
- Navigate to Calculateur-Extension folder and select c-1 folder
- Repeat previous step 3 and 4 with c-2 and c-3


## Usage
- The Calculateur numbers in the top-right corner of your browser have to be in the order of c-1, c-2, c-3 from left to right.
- If the numbers don't show up right away you have to "pin" them: [**How to pin browser extensions**](https://www.howtogeek.com/683099/how-to-pin-and-unpin-extensions-from-the-chrome-toolbar/)
- You can hover over each number to see which unit it is. Then drag and drop them into the correct order if necessary.
- Clicking on each number will change its color. (green, black, white, red)
\ No newline at end of file

A  => c-1/.DS_Store +0 -0
A  => c-1/background.js +35 -0
@@ 1,35 @@
var colors = ["g", "b", "w", "r"];
var color = "g";
var colorSelect = 0;

chrome.browserAction.onClicked.addListener(clicked);

function clicked() {
  colorSelect++;
  if(colorSelect == 4){
    colorSelect = 0;
  };
  color = colors[colorSelect];
}

setInterval(clock, 864);

function clock() {
    var d = new Date(), e = new Date(d);
    var ms = e - d.setHours(0,0,0,0);
    var dm = Math.floor(ms / 86400);
    var time = 1000 - dm;

    var ab0 = (Math.floor(time / 10)) * 10;
    var a00 = (Math.floor(time / 100)) * 100;

    var xoo = Math.floor(ab0 / 100);
    var oxo = Math.floor((time - a00) / 10);
    var oox = time - ab0;

    if(xoo == 10){
        xoo = "n";
    }

    chrome.browserAction.setIcon({path:"/img/" + color + xoo + ".png" });
}
\ No newline at end of file

A  => c-1/icon96.png +0 -0
A  => c-1/img/b0.png +0 -0
A  => c-1/img/b1.png +0 -0
A  => c-1/img/b2.png +0 -0
A  => c-1/img/b3.png +0 -0
A  => c-1/img/b4.png +0 -0
A  => c-1/img/b5.png +0 -0
A  => c-1/img/b6.png +0 -0
A  => c-1/img/b7.png +0 -0
A  => c-1/img/b8.png +0 -0
A  => c-1/img/b9.png +0 -0
A  => c-1/img/be.png +0 -0
A  => c-1/img/bn.png +0 -0
A  => c-1/img/bw.png +0 -0
A  => c-1/img/g0.png +0 -0
A  => c-1/img/g1.png +0 -0
A  => c-1/img/g2.png +0 -0
A  => c-1/img/g3.png +0 -0
A  => c-1/img/g4.png +0 -0
A  => c-1/img/g5.png +0 -0
A  => c-1/img/g6.png +0 -0
A  => c-1/img/g7.png +0 -0
A  => c-1/img/g8.png +0 -0
A  => c-1/img/g9.png +0 -0
A  => c-1/img/ge.png +0 -0
A  => c-1/img/gn.png +0 -0
A  => c-1/img/gw.png +0 -0
A  => c-1/img/r0.png +0 -0
A  => c-1/img/r1.png +0 -0
A  => c-1/img/r2.png +0 -0
A  => c-1/img/r3.png +0 -0
A  => c-1/img/r4.png +0 -0
A  => c-1/img/r5.png +0 -0
A  => c-1/img/r6.png +0 -0
A  => c-1/img/r7.png +0 -0
A  => c-1/img/r8.png +0 -0
A  => c-1/img/r9.png +0 -0
A  => c-1/img/re.png +0 -0
A  => c-1/img/rn.png +0 -0
A  => c-1/img/rw.png +0 -0
A  => c-1/img/w0.png +0 -0
A  => c-1/img/w1.png +0 -0
A  => c-1/img/w2.png +0 -0
A  => c-1/img/w3.png +0 -0
A  => c-1/img/w4.png +0 -0
A  => c-1/img/w5.png +0 -0
A  => c-1/img/w6.png +0 -0
A  => c-1/img/w7.png +0 -0
A  => c-1/img/w8.png +0 -0
A  => c-1/img/w9.png +0 -0
A  => c-1/img/we.png +0 -0
A  => c-1/img/wn.png +0 -0
A  => c-1/img/ww.png +0 -0
A  => c-1/manifest.json +14 -0
@@ 1,14 @@
{
  "manifest_version": 2,
  "version": "0.1",
  "name": "chrome time 1",
  "description": "A digital clock showing the remaining time of the day, using a decimal system",
  "author": "Jochen Maria Weber / asWeMay",
  "icons": {"96": "icon96.png"},
  "browser_action": {
    "default_icon": "/img/gn.png"
  },
  "background": {
    "scripts": ["background.js"]
  }
}
\ No newline at end of file

A  => c-2/background.js +35 -0
@@ 1,35 @@
var colors = ["g", "b", "w", "r"];
var color = "g";
var colorSelect = 0;

chrome.browserAction.onClicked.addListener(clicked);

function clicked() {
  colorSelect++;
  if(colorSelect == 4){
    colorSelect = 0;
  };
  color = colors[colorSelect];
}

setInterval(clock, 864);

function clock() {
    var d = new Date(), e = new Date(d);
    var ms = e - d.setHours(0,0,0,0);
    var dm = Math.floor(ms / 86400);
    var time = 1000 - dm;
    
    var ab0 = (Math.floor(time / 10)) * 10;
    var a00 = (Math.floor(time / 100)) * 100;

    var xoo = Math.floor(ab0 / 100);
    var oxo = Math.floor((time - a00) / 10);
    var oox = time - ab0;

    if(xoo == 10){
        oox = "w";
    }

    chrome.browserAction.setIcon({path:"/img/" + color + oox + ".png" });
}
\ No newline at end of file

A  => c-2/icon96.png +0 -0
A  => c-2/img/b0.png +0 -0
A  => c-2/img/b1.png +0 -0
A  => c-2/img/b2.png +0 -0
A  => c-2/img/b3.png +0 -0
A  => c-2/img/b4.png +0 -0
A  => c-2/img/b5.png +0 -0
A  => c-2/img/b6.png +0 -0
A  => c-2/img/b7.png +0 -0
A  => c-2/img/b8.png +0 -0
A  => c-2/img/b9.png +0 -0
A  => c-2/img/be.png +0 -0
A  => c-2/img/bn.png +0 -0
A  => c-2/img/bw.png +0 -0
A  => c-2/img/g0.png +0 -0
A  => c-2/img/g1.png +0 -0
A  => c-2/img/g2.png +0 -0
A  => c-2/img/g3.png +0 -0
A  => c-2/img/g4.png +0 -0
A  => c-2/img/g5.png +0 -0
A  => c-2/img/g6.png +0 -0
A  => c-2/img/g7.png +0 -0
A  => c-2/img/g8.png +0 -0
A  => c-2/img/g9.png +0 -0
A  => c-2/img/ge.png +0 -0
A  => c-2/img/gn.png +0 -0
A  => c-2/img/gw.png +0 -0
A  => c-2/img/r0.png +0 -0
A  => c-2/img/r1.png +0 -0
A  => c-2/img/r2.png +0 -0
A  => c-2/img/r3.png +0 -0
A  => c-2/img/r4.png +0 -0
A  => c-2/img/r5.png +0 -0
A  => c-2/img/r6.png +0 -0
A  => c-2/img/r7.png +0 -0
A  => c-2/img/r8.png +0 -0
A  => c-2/img/r9.png +0 -0
A  => c-2/img/re.png +0 -0
A  => c-2/img/rn.png +0 -0
A  => c-2/img/rw.png +0 -0
A  => c-2/img/w0.png +0 -0
A  => c-2/img/w1.png +0 -0
A  => c-2/img/w2.png +0 -0
A  => c-2/img/w3.png +0 -0
A  => c-2/img/w4.png +0 -0
A  => c-2/img/w5.png +0 -0
A  => c-2/img/w6.png +0 -0
A  => c-2/img/w7.png +0 -0
A  => c-2/img/w8.png +0 -0
A  => c-2/img/w9.png +0 -0
A  => c-2/img/we.png +0 -0
A  => c-2/img/wn.png +0 -0
A  => c-2/img/ww.png +0 -0
A  => c-2/manifest.json +14 -0
@@ 1,14 @@
{
  "manifest_version": 2,
  "version": "0.1",
  "name": "chrome time 3",
  "description": "A digital clock showing the remaining time of the day, using a decimal system",
  "author": "Jochen Maria Weber / asWeMay",
  "icons": {"96": "icon96.png"},
  "browser_action": {
    "default_icon": "/img/gw.png"
  },
  "background": {
    "scripts": ["background.js"]
  }
}
\ No newline at end of file

A  => c-3/background.js +35 -0
@@ 1,35 @@
var colors = ["g", "b", "w", "r"];
var color = "g";
var colorSelect = 0;

chrome.browserAction.onClicked.addListener(clicked);

function clicked() {
  colorSelect++;
  if(colorSelect == 4){
    colorSelect = 0;
  };
  color = colors[colorSelect];
}

setInterval(clock, 864);

function clock() {
    var d = new Date(), e = new Date(d);
    var ms = e - d.setHours(0,0,0,0);
    var dm = Math.floor(ms / 86400);
    var time = 1000 - dm;
    
    var ab0 = (Math.floor(time / 10)) * 10;
    var a00 = (Math.floor(time / 100)) * 100;

    var xoo = Math.floor(ab0 / 100);
    var oxo = Math.floor((time - a00) / 10);
    var oox = time - ab0;

    if(xoo == 10){
        oxo = "e";
    }

    chrome.browserAction.setIcon({path:"/img/" + color + oxo + ".png" });
}
\ No newline at end of file

A  => c-3/icon96.png +0 -0
A  => c-3/img/b0.png +0 -0
A  => c-3/img/b1.png +0 -0
A  => c-3/img/b2.png +0 -0
A  => c-3/img/b3.png +0 -0
A  => c-3/img/b4.png +0 -0
A  => c-3/img/b5.png +0 -0
A  => c-3/img/b6.png +0 -0
A  => c-3/img/b7.png +0 -0
A  => c-3/img/b8.png +0 -0
A  => c-3/img/b9.png +0 -0
A  => c-3/img/be.png +0 -0
A  => c-3/img/bn.png +0 -0
A  => c-3/img/bw.png +0 -0
A  => c-3/img/g0.png +0 -0
A  => c-3/img/g1.png +0 -0
A  => c-3/img/g2.png +0 -0
A  => c-3/img/g3.png +0 -0
A  => c-3/img/g4.png +0 -0
A  => c-3/img/g5.png +0 -0
A  => c-3/img/g6.png +0 -0
A  => c-3/img/g7.png +0 -0
A  => c-3/img/g8.png +0 -0
A  => c-3/img/g9.png +0 -0
A  => c-3/img/ge.png +0 -0
A  => c-3/img/gn.png +0 -0
A  => c-3/img/gw.png +0 -0
A  => c-3/img/r0.png +0 -0
A  => c-3/img/r1.png +0 -0
A  => c-3/img/r2.png +0 -0
A  => c-3/img/r3.png +0 -0
A  => c-3/img/r4.png +0 -0
A  => c-3/img/r5.png +0 -0
A  => c-3/img/r6.png +0 -0
A  => c-3/img/r7.png +0 -0
A  => c-3/img/r8.png +0 -0
A  => c-3/img/r9.png +0 -0
A  => c-3/img/re.png +0 -0
A  => c-3/img/rn.png +0 -0
A  => c-3/img/rw.png +0 -0
A  => c-3/img/w0.png +0 -0
A  => c-3/img/w1.png +0 -0
A  => c-3/img/w2.png +0 -0
A  => c-3/img/w3.png +0 -0
A  => c-3/img/w4.png +0 -0
A  => c-3/img/w5.png +0 -0
A  => c-3/img/w6.png +0 -0
A  => c-3/img/w7.png +0 -0
A  => c-3/img/w8.png +0 -0
A  => c-3/img/w9.png +0 -0
A  => c-3/img/we.png +0 -0
A  => c-3/img/wn.png +0 -0
A  => c-3/img/ww.png +0 -0
A  => c-3/manifest.json +14 -0
@@ 1,14 @@
{
  "manifest_version": 2,
  "version": "0.1",
  "name": "chrome time 2",
  "description": "A digital clock showing the remaining time of the day, using a decimal system",
  "author": "Jochen Maria Weber / asWeMay",
  "icons": {"96": "icon96.png"},
  "browser_action": {
    "default_icon": "/img/ge.png"
  },
  "background": {
    "scripts": ["background.js"]
  }
}
\ No newline at end of file