Skip to content

Commit

Permalink
Manage arrays better?
Browse files Browse the repository at this point in the history
  • Loading branch information
phocks committed Apr 30, 2019
1 parent 33ca4da commit 341c2c9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.cache
dist
node_modules
.DS_Store
.DS_Store
web-ext-artifacts
3 changes: 3 additions & 0 deletions src/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ browser.browserAction.onClicked.addListener(function() {

openedStories.push(nextStory);

// Don't let array get too big
if (openedStories.length > 256) openedStories.shift();

browser.tabs
.create({
url: nextStory
Expand Down

0 comments on commit 341c2c9

Please sign in to comment.