Skip to content

Commit

Permalink
pre-3.600 (3)
Browse files Browse the repository at this point in the history
Signed-off-by: Victor Savinov <[email protected]>
  • Loading branch information
adokseo committed Oct 7, 2021
1 parent 18c24ee commit ad93a00
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 50 deletions.
21 changes: 10 additions & 11 deletions popup.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ body {
font-size: 14px;
overflow: hidden;
margin: 0;

--satus-primary: #ff4158;
--satus-header-background: #fff;
--satus-header-text: #777;
Expand Down Expand Up @@ -152,9 +151,9 @@ body[theme=black] {
}

.satus-header .satus-section {
width: calc(100% - 96px);
flex-wrap: nowrap;
flex: 1;
width: calc(100% - 96px);
}

.satus-header .satus-section--align-start>* {
Expand Down Expand Up @@ -187,22 +186,22 @@ body[theme=black] {
}

.satus-header .satus-span--title {
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
flex: 1;
}

.satus-input--search[type=text] {
position: absolute;
z-index: 1;
right: 64px;
display: none;
width: calc(100vw - 80px);
height: 36px;
padding-right: 36px;
background: var(--satus-header-background);
box-shadow: 0 0 1px 1px var(--satus-hover);
z-index: 1;
}

.satus-input--search:focus {
Expand All @@ -215,13 +214,13 @@ body[theme=black] {

.satus-header .satus-button--close-search {
position: absolute;
z-index: 1;
right: 68px;
display: none;
width: 28px;
min-width: 28px;
height: 28px;
padding: 4px !important;
z-index: 1;
}

.search-mode .satus-button--close-search {
Expand Down Expand Up @@ -250,8 +249,8 @@ body[theme=black] {
width: calc(100% - 80px);
min-width: unset;
max-width: unset;
padding: 0;
margin: 0;
padding: 0;
transform-origin: top;
border-top-left-radius: 0;
border-top-right-radius: 0;
Expand Down Expand Up @@ -306,9 +305,9 @@ body[theme=black] {
}

.satus-modal--vertical .satus-button .satus-span {
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}


Expand Down Expand Up @@ -358,12 +357,12 @@ body[theme=black] {
}

.satus-section--home .satus-button> :nth-child(2) {
overflow: hidden;
overflow: hidden;
width: calc(100% - 16px);
margin: 8px 0 0;
text-align: center;
white-space: nowrap;
text-overflow: ellipsis;
width: calc(100% - 16px);
text-align: center;
}

.satus-button--general svg {
Expand Down Expand Up @@ -535,6 +534,7 @@ overflow: hidden;
.satus-label--plain-theme,
.satus-label--black-theme {
display: flex;
width: auto;
height: 80px;
margin: 8px;
cursor: pointer;
Expand All @@ -543,7 +543,6 @@ overflow: hidden;
text-shadow: 0 1px 3px rgba(0, 0, 0, .7);
justify-content: space-between;
align-items: center;
width: auto;
}

.satus-label--default-theme {
Expand Down
2 changes: 1 addition & 1 deletion satus.js

Large diffs are not rendered by default.

44 changes: 6 additions & 38 deletions youtube-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -3189,48 +3189,16 @@ ImprovedTube.shortcuts = function() {

for (var name in this.storage) {
if (name.indexOf('shortcut_') === 0) {
if (this.isset(this.storage[name])) {
if (this.isset(this.storage[name]) && this.storage[name] !== false) {
try {
var key = 'shortcut' + (name.replace(/_?shortcut_?/g, '').replace(/\_/g, '-')).split('-').map(function (element, index) {
return element[0].toUpperCase() + element.slice(1);
}).join(''),
old_value = JSON.parse(this.storage[name]),
new_value = {
keys: {}
};

if (old_value.altKey) {
new_value.alt = true;
} else {
new_value.alt = false;
}

if (old_value.ctrlKey) {
new_value.ctrl = true;
} else {
new_value.ctrl = false;
}

if (old_value.shiftKey) {
new_value.shift = true;
} else {
new_value.shift = false;
}
}).join('');

if (old_value.key && ['Alt', 'Control', 'Shift'].indexOf(old_value.key) === -1) {
new_value.keys[old_value.keyCode] = true;
}

if (old_value.wheel > 0) {
new_value.wheel = 1;
} else if (old_value.wheel < 0) {
new_value.wheel = -1;
} else {
new_value.wheel = 0;
}

storage[key] = new_value;
} catch (err) {}
storage[key] = this.storage[name];
} catch (error) {
console.error(error);
}
}
}
}
Expand Down

0 comments on commit ad93a00

Please sign in to comment.