Skip to content

Commit

Permalink
Add comment about URL patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
k-miyata committed Oct 2, 2018
1 parent 4510290 commit 80bd8f2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const notemuChromeext = {

document.body.addEventListener('transitionend', () => {
const path = location.pathname;
// "https://note.mu/<Username>/n/<Note ID>" or "https://<Domain>/n/<Note ID>"
if (/^\/[\w\-]+\/n\/\w+$/.test(path) || /^\/n\/\w+$/.test(path))
notemuChromeext.changeBackground();
});
Expand Down

0 comments on commit 80bd8f2

Please sign in to comment.