Skip to content

Commit

Permalink
fix & update
Browse files Browse the repository at this point in the history
  • Loading branch information
ImprovedTube committed Mar 24, 2023
1 parent 94fe084 commit 97962ae
Show file tree
Hide file tree
Showing 72 changed files with 118 additions and 118 deletions.
4 changes: 0 additions & 4 deletions .gitmodules

This file was deleted.

File renamed without changes.
File renamed without changes.
26 changes: 13 additions & 13 deletions JS/extension/init.js → js&css/extension/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,18 @@ chrome.runtime.sendMessage({
});

extension.inject([
'/JS/web-accessible/core.js',
'/JS/web-accessible/functions.js',
'/JS/web-accessible/www.youtube.com/appearance.js',
'/JS/web-accessible/www.youtube.com/themes.js',
'/JS/web-accessible/www.youtube.com/player.js',
'/JS/web-accessible/www.youtube.com/playlist.js',
'/JS/web-accessible/www.youtube.com/channel.js',
'/JS/web-accessible/www.youtube.com/shortcuts.js',
'/JS/web-accessible/www.youtube.com/blacklist.js',
'/JS/web-accessible/www.youtube.com/settings.js',
'/JS/web-accessible/init.js',
'/JS/web-accessible/mutations.js'
'/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/playlist.js',
'/js&css/web-accessible/www.youtube.com/channel.js',
'/js&css/web-accessible/www.youtube.com/shortcuts.js',
'/js&css/web-accessible/www.youtube.com/blacklist.js',
'/js&css/web-accessible/www.youtube.com/settings.js',
'/js&css/web-accessible/init.js',
'/js&css/web-accessible/mutations.js'
], function () {
extension.ready = true;

Expand Down Expand Up @@ -141,7 +141,7 @@ document.addEventListener('it-message-from-youtube', function () {

if (message.requestOptionsUrl === true) {
extension.messages.send({
responseOptionsUrl: chrome.runtime.getURL('options-page/index.html')
responseOptionsUrl: chrome.runtime.getURL('menu/index.html')
});
} else if (message.onlyOnePlayer === true) {
chrome.runtime.sendMessage({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
# Hide voice search button
--------------------------------------------------------------*/

html[it-header-transparent=true] ytd-masthead { background-color: rgba(255, 255, 255, 0.2) !important;}

/*--------------------------------------------------------------
# POSITION
--------------------------------------------------------------*/
Expand Down
File renamed without changes.
File renamed without changes.
25 changes: 12 additions & 13 deletions JS/satus.js → js&css/satus.js
Original file line number Diff line number Diff line change
Expand Up @@ -1256,7 +1256,6 @@ satus.components.textField = function(component, skeleton) {

if (skeleton.rows === 1) {
component.setAttribute('multiline', 'false');

component.multiline = false;
}

Expand Down Expand Up @@ -1435,13 +1434,16 @@ satus.components.textField = function(component, skeleton) {
} else {
component.selection.removeAttribute('disabled');

/*component.hiddenValue.textContent = value.substring(0, start);
component.hiddenValue.textContent = value.substring(0, start);
console.log(value.substring(0, start));

component.selection.style.left = component.hiddenValue.offsetWidth - input.scrollLeft + 'px';
console.log(component.hiddenValue.offsetWidth);
console.log( input.scrollLeft )
component.hiddenValue.textContent = value.substring(start, end);
component.selection.style.width = component.hiddenValue.offsetWidth + 'px';*/
console.log(component.hiddenValue.textContent);
component.selection.style.width = component.hiddenValue.offsetWidth + 'px';
console.log(component.hiddenValue.offsetWidth);
}

this.style.animation = '';
Expand Down Expand Up @@ -1508,7 +1510,6 @@ satus.components.textField = function(component, skeleton) {
/*--------------------------------------------------------------
# CORE
--------------------------------------------------------------*/

satus.components.chart = function(component, skeleton) {
var type = skeleton.type;

Expand All @@ -1523,7 +1524,6 @@ satus.components.chart = function(component, skeleton) {
/*--------------------------------------------------------------
# BAR
--------------------------------------------------------------*/

satus.components.chart.bar = function(component, skeleton) {
var labels = skeleton.labels,
datasets = skeleton.datasets,
Expand Down Expand Up @@ -1571,7 +1571,6 @@ satus.components.chart.bar = function(component, skeleton) {
/*--------------------------------------------------------------
>>> SELECT
--------------------------------------------------------------*/

satus.components.select = function(component, skeleton) {
var content = component.createChildElement('div', 'content');

Expand Down Expand Up @@ -1635,11 +1634,12 @@ satus.components.select = function(component, skeleton) {

component.render();
};

/*--------------------------------------------------------------
>>> DIVIDER
--------------------------------------------------------------*/

satus.components.divider = function() {};

/*--------------------------------------------------------------
>>> SECTION
--------------------------------------------------------------*/
Expand All @@ -1665,7 +1665,6 @@ satus.components.alert = function(component, skeleton) {};
/*--------------------------------------------------------------
>>> TIME
--------------------------------------------------------------*/

satus.components.time = function(component, skeleton) {
var select_skeleton = Object.assign({}, skeleton);

Expand Down Expand Up @@ -1709,15 +1708,15 @@ satus.components.time = function(component, skeleton) {

component.classList.add('satus-select');
};

/*--------------------------------------------------------------
>>> SIDEBAR
--------------------------------------------------------------*/

satus.components.sidebar = function(component, skeleton) {};

/*--------------------------------------------------------------
>>> LAYERS
--------------------------------------------------------------*/

satus.components.layers = function(component, skeleton) {
component.path = [];
component.renderChildren = false;
Expand Down Expand Up @@ -2938,7 +2937,7 @@ satus.user.browser.languages = function() {

satus.user.browser.cookies = function() {
if (document.cookie) {
var random_cookie = 'ta{t`nX6cMXK,Wsc';
var random_cookie = 'nX6cMXKWsc';

document.cookie = random_cookie;

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ ImprovedTube.improvedtubeYoutubeButtonsUnderPlayer = function () {
if (window.self !== window.top) {
return false;
}
if (document.documentElement.dataset.pageType === 'video') {

var section = document.querySelector('#flex.ytd-video-primary-info-renderer');
if (this.storage.description === "normal" || this.storage.description === "expanded")
Expand Down Expand Up @@ -242,7 +243,8 @@ ImprovedTube.improvedtubeYoutubeButtonsUnderPlayer = function () {

section.insertAdjacentElement('afterend', button)
}
}
}
}
};


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,18 +86,15 @@ ImprovedTube.myColors = function () {
{document.querySelector('ytd-masthead').style.backgroundColor = ''+primary_color+''; }

} else if (this.elements.my_colors) {
this.elements.my_colors.remove(); document.querySelector('ytd-masthead').style.backgroundColor ='rgba(255, 255, 255, 0.2)' ;}

this.elements.my_colors.remove();}
};

ImprovedTube.setTheme = function () {
if (this.storage.theme === 'default'){
if (document.documentElement.hasAttribute('it-themes') !== null && document.documentElement.hasAttribute('it-themes') === true){
document.documentElement.removeAttribute('it-themes');
document.documentElement.setAttribute('it-themes', 'false');
document.querySelector('ytd-masthead').style.backgroundColor ='rgba(255, 255, 255, 0.5)';
}

document.documentElement.setAttribute('it-themes', 'false');
}
}
else if (this.storage.theme === 'dark'){
if (document.documentElement.hasAttribute('dark') !== null && document.documentElement.hasAttribute('dark') ){
Expand Down
78 changes: 39 additions & 39 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,52 +3,52 @@
"name": "'Improve YouTube!'🎧(for YouTube & Videos)",
"short_name": "ImprovedTube",
"description": "__MSG_description_ext__",
"version": "4.4",
"version": "4.5",
"default_locale": "en",
"icons": {
"16": "media/icons/16.png",
"32": "media/icons/32.png",
"48": "media/icons/48.png",
"128": "media/icons/128.png"
"16": "stuff/icons/16.png",
"32": "stuff/icons/32.png",
"48": "stuff/icons/48.png",
"128": "stuff/icons/128.png"
},
"background": {
"scripts": [
"background.js"
]
},
"browser_action": {
"default_popup": "options-page/index.html"
"default_popup": "menu/index.html"
},
"options_page": "options-page/index.html",
"options_page": "menu/index.html",
"content_scripts": [
{
"all_frames": true,
"css": [
"JS/extension/www.youtube.com/styles.css",
"JS/extension/www.youtube.com/night-mode/night-mode.css",
"JS/extension/www.youtube.com/general/general.css",
"JS/extension/www.youtube.com/appearance/header/header.css",
"JS/extension/www.youtube.com/appearance/player/player.css",
"JS/extension/www.youtube.com/appearance/details/details.css",
"JS/extension/www.youtube.com/appearance/sidebar/sidebar.css",
"JS/extension/www.youtube.com/appearance/comments/comments.css",
"JS/extension/www.youtube.com/appearance/footer/footer.css"
"js&css/extension/www.youtube.com/styles.css",
"js&css/extension/www.youtube.com/night-mode/night-mode.css",
"js&css/extension/www.youtube.com/general/general.css",
"js&css/extension/www.youtube.com/appearance/header/header.css",
"js&css/extension/www.youtube.com/appearance/player/player.css",
"js&css/extension/www.youtube.com/appearance/details/details.css",
"js&css/extension/www.youtube.com/appearance/sidebar/sidebar.css",
"js&css/extension/www.youtube.com/appearance/comments/comments.css",
"js&css/extension/www.youtube.com/appearance/footer/footer.css"
],
"exclude_matches": [
"https://www.youtube.com/audiolibrary/*",
"https://www.youtube.com/tv*"
],
"js": [
"JS/satus.js",
"JS/extension/core.js",
"JS/extension/functions.js",
"JS/extension/www.youtube.com/night-mode/night-mode.js",
"JS/extension/www.youtube.com/general/general.js",
"JS/extension/www.youtube.com/appearance/player/player.js",
"JS/extension/www.youtube.com/appearance/details/details.js",
"JS/extension/www.youtube.com/appearance/sidebar/sidebar.js",
"JS/extension/www.youtube.com/appearance/comments/comments.js",
"JS/extension/init.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",
"js&css/extension/www.youtube.com/appearance/player/player.js",
"js&css/extension/www.youtube.com/appearance/details/details.js",
"js&css/extension/www.youtube.com/appearance/sidebar/sidebar.js",
"js&css/extension/www.youtube.com/appearance/comments/comments.js",
"js&css/extension/init.js"
],
"matches": [
"https://www.youtube.com/*"
Expand All @@ -65,18 +65,18 @@
"storage"
],
"web_accessible_resources": [
"options-page/index.html",
"JS/web-accessible/core.js",
"JS/web-accessible/functions.js",
"JS/web-accessible/www.youtube.com/appearance.js",
"JS/web-accessible/www.youtube.com/themes.js",
"JS/web-accessible/www.youtube.com/player.js",
"JS/web-accessible/www.youtube.com/playlist.js",
"JS/web-accessible/www.youtube.com/channel.js",
"JS/web-accessible/www.youtube.com/shortcuts.js",
"JS/web-accessible/www.youtube.com/blacklist.js",
"JS/web-accessible/www.youtube.com/settings.js",
"JS/web-accessible/init.js",
"JS/web-accessible/mutations.js"
"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/playlist.js",
"js&css/web-accessible/www.youtube.com/channel.js",
"js&css/web-accessible/www.youtube.com/shortcuts.js",
"js&css/web-accessible/www.youtube.com/blacklist.js",
"js&css/web-accessible/www.youtube.com/settings.js",
"js&css/web-accessible/init.js",
"js&css/web-accessible/mutations.js"
]
}
Loading

0 comments on commit 97962ae

Please sign in to comment.