Skip to content

Commit

Permalink
all channel default pages; #1735 @Sverkhchelovek
Browse files Browse the repository at this point in the history
  • Loading branch information
ImprovedTube committed Sep 2, 2023
1 parent 55939a3 commit 3823974
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 9 deletions.
15 changes: 7 additions & 8 deletions background.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ chrome.runtime.onInstalled.addListener(function (installed){
if(installed.reason == 'update'){
// var thisVersion = chrome.runtime.getManifest().version;
// console.log("Updated from " + installed.previousVersion + " to " + thisVersion + "!");
chrome.storage.local.get('hideSubscribe', function (result) {if (result.hideSubscribe === true){ chrome.storage.local.set({subscribe: 'hidden'}); }});
chrome.storage.local.get('limit_page_width', function (result) {
chrome.storage.local.get('channel_default_tab', function (result) {if (result.channel_default_tab === '/home'){ chrome.storage.local.set({channel_default_tab: '/'}); }});
chrome.storage.local.get('hideSubscribe', function (result) {if (result.hideSubscribe === true){ chrome.storage.local.set({subscribe: 'hidden'}); }});
chrome.storage.local.get('limit_page_width', function (result) {
if (result.limit_page_width === false){
chrome.storage.local.set({no_page_margin: true});
chrome.storage.local.remove(['limit_page_width'], (i) => {});
Expand All @@ -31,12 +32,10 @@ chrome.runtime.onInstalled.addListener(function (installed){
chrome.storage.local.set({player_size: 'max_width'});
}});
}
});
if(navigator.userAgent.indexOf("Firefox") != -1){chrome.storage.local.set({below_player_pip: false})};
if(navigator.userAgent.indexOf("Safari") != -1){chrome.storage.local.set({below_player_pip: false})};
if(navigator.userAgent.indexOf("Safari") != -1){chrome.storage.local.set({below_player_screenshot: false})};
}
else if(installed.reason == 'install'){if(navigator.userAgent.indexOf("Firefox") != -1){chrome.storage.local.set({below_player_pip: false})};
});
}
else if(installed.reason == 'install'){
if(navigator.userAgent.indexOf("Firefox") != -1){chrome.storage.local.set({below_player_pip: false})};
if(navigator.userAgent.indexOf("Safari") != -1){chrome.storage.local.set({below_player_pip: false})};
if(navigator.userAgent.indexOf("Safari") != -1){chrome.storage.local.set({below_player_screenshot: false})};
// console.log('Thanks for installing!');
Expand Down
14 changes: 13 additions & 1 deletion menu/skeleton-parts/channel.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,25 @@ extension.skeleton.main.layers.section.channel = {
text: 'defaultChannelTab',
options: [{
text: 'home',
value: '/home'
value: '/'
}, {
text: 'videos',
value: '/videos'
}, {
text: 'shorts',
value: '/shorts'
}, {
text: 'playlists',
value: '/playlists'
}, {
text: 'community',
value: '/community'
}, {
text: 'channels',
value: '/channels'
}, {
text: 'about',
value: '/about'
}]
},
channel_trailer_autoplay: {
Expand Down

0 comments on commit 3823974

Please sign in to comment.