Skip to content
This repository has been archived by the owner on Apr 1, 2019. It is now read-only.

Commit

Permalink
fix invalid page disabled attribute (closes #18)
Browse files Browse the repository at this point in the history
  • Loading branch information
sarracini committed Aug 26, 2015
1 parent e236cec commit 2503d7f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions css/newTab.css
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,12 @@ input[type=button] {
transition-property: opacity;
}

#newtab-grid[page-disabled] {
#newtab-grid[data-page-disabled] {
opacity: 0;
}

#newtab-grid[locked],
#newtab-grid[page-disabled] {
#newtab-grid[data-page-disabled] {
pointer-events: none;
}

Expand Down Expand Up @@ -342,7 +342,7 @@ input[type=button] {
margin: 15px 0px;
}

#newtab-search-container[page-disabled] {
#newtab-search-container[data-page-disabled] {
opacity: 0;
pointer-events: none;
}
Expand Down
6 changes: 3 additions & 3 deletions js/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
},

/**
* Updates the 'page-disabled' attributes of the respective DOM nodes.
* Updates the 'data-page-disabled' attributes of the respective DOM nodes.
*
* @param {Boolean} aValue Whether the New Tab Page is enabled or not.
*/
Expand All @@ -159,9 +159,9 @@
let nodeSelector = "#newtab-grid, #newtab-search-container";
for (let node of document.querySelectorAll(nodeSelector)) {
if (aValue) {
node.removeAttribute("page-disabled");
node.removeAttribute("data-page-disabled");
} else {
node.setAttribute("page-disabled", "true");
node.setAttribute("data-page-disabled", "true");
}
}

Expand Down

0 comments on commit 2503d7f

Please sign in to comment.