Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ImprovedTube authored May 13, 2024
1 parent 3b76c4b commit 002daa4
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 17 deletions.
15 changes: 9 additions & 6 deletions background.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,15 @@ chrome.runtime.onInstalled.addListener(function (installed) {
}
});
} 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})}

// still needed? (are screenshots broken in Safari?):
if(navigator.userAgent.indexOf("Safari") != -1) {chrome.storage.local.set({below_player_screenshot: false})}
// console.log('Thanks for installing!');
if(navigator.userAgent.indexOf("Firefox") != -1){
chrome.storage.local.set({below_player_pip: false})}
if(navigator.userAgent.indexOf('Safari') !== -1
&& (!/Windows|Chrom/.test(navigator.userAgent)
|| /Macintosh|iPhone/.test(navigator.userAgent))) {
chrome.storage.local.set({below_player_pip: false})
// still needed? (are screenshots broken in Safari?):
chrome.storage.local.set({below_player_screenshot: false})}
// console.log('Thanks for installing!');
}
});
/*--------------------------------------------------------------
Expand Down
16 changes: 6 additions & 10 deletions js&css/extension/www.youtube.com/appearance/details/details.css
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ html[it-hide-share-button='hidden'] #flexible-item-buttons button:has(svg path[d
html[it-hide-share-button='icons_only'] #menu button:has(svg path[d^="M15 5.63 20.66"]) div:nth-child(2),
html[it-hide-share-button='icons_only'] #menu button:has(svg path[d^="M15 5.63 20.66"]) .yt-spec-button-shape-next__button-text-content,
/*------# HIDE DOWNLOAD BUTTON------*/
html[it-hide-download-button='hidden'] ytd-download-button-renderer,
html[it-hide-download-button='icons_only'] ytd-download-button-renderer #text,
html[it-hide-download-button='hidden'] #menu button:has(svg path[d^="M17 18v1H6v-1h11"]),
html[it-hide-download-button='hidden'] #flexible-item-buttons button:has(svg path[d^="M17 18v1H6v-1h11"]),
html[it-hide-download-button='icons_only'] #menu button:has(svg path[d^="M17 18v1H6v-1h11"]) div:nth-child(2),
Expand All @@ -78,18 +80,12 @@ html[it-hide-report-button='true'] #top-level-buttons-computed button#Report-but
html[it-hide-report-button='true'] #menu button:has(svg path[d^="m13.18 4 .24 1.2.16.8H19v7h-5.18l-.24-1.2-.16-.8H6V4h7.18M14"]),
html[it-hide-report-button='true'] #flexible-item-buttons button:has(svg path[d^="m13.18 4 .24 1.2.16.8H19v7h-5.18l-.24-1.2-.16-.8H6V4h7.18M14"]),
/*------HIDE MORE BUTTON------*/
html[it-hide-more-button='true'] #menu #button [class*="dropdown"],
html[it-hide-more-button='true'] #menu button:has(svg path[d^="M7.5 12c0 .83-.67 1.5-1. 1."]),
/* previous "more"-svg and dom: */
html[it-hide-more-button='true'] #menu yt-button-shape#button-shape,
html[it-hide-more-button='true'] #menu button:has(svg path[d^="M7.5,12c0,0.83-0.67,1.5-1.5"]),
html[it-hide-more-button='true'] #menu button:has(svg path[d^="M7.5,12c0,0.83-0.67,1.5-1.5"]),
html[it-hide-more-button='true'] #flexible-item-buttons button:has(svg path[d^="M7.5,12c0,0.83-0.67,1.5-1.5"]),
/*------# HIDE THANKS BUTTON------*/
/*html[it-hide-thanks-button='hidden'] #flexible-item-buttons button#Thanks-button,
html[it-hide-thanks-button='icons_only'] #flexible-item-buttons button#Thanks-button div.yt-spec-button-shape-next__button-text-content,
*/ /*------# HIDE CLIP BUTTON------*/
html[it-hide-clip-button='hidden'] #flexible-item-buttons button#Clip-button,
html[it-hide-clip-button='icons_only'] #flexible-item-buttons button#Clip-button div.yt-spec-button-shape-next__button-text-content,
/*------# HIDE SAVE BUTTON------*/
html[it-hide-save-button='hidden'] #flexible-item-buttons button#Save-button,
html[it-hide-save-button='icons_only'] #flexible-item-buttons button#Save-button div.yt-spec-button-shape-next__button-text-content,
/*------# HIDE DETAILS-------------*/
html[it-hide-details='true'] ytd-video-primary-info-renderer,
html[it-hide-details='true'] ytd-video-secondary-info-renderer,
Expand Down
4 changes: 3 additions & 1 deletion menu/satus.js
Original file line number Diff line number Diff line change
Expand Up @@ -2939,7 +2939,9 @@ satus.user.browser.name = function() {
return 'Edge';
} else if (user_agent.indexOf('Chrome') !== -1) {
return 'Chrome';
} else if (user_agent.indexOf('Safari') !== -1) {
} else if (user_agent.indexOf('Safari') !== -1
&& (!/Windows|Chrom/.test(user_agent)
|| /Macintosh|iPhone/.test(user_agent))) {
return 'Safari';
} else if (user_agent.indexOf('Firefox') !== -1) {
return 'Firefox';
Expand Down

0 comments on commit 002daa4

Please sign in to comment.