Skip to content

Commit

Permalink
Upgrade base to 2.1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitry Kotov committed Apr 2, 2015
1 parent 06052cf commit 61e89e2
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 12 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Linked by Air customization of the Harvest Chrome extension

Currently based on version 2.1.2 in the
Currently based on version 2.1.4 in the
[Chrome Store](https://chrome.google.com/webstore/detail/harvest-time-tracker/fbpiglieekigmkeebmeohkelfpjjlaia)

## Additional features compared to the official version:
Expand Down
20 changes: 12 additions & 8 deletions linkedbyair-harvest-chrome-extension/js/iframe.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
(function() {
(function() {
var canBeClosed, nextTick, setRunningTimerIcon, shouldClose;
var canBeClosed, setRunningTimerIcon, shouldClose, waitUntilChromeAutofocuses;
canBeClosed = true;
shouldClose = false;
nextTick = function(callback) {
return window.setTimeout(callback, 0);
};
document.addEventListener("DOMContentLoaded", nextTick((function(_this) {
window.addEventListener("load", (function(_this) {
return function() {
var iframe;
iframe = document.querySelector("iframe");
return iframe.src = "" + _this.config.url + "/platform/timer?service=chrome.google.com&format=platform&external_item_id=1&external_group_id=1&external_group_name=undefined";
waitUntilChromeAutofocuses(iframe);
iframe.src = "" + _this.config.url + "/platform/timer?service=chrome.google.com&format=platform&external_item_id=1&external_group_id=1";
return iframe.addEventListener("load", function() {
return iframe.classList.add("is-loaded");
});
};
})(this)));
})(this));
window.addEventListener("message", function(e) {
var height, iframe, isRunning, matches, message;
iframe = document.querySelector("iframe");
Expand All @@ -31,7 +32,7 @@
return setRunningTimerIcon(isRunning);
}
});
return setRunningTimerIcon = function(isRunning) {
setRunningTimerIcon = function(isRunning) {
var options, state;
state = isRunning ? "on" : "off";
canBeClosed = false;
Expand All @@ -50,6 +51,9 @@
title: isRunning ? "View the running Harvest timer" : "Start a Harvest timer"
});
};
return waitUntilChromeAutofocuses = function(element) {
return element.getBoundingClientRect().width;
};
})();

}).call(this);
2 changes: 1 addition & 1 deletion linkedbyair-harvest-chrome-extension/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@
"name": "Linked by Air Harvest Time Tracker",
"permissions": [ "http://*/*", "https://*/*", "cookies", "webRequest" ],
"update_url": "https://clients2.google.com/service/update2/crx",
"version": "2.3.3",
"version": "2.3.4",
"web_accessible_resources": [ "images/trello-timer-icon.png" ]
}
10 changes: 8 additions & 2 deletions linkedbyair-harvest-chrome-extension/popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,18 @@
<head>
<style>
body {
margin: 0;
background: url('images/loading.gif') no-repeat center center;
margin: 0;
}
iframe {
background: #fff;
height: 286px;
visibility: hidden;
width: 500px;
height: 300px;
}

iframe.is-loaded {
visibility: visible;
}
</style>

Expand Down

0 comments on commit 61e89e2

Please sign in to comment.