diff options
| -rw-r--r-- | background_scripts/main.coffee | 5 | ||||
| -rw-r--r-- | pages/logging.coffee | 10 | ||||
| -rw-r--r-- | pages/logging.html | 3 |
3 files changed, 18 insertions, 0 deletions
diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee index a4162fc7..7c970866 100644 --- a/background_scripts/main.coffee +++ b/background_scripts/main.coffee @@ -658,5 +658,10 @@ showUpgradeMessage = -> showUpgradeMessage() +# The install date is shown on the logging page. +chrome.runtime.onInstalled.addListener ({reason}) -> + unless reason in ["chrome_update", "shared_module_update"] + chrome.storage.local.set installDate: new Date().toString() + root.TabOperations = TabOperations root.logMessage = logMessage diff --git a/pages/logging.coffee b/pages/logging.coffee new file mode 100644 index 00000000..473499b8 --- /dev/null +++ b/pages/logging.coffee @@ -0,0 +1,10 @@ +$ = (id) -> document.getElementById id + +document.addEventListener "DOMContentLoaded", -> + $("vimiumVersion").innerText = Utils.getCurrentVersion() + chrome.storage.local.get "installDate", (items) -> + console.log new Date + console.log items + console.log items.installDate, items.installDate.toString() + $("installDate").innerText = items.installDate.toString() + diff --git a/pages/logging.html b/pages/logging.html index 2de04bce..409fa8e9 100644 --- a/pages/logging.html +++ b/pages/logging.html @@ -2,6 +2,7 @@ <head> <title>Vimium Options</title> <script src="content_script_loader.js"></script> + <script src="logging.js"></script> <style type="text/css"> body { font: 14px "DejaVu Sans", "Arial", sans-serif; @@ -32,6 +33,8 @@ <br /> <textarea id="log-text" readonly></textarea> <br /> + Version: <span id="vimiumVersion"></span><br /> + Installed: <span id="installDate"></span> </div> </body> </html> |
