Skip to content

Commit

Permalink
Update core.js now works
Browse files Browse the repository at this point in the history
  • Loading branch information
raszpl authored Jun 19, 2024
1 parent 966e6a1 commit 261bf2f
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions js&css/extension/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -303,17 +303,17 @@ extension.storage.listener = function () {

extension.storage.load = function (callback) {
chrome.storage.local.get(function (items) {
extension.storage.data = items;

if (!extension.storage.data.blocklist) {
extension.storage.data.blocklist = {};
// initialize Blocklist
if (!items.blocklist) {
items.blocklist = {};
}
if (!extension.storage.data.blocklist.channels) {
extension.storage.data.blocklist.channels = {};
if (!items.blocklist.channels) {
items.blocklist.channels = {};
}
if (!extension.storage.data.blocklist.videos) {
extension.storage.data.blocklist.videos = {};
if (!items.blocklist.videos) {
items.blocklist.videos = {};
}
extension.storage.data = items;

// initialize theme in case YT is in Dark cookie mode
if (!extension.storage.data['theme'] && document.documentElement.hasAttribute('dark')) {
Expand Down

0 comments on commit 261bf2f

Please sign in to comment.