diff --git a/background.js b/background.js index 5ff3f50ca..ef8be12aa 100644 --- a/background.js +++ b/background.js @@ -256,32 +256,33 @@ chrome.runtime.onMessage.addListener(function (message, sender, sendResponse) { sendResponse({ isTab: sender.hasOwnProperty('tab') }); - } else if (action === 'tab-connected') { - sendResponse({ + } else if (action === 'tab-connected') { +try{ sendResponse({ hostname: new URL(sender.url).hostname, tabId: sender.tab.id - }); - } else if (action === 'fixPopup') { +}); } catch (error) { console.error("invalid url?", error);} + } else if (action === 'fixPopup') + { //~ get the current focused tab and convert it to a URL-less popup (with same state and size) chrome.windows.getLastFocused(w => { chrome.tabs.query({ windowId: w.id, active: true }, ts => { - const tID = ts[0]?.id, + tID = ts[0]?.id, data = { type: 'popup' }; if (tID) data.tabId = tID; chrome.windows.create(data, pw => { chrome.windows.update(pw.id, { state: w.state, - width: message.playerSize.width, - height: message.playerSize.height + width: message.width, + height: message.height }); }); //append to title chrome.tabs.onUpdated.addListener(function listener(tabId, changeInfo) { - if (tabId === t.id && changeInfo.status === 'complete') { - chrome.tabs.executeScript(t.id, { + if (tabId === tID && changeInfo.status === 'complete' && !message.title.startsWith("undefined")) { + chrome.tabs.executeScript(tID, { code: `document.title = "${message.title} - ImprovedTube";` }); chrome.tabs.onUpdated.removeListener(listener); @@ -309,3 +310,5 @@ chrome.runtime.onMessage.addListener(function (request) { --------------------------------------------------------------*/ chrome.runtime.setUninstallURL('https://improvedtube.com/uninstalled'); + + diff --git a/js&css/extension/init.js b/js&css/extension/init.js index 54f84536f..be8a84800 100644 --- a/js&css/extension/init.js +++ b/js&css/extension/init.js @@ -150,12 +150,9 @@ document.addEventListener('it-message-from-youtube', function () { } else if (message.action === 'popup player') { chrome.runtime.sendMessage({ action: 'fixPopup', - url: message.url, - playerSize: { - width: message.width, - height: message.height - }, - title: message.title + width: message.width, + height: message.height, + title: message.title, }); } else if (message.action === 'analyzer') { if (extension.storage.data.analyzer_activation === true) { diff --git a/js&css/extension/www.youtube.com/appearance/player/player.js b/js&css/extension/www.youtube.com/appearance/player/player.js index 9cec10c6c..824aaa033 100644 --- a/js&css/extension/www.youtube.com/appearance/player/player.js +++ b/js&css/extension/www.youtube.com/appearance/player/player.js @@ -4,9 +4,3 @@ # --------------------------------------------------------------*/ -/*-------------------------------------------------------------- -# ---------------------------------------------------------------*/ -/*-------------------------------------------------------------- -# HIDE VIDEO TITLE IN FULLSCREEN ---------------------------------------------------------------*/ diff --git a/js&css/extension/www.youtube.com/general/general.js b/js&css/extension/www.youtube.com/general/general.js index c23de0c7d..dc2ffe107 100644 --- a/js&css/extension/www.youtube.com/general/general.js +++ b/js&css/extension/www.youtube.com/general/general.js @@ -151,55 +151,41 @@ extension.features.onlyOnePlayerInstancePlaying = function () { } } }; - - /*-------------------------------------------------------------- # ADD "SCROLL TO TOP" --------------------------------------------------------------*/ - extension.features.addScrollToTop = function (event) { - if (event instanceof Event) { - if (window.scrollY > window.innerHeight / 2) { - document.documentElement.setAttribute('it-scroll-to-top', 'true'); - } else { - document.documentElement.removeAttribute('it-scroll-to-top'); - } - } else { - if (extension.storage.get('add_scroll_to_top') === true) { - this.addScrollToTop.button = satus.render({ - component: 'div', - id: 'it-scroll-to-top', - on: { - click: function () { - window.scrollTo(0, 0); - } - }, - - svg: { - component: 'svg', - attr: { - 'viewBox': '0 0 24 24' - }, - - path: { - component: 'path', - attr: { - 'd': 'M13 19V7.8l4.9 5c.4.3 1 .3 1.4 0 .4-.5.4-1.1 0-1.5l-6.6-6.6a1 1 0 0 0-1.4 0l-6.6 6.6a1 1 0 1 0 1.4 1.4L11 7.8V19c0 .6.5 1 1 1s1-.5 1-1z' - } - } - } - }); - - window.addEventListener('scroll', this.addScrollToTop); - } else if (this.addScrollToTop.button) { - window.removeEventListener('scroll', this.addScrollToTop); - - this.addScrollToTop.button.remove(); - } - } + if (event instanceof Event) { + if (window.scrollY > window.innerHeight / 2) { + document.documentElement.setAttribute('it-scroll-to-top', 'true'); + } else { + document.documentElement.removeAttribute('it-scroll-to-top'); + } + } else { + if (extension.storage.get('add_scroll_to_top') === true) { + this.addScrollToTop.button = document.createElement('div'); + this.addScrollToTop.button.id = 'it-scroll-to-top'; + this.addScrollToTop.button.className = 'satus-div'; + var svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg'); + svg.setAttribute('viewBox', '0 0 24 24'); + var path = document.createElementNS('http://www.w3.org/2000/svg', 'path'); + path.setAttribute('d', 'M13 19V7.8l4.9 5c.4.3 1 .3 1.4 0 .4-.5.4-1.1 0-1.5l-6.6-6.6a1 1 0 0 0-1.4 0l-6.6 6.6a1 1 0 1 0 1.4 1.4L11 7.8V19c0 .6.5 1 1 1s1-.5 1-1z'); + svg.appendChild(path); + this.addScrollToTop.button.appendChild(svg); + window.addEventListener('scroll', function () { document.body.appendChild(extension.features.addScrollToTop.button); }); + this.addScrollToTop.button.addEventListener('click', function () { + window.scrollTo(0, 0); + document.getElementById('it-scroll-to-top')?.remove(); + }); + } + if (extension.storage.get('add_scroll_to_top') === true) { + window.addEventListener('scroll', extension.features.addScrollToTop); + } else if (this.addScrollToTop.button) { + window.removeEventListener('scroll', extension.features.addScrollToTop); + this.addScrollToTop.button.remove(); + } + } }; - - /*-------------------------------------------------------------- # CONFIRMATION BEFORE CLOSING --------------------------------------------------------------*/ @@ -220,7 +206,7 @@ extension.features.confirmationBeforeClosing = function () { extension.features.defaultContentCountry = function (changed) { var value = extension.storage.get('default_content_country'); - if (satus.isset(value)) { + if (value) { if (value !== 'default') { var date = new Date(); @@ -241,7 +227,6 @@ extension.features.defaultContentCountry = function (changed) { /*-------------------------------------------------------------- # ADD "POPUP WINDOW" BUTTONS --------------------------------------------------------------*/ - extension.features.popupWindowButtons = function (event) { if (event instanceof Event) { if (event.type === 'mouseover') { @@ -250,45 +235,40 @@ extension.features.popupWindowButtons = function (event) { detected = false; while (detected === false && target.parentNode) { + var targetClassList = target.classList || ''; if ( - target.id === 'thumbnail' && target.className.indexOf('ytd-thumbnail') !== -1 || - target.className.indexOf('thumb-link') !== -1 + target.id === 'thumbnail' && targetClassList.contains('ytd-thumbnail') || targetClassList.contains('thumb-link') ) { if (!target.itPopupWindowButton) { - target.itPopupWindowButton = satus.render({ - component: 'button', - class: 'it-popup-window', - data: { - id: extension.functions.getUrlParameter(target.href, 'v') - }, - on: { - click: function (event) { - event.preventDefault(); - event.stopPropagation(); - - window.open('https://www.youtube.com/embed/' + this.dataset.id + '?autoplay=' + (extension.storage.get('player_autoplay') == false ? '0' : '1'), '_blank', 'directories=no,toolbar=no,location=no,menubar=no,status=no,titlebar=no,scrollbars=no,resizable=no'); - } - }, - - svg: { - component: 'svg', - attr: { - 'viewBox': '0 0 24 24' - }, - - path: { - component: 'path', - attr: { - 'd': 'M19 7h-8v6h8V7zm2-4H3C2 3 1 4 1 5v14c0 1 1 2 2 2h18c1 0 2-1 2-2V5c0-1-1-2-2-2zm0 16H3V5h18v14z' - } - } - } - }, target); +target.itPopupWindowButton = document.createElement('button'); +target.itPopupWindowButton.className = 'satus-button it-popup-window'; +target.itPopupWindowButton.dataset.id = extension.functions.getUrlParameter(target.href, 'v'); + +var svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg'); +svg.setAttribute('viewBox', '0 0 24 24'); +var path = document.createElementNS('http://www.w3.org/2000/svg', 'path'); +path.setAttribute('d', 'M19 7h-8v6h8V7zm2-4H3C2 3 1 4 1 5v14c0 1 1 2 2 2h18c1 0 2-1 2-2V5c0-1-1-2-2-2zm0 16H3V5h18v14z'); +svg.appendChild(path); +target.itPopupWindowButton.appendChild(svg); +target.appendChild(target.itPopupWindowButton); + + +target.itPopupWindowButton.addEventListener('click', function (event) { + event.preventDefault(); + event.stopPropagation(); + window.open('https://www.youtube.com/embed/' + this.dataset.id + '?autoplay=' + (extension.storage.get('player_autoplay') == false ? '0' : '1'), '_blank', 'directories=no,toolbar=no,location=no,menubar=no,status=no,titlebar=no,scrollbars=no,resizable=no'); + chrome.runtime.sendMessage({ + action: 'fixPopup', + width: document.querySelector("video")?.offsetWidth, + height: document.querySelector("video")?.offsetHeight, + title: target.closest('dismissible')?.querySelector('*[id="video-title"]')?.textContent + " - Youtube" + //title doesnt work + }) +}); } - + detected = true; } - target = target.parentNode; } } @@ -301,8 +281,6 @@ extension.features.popupWindowButtons = function (event) { } } }; - - /*-------------------------------------------------------------- # FONT --------------------------------------------------------------*/ @@ -310,7 +288,7 @@ extension.features.popupWindowButtons = function (event) { extension.features.font = function (changed) { var option = extension.storage.get('font'); - if (satus.isString(option) && option !== 'Default') { + if (option && option !== 'Default') { var link = this.font.link || document.createElement('link'), style = this.font.style || document.createElement('style'); @@ -361,14 +339,25 @@ extension.features.markWatchedVideos = function (anything) { ) ) { if (!target.itMarkWatchedVideosButton) { - target.itMarkWatchedVideosButton = satus.render({ - component: 'button', - class: 'it-mark-watched-videos', - data: { - id: extension.functions.getUrlParameter(target.href, 'v') - }, - on: { - click: function (event) { + target.itMarkWatchedVideosButton = document.createElement('button'); + target.itMarkWatchedVideosButton.className = 'satus-button it-mark-watched-videos'; + target.itMarkWatchedVideosButton.dataset.id = extension.functions.getUrlParameter(target.href, 'v'); + var id = target.itMarkWatchedVideosButton.dataset.id; + var svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg'); svg.setAttribute('viewBox', '0 0 24 24'); + var pathData = 'M12 15.15q1.525 0 2.588-1.063 1.062-1.062 1.062-2.587 0-1.525-1.062-2.588Q13.525 7.85 12 7.85q-1.525 0-2.587 1.062Q8.35 9.975 8.35 11.5q0 1.525 1.063 2.587Q10.475 15.15 12 15.15Zm0-.95q-1.125 0-1.912-.788Q9.3 12.625 9.3 11.5t.788-1.913Q10.875 8.8 12 8.8t1.913.787q.787.788.787 1.913t-.787 1.912q-.788.788-1.913.788Zm0 3.8q-3.1 0-5.688-1.613Q3.725 14.775 2.325 12q-.05-.1-.075-.225-.025-.125-.025-.275 0-.15.025-.275.025-.125.075-.225 1.4-2.775 3.987-4.388Q8.9 5 12 5q3.1 0 5.688 1.612Q20.275 8.225 21.675 11q.05.1.075.225.025.125.025.275 0 .15-.025.275-.025.125-.075.225-1.4 2.775-3.987 4.387Q15.1 18 12 18Z'; + var path = document.createElementNS('http://www.w3.org/2000/svg', 'path'); + path.setAttribute('d', pathData + 'm0-6.5Zm0 5.5q2.825 0 5.188-1.488Q19.55 14.025 20.8 11.5q-1.25-2.525-3.612-4.013Q14.825 6 12 6 9.175 6 6.812 7.487 4.45 8.975 3.2 11.5q1.25 2.525 3.612 4.012Q9.175 17 12 17Z'); + svg.appendChild(path); + var svg2 = document.createElementNS('http://www.w3.org/2000/svg', 'svg'); svg2.setAttribute('viewBox', '0 0 24 24'); + var extraPath = document.createElementNS('http://www.w3.org/2000/svg', 'path'); + extraPath.setAttribute('d', pathData); + svg2.appendChild(extraPath); + target.itMarkWatchedVideosButton.appendChild(svg); + target.itMarkWatchedVideosButton.appendChild(svg2); + if (extension.storage.get('watched') && extension.storage.get('watched')[id]) { + target.itMarkWatchedVideosButton.setAttribute('watched', '')}; + target.appendChild(target.itMarkWatchedVideosButton); + target.itMarkWatchedVideosButton.addEventListener('click', function (event) { var id = this.dataset.id, value = this.toggleAttribute('watched'); @@ -389,42 +378,8 @@ extension.features.markWatchedVideos = function (anything) { chrome.storage.local.set({ watched: extension.storage.get('watched') - }); - }, - render: function () { - if (extension.storage.get('watched') && extension.storage.get('watched')[this.dataset.id]) { - this.setAttribute('watched', ''); - } - } - }, - - svg: { - component: 'svg', - attr: { - 'viewBox': '0 0 24 24' - }, - - path: { - component: 'path', - attr: { - 'd': 'M12 15.15q1.525 0 2.588-1.063 1.062-1.062 1.062-2.587 0-1.525-1.062-2.588Q13.525 7.85 12 7.85q-1.525 0-2.587 1.062Q8.35 9.975 8.35 11.5q0 1.525 1.063 2.587Q10.475 15.15 12 15.15Zm0-.95q-1.125 0-1.912-.788Q9.3 12.625 9.3 11.5t.788-1.913Q10.875 8.8 12 8.8t1.913.787q.787.788.787 1.913t-.787 1.912q-.788.788-1.913.788Zm0 3.8q-3.1 0-5.688-1.613Q3.725 14.775 2.325 12q-.05-.1-.075-.225-.025-.125-.025-.275 0-.15.025-.275.025-.125.075-.225 1.4-2.775 3.987-4.388Q8.9 5 12 5q3.1 0 5.688 1.612Q20.275 8.225 21.675 11q.05.1.075.225.025.125.025.275 0 .15-.025.275-.025.125-.075.225-1.4 2.775-3.987 4.387Q15.1 18 12 18Zm0-6.5Zm0 5.5q2.825 0 5.188-1.488Q19.55 14.025 20.8 11.5q-1.25-2.525-3.612-4.013Q14.825 6 12 6 9.175 6 6.812 7.487 4.45 8.975 3.2 11.5q1.25 2.525 3.612 4.012Q9.175 17 12 17Z' - } - } - }, - svg2: { - component: 'svg', - attr: { - 'viewBox': '0 0 24 24' - }, - - path: { - component: 'path', - attr: { - 'd': 'M12 15.15q1.525 0 2.588-1.063 1.062-1.062 1.062-2.587 0-1.525-1.062-2.588Q13.525 7.85 12 7.85q-1.525 0-2.587 1.062Q8.35 9.975 8.35 11.5q0 1.525 1.063 2.587Q10.475 15.15 12 15.15Zm0-.95q-1.125 0-1.912-.788Q9.3 12.625 9.3 11.5t.788-1.913Q10.875 8.8 12 8.8t1.913.787q.787.788.787 1.913t-.787 1.912q-.788.788-1.913.788Zm0 3.8q-3.1 0-5.688-1.613Q3.725 14.775 2.325 12q-.05-.1-.075-.225-.025-.125-.025-.275 0-.15.025-.275.025-.125.075-.225 1.4-2.775 3.987-4.388Q8.9 5 12 5q3.1 0 5.688 1.612Q20.275 8.225 21.675 11q.05.1.075.225.025.125.025.275 0 .15-.025.275-.025.125-.075.225-1.4 2.775-3.987 4.387Q15.1 18 12 18Z' - } - } - } - }, target); + });}); + } else { var button = target.itMarkWatchedVideosButton; diff --git a/js&css/extension/www.youtube.com/night-mode/night-mode.js b/js&css/extension/www.youtube.com/night-mode/night-mode.js index 0a23cb395..8fb89c805 100644 --- a/js&css/extension/www.youtube.com/night-mode/night-mode.js +++ b/js&css/extension/www.youtube.com/night-mode/night-mode.js @@ -22,7 +22,7 @@ extension.features.bluelight = function () { return false; } - if (satus.isset(value) === false) { + if (!value) { value = 0; } @@ -83,19 +83,10 @@ extension.features.bluelight = function () { extension.features.dim = function () { var value = extension.storage.get('dim'); + if (extension.features.schedule() === false) { return false;} - if (extension.features.schedule() === false) { - return false; - } - - if (satus.isset(value) === false) { - value = 0; - } - - if (typeof value !== 'number') { - value = Number(value); - } - + if (!value) { value = 0;} + if (typeof value !== 'number') {value = Number(value);} if (value !== 0) { if (!this.dim.element) { var element = document.createElement('div'); diff --git a/js&css/web-accessible/init.js b/js&css/web-accessible/init.js index d68a3096f..407dbdd6b 100644 --- a/js&css/web-accessible/init.js +++ b/js&css/web-accessible/init.js @@ -4,24 +4,6 @@ ImprovedTube.messages.create(); ImprovedTube.messages.listener(); -/* -//document.body.removeChild(document.body.getElementsByTagName("script")[1]); - var scriptElement = document.body.getElementsByTagName("script")[1] || false; - if (scriptElement && scriptElement.textContent) { - // Use regex to modify the JSON content while preserving the rest - var updatedContent = scriptElement.textContent.replace(/(^[^{]*)(\{.*?})([^}]*$)/gs, function(match, before, json, after) { - var parsedJSON = JSON.parse(json); - delete parsedJSON.playerAds; - delete parsedJSON.adPlacements; - delete parsedJSON.adSlots; - console.log(parsedJSON.videoDetails); - var updatedJSON = JSON.stringify(parsedJSON); - return before + updatedJSON + after; - }); - scriptElement.textContent = updatedContent; -} -*/ - if (document.body) { ImprovedTube.childHandler(document.body); } diff --git a/js&css/web-accessible/www.youtube.com/player.js b/js&css/web-accessible/www.youtube.com/player.js index 0acae6745..bca88f66a 100644 --- a/js&css/web-accessible/www.youtube.com/player.js +++ b/js&css/web-accessible/www.youtube.com/player.js @@ -135,7 +135,7 @@ console.log("genre: " + DATA.genre + "//title: " + DATA.title + "//keywords: " } //DATA (TO-DO: make the Data available to more/all features? #1452 #1763 (Then can replace ImprovedTube.elements.category === 'music', VideoID is also used elsewhere) -DATA = {}; +DATA = {}; defaultKeywords = "video,sharing,camera,phone,video phone,free,upload"; DATA.keywords = false; keywords = false; amountOfSongs = false; DATA.videoID = location.href.match(/(\?|\&)v=[^&]+/)?.[0].substr(3) || location.href.match(/()embed\/[^&]+/)?.[0].substr(3) || improvedTube.videoID || false; @@ -814,9 +814,7 @@ ImprovedTube.playerPopupButton = function () { onclick: function () { "use strict"; const ytPlayer = ImprovedTube.elements.player; - ytPlayer.pauseVideo(); - const videoID = location.search.match(ImprovedTube.regex.video_id)[1], listMatch = location.search.match(ImprovedTube.regex.playlist_id), popup = window.open( @@ -836,6 +834,7 @@ ImprovedTube.playerPopupButton = function () { //~ change focused tab to URL-less popup ImprovedTube.messages.send({ action: 'popup player', + width: ytPlayer.offsetWidth, height: ytPlayer.offsetHeight, title: document.title diff --git a/js&css/web-accessible/www.youtube.com/playlist.js b/js&css/web-accessible/www.youtube.com/playlist.js index 252ea946c..77c7b8bbd 100644 --- a/js&css/web-accessible/www.youtube.com/playlist.js +++ b/js&css/web-accessible/www.youtube.com/playlist.js @@ -9,14 +9,14 @@ ImprovedTube.playlistUpNextAutoplay = function (event) { ImprovedTube.getParam(location.href, 'list') && ImprovedTube.storage.playlist_up_next_autoplay === false ) { - if (this.elements.ytd_watch.playlistData) + try { if (this.elements.ytd_watch.playlistData) {this.elements.ytd_watch.playlistData.currentIndex = this.elements.ytd_watch.playlistData.totalVideos} - else {var tries = 0; var intervalMs = 300; var maxTries = 5; + else {var tries = 0; var intervalMs = 300; var maxTries = 6; var waitForPlaylist = setInterval(() => { if (this.elements.ytd_watch.playlistData || (++tries >= maxTries) ) { this.elements.ytd_watch.playlistData.currentIndex = this.elements.ytd_watch.playlistData.totalVideos; clearInterval(waitForPlaylist );} intervalMs *= 1.4;}, intervalMs); - } + } } catch (error) { console.error("Waiting for playlist", error);} } }; /*------------------------------------------------------------------------------ @@ -192,7 +192,7 @@ ImprovedTube.playlistPopupCreateButton = function (playlistID, altButtonStyle, c action: 'popup player', width: window.innerWidth, height: window.innerHeight, - title: document.title + title: document.title, }); }, true @@ -219,7 +219,7 @@ ImprovedTube.playlistPopupCreateButton = function (playlistID, altButtonStyle, c */ ImprovedTube.playlistPopupUpdate = function () { "use strict"; - if (!(this.storage.playlist_popup ?? false)) return; + if (this.storage.playlist_popup === true){ const playlistID = location.search.match(this.regex.playlist_id)?.[1], playlistIDMini = this.elements.player?.getPlaylistId?.(); @@ -235,10 +235,11 @@ ImprovedTube.playlistPopupUpdate = function () { if (miniItemButtons == null) this.elements.buttons['it-popup-playlist-button-mini'] = null; else miniItemButtons.appendChild(this.elements.buttons['it-popup-playlist-button-mini'] = this.playlistPopupCreateButton(playlistIDMini, true, true)); } else if (playlistIDMini != null && this.elements.buttons['it-popup-playlist-button-mini'].dataset.list !== playlistIDMini) this.elements.buttons['it-popup-playlist-button-mini'].dataset.list = playlistIDMini; - +try { if (!document.contains(this.elements.buttons['it-popup-playlist-button-panel'])) { const panelItemButtons = document.body.querySelector('ytd-app>div#content>ytd-page-manager>ytd-watch-flexy ytd-playlist-panel-renderer div#top-level-buttons-computed'); if (panelItemButtons == null) this.elements.buttons['it-popup-playlist-button-panel'] = null; else panelItemButtons.appendChild(this.elements.buttons['it-popup-playlist-button-panel'] = this.playlistPopupCreateButton(playlistID, true, true)); } else if (playlistID != null && this.elements.buttons['it-popup-playlist-button-panel'].dataset.list !== playlistID) this.elements.buttons['it-popup-playlist-button-panel'].dataset.list = playlistID; -}; \ No newline at end of file +} catch (error) { console.error("Error appending playlist button panel:", error);} +}}; \ No newline at end of file diff --git a/manifest.json b/manifest.json index d1dd4a127..645244fa8 100644 --- a/manifest.json +++ b/manifest.json @@ -3,7 +3,7 @@ "short_name" : "ImprovedTube", "name": "'Improve YouTube!' 🎧 (for YouTube & Videos)", "description": "__MSG_description_ext__", - "version": "4.408", + "version": "4.444", "default_locale": "en", "icons": { "16": "stuff/icons/16.png", @@ -38,9 +38,8 @@ "https://www.youtube.com/audiolibrary/*", "https://www.youtube.com/tv*" ], - "js": [ + "js": [ "js&css/satus.js", - "js&css/extension/core.js", "js&css/extension/functions.js", "js&css/extension/www.youtube.com/night-mode/night-mode.js", "js&css/extension/www.youtube.com/general/general.js", @@ -62,15 +61,18 @@ ], "permissions": [ "contextMenus", - "storage" + "storage", + "webRequest", + "webRequestBlocking", "webNavigation", "", + "https://www.youtube.com/*" ], "web_accessible_resources": [ "menu/index.html", "js&css/web-accessible/core.js", "js&css/web-accessible/functions.js", "js&css/web-accessible/www.youtube.com/appearance.js", - "js&css/web-accessible/www.youtube.com/themes.js", "js&css/web-accessible/www.youtube.com/player.js", + "js&css/web-accessible/www.youtube.com/themes.js", "js&css/web-accessible/www.youtube.com/playlist.js", "js&css/web-accessible/www.youtube.com/channel.js", "js&css/web-accessible/www.youtube.com/shortcuts.js",