Skip to content

Permissions

Gustaf Liljegren edited this page Sep 3, 2017 · 18 revisions

Like phone apps, Chrome extensions typically need a set of permissions to run. The following is a list of permissions used by this extension, along with an explanation for why each permission is necessary.

  • chrome.contextMenus - This permission is used to add extra items to the chrome context menu. I use this to add the Blacklist user item, and its submenu.

  • chrome.notifications - Blacklistings are acknowledged with a notification, which need the notification permission. Notifications are used to give direct feedback of success or failure.

  • chrome.storage - The blacklist and user configurations are stored locally. This requires a permission too.

  • chrome.tabs - This permission allows an extention to get data about the tabs you have open (including the URL of each tab). I use this to check if you are on a YouTube watch page, and for finding the active tab.

  • chrome.webRequest - This permission is used to listen for AJAX responses. YouTube pages are not loaded in one go, but in parts. For instance, when you press the Show more button to load more comments, an AJAX request is sent to YouTube, which responds with a new batch of comments. This permission is necessary to listen for such batches of data from YouTube.

    The chrome.webRequest permission can only be implemented in a background page extension. Technically, this means that the extension is persistent in memory whenever Chrome is open (if you're curious, you can see its memory footprint in Chrome's Task Manager). While it's persistent in memory, it's only permitted to act on YouTube pages (see next point).

  • *://www.youtube.com/* - This permission assures you that the extension is not permitted to do anything anywhere except on YouTube.

Clone this wiki locally