Skip to content

Commit

Permalink
Tell user to go to NTP to edit shortcuts
Browse files Browse the repository at this point in the history
  • Loading branch information
z------------- committed Sep 24, 2019
1 parent 440684c commit d0b6de5
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions options/options.js
Expand Up @@ -328,8 +328,12 @@ xhr(chrome.extension.getURL("/consts/default_settings.json"), function(res) {
e.preventDefault()
})

document.querySelector("#edit-apps-btn").addEventListener("click", function() {
window.top.document.querySelector("#optionbutton").click()
setTimeout(window.top.openAppsEditor, 300)
document.getElementById("edit-apps-btn").addEventListener("click", function(e) {
if (window.top === window) { // we are on standalone options page
alert("Please click the Options icon on the new tab page to edit shortcuts.")
} else {
window.top.document.querySelector("#optionbutton").click()
setTimeout(window.top.openAppsEditor, 300)
}
})
})

0 comments on commit d0b6de5

Please sign in to comment.