Skip to content

Commit

Permalink
Merge pull request #41 from AmineI/0.5
Browse files Browse the repository at this point in the history
Make the extension not persistent and use event filters
  • Loading branch information
nliautaud authored May 26, 2019
2 parents 07b1a4e + 3618bc6 commit de2dae0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
10 changes: 4 additions & 6 deletions js/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,12 @@ chrome.webNavigation.onHistoryStateUpdated.addListener( function onHistoryStateU
{ file: '/css/statify.css' },
{ file: '/css/layout.css' },
] )
} )

}, { url : [{ hostSuffix : 'trakt.tv' }] } )

chrome.tabs.onUpdated.addListener( function onUpdated( tabId, changeInfo, tab ) {
if ( tab.url.indexOf( 'https://trakt.tv' ) == 0 )
chrome.pageAction.show( tabId )

} )
chrome.webNavigation.onCompleted.addListener(function onUpdated( details ) {
chrome.pageAction.show( details.tabId )
}, { url : [{ hostSuffix : 'trakt.tv' }] } )


function queueExecution( tabId, execMethod, injectDetailsArray ) {
Expand Down
7 changes: 4 additions & 3 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"name": "Trakt improver DEV",
"short_name" : "trakttvstats",
"description": "Add various improvements to Trakt.tv",
"version": "0.5.2",
"version_name": "0.5 (0.5.2)",
"version": "0.5.3",
"version_name": "0.5 (0.5.3)",
"permissions": [
"storage",
"tabs",
Expand All @@ -14,7 +14,8 @@
"https://api.themoviedb.org/*"
],
"background": {
"page": "background.html"
"page": "background.html",
"persistent": false
},
"options_ui": {
"page": "options.html",
Expand Down

0 comments on commit de2dae0

Please sign in to comment.