Skip to content

Commit

Permalink
Fixed Top Frame Navigation Bug
Browse files Browse the repository at this point in the history
  • Loading branch information
khagwal committed Aug 24, 2017
1 parent df6a0f4 commit 3c708d9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "coolhue",
"version": "1.4.0",
"version": "1.4.1",
"homepage": "https://webkul.github.io/coolhue/",
"authors": [
"Nitish Kumar <[email protected]>"
Expand Down
9 changes: 6 additions & 3 deletions scripts/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ document.addEventListener("DOMContentLoaded", function () {
nodeGradient.style.backgroundImage = tempImage;
var nodeActions = document.createElement("div");
nodeActions.classList.add("ch-actions");
var nodeCode = document.createElement("span");
var nodeCode = document.createElement("a");
nodeCode.classList.add("ch-code");
nodeCode.dataset.colorFrom = tempColorFrom;
nodeCode.dataset.colorTo = tempColorTo;

var nodeGrab = document.createElement("span");
var nodeGrab = document.createElement("a");
nodeGrab.classList.add("ch-grab");
nodeGrab.dataset.colorFrom = tempColorFrom;
nodeGrab.dataset.colorTo = tempColorTo;
Expand Down Expand Up @@ -121,7 +121,10 @@ document.addEventListener("DOMContentLoaded", function () {
tempGradient.addColorStop(1, eventColorTo);
ctx.fillStyle = tempGradient;
ctx.fillRect(0, 0, 500, 500);
window.open(canvas.toDataURL());
var dataURL = canvas.toDataURL();
event.target.href = dataURL;
var fileName = "coolHue-" + eventColorFrom.slice(1, 7) + "-" + eventColorTo.slice(1, 7);
event.target.setAttribute("download", fileName);
}
}

Expand Down

0 comments on commit 3c708d9

Please sign in to comment.