Skip to content

Commit

Permalink
Switch from innerHTML to textContent for safety reasons
Browse files Browse the repository at this point in the history
  • Loading branch information
lizgw committed Aug 16, 2017
1 parent d6d1b0e commit dee0539
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,15 @@ var colorPairs = [
function updateTime() {
chrome.storage.sync.get("use24HourTime", function(items) {
if (!items.use24HourTime) {
timeElem.innerHTML = moment().format("h:mm A");
timeElem.textContent = moment().format("h:mm A");
} else {
timeElem.innerHTML = moment().format("HH:mm");
timeElem.textContent = moment().format("HH:mm");
}
});
}

function updateDate() {
dateElem.innerHTML = moment().format("dddd, MMMM Do, YYYY");
dateElem.textContent = moment().format("dddd, MMMM Do, YYYY");
}

function pickColors() {
Expand Down

0 comments on commit dee0539

Please sign in to comment.