Merge pull request #75 from SethBurkart123/main

merge from main to typescript-conversion
This commit is contained in:
Seth Burkart
2023-12-06 06:21:41 +11:00
committed by GitHub
3 changed files with 15 additions and 23 deletions
@@ -23,7 +23,6 @@ const ThemeSelector = ({ selectedType, setSelectedType, isEditMode }: ThemeSelec
useEffect(() => {
const initializeThemes = async () => {
const downloaded = (await listThemes());
const initializedThemes = themesList.map(theme => ({
...theme,
isDownloaded: downloaded.themes.includes(theme.name),
+11 -11
View File
@@ -438,11 +438,13 @@ function CheckiFrameItems() {
'iframe.css',
)
) {
innerHTMLNode.appendChild(
innerHTMLNode.append(
fileref,
);
}
added_node.addEventListener('load', function () {
node.addEventListener('load', function () {
const childNode = node.contentDocument!.documentElement.childNodes[1] as HTMLElement
const innerHTMLNode = node.contentDocument!.documentElement.firstChild! as HTMLElement
if (
childNode.style
.color != 'white'
@@ -455,7 +457,7 @@ function CheckiFrameItems() {
'iframe.css',
)
) {
innerHTMLNode.appendChild(
innerHTMLNode.append(
fileref,
);
}
@@ -638,12 +640,15 @@ function CheckNoticeTextColour(notice: any) {
DarkMode = result.DarkMode;
if (node.classList.contains('notice')) {
var hex = node.style.cssText.split(' ')[1];
var threshold = GetThresholdOfColor(hex);
if (hex) {
const hex1 = hex.slice(0,-1)
var threshold = GetThresholdOfColor(hex1);
if (DarkMode && threshold < 100) {
node.style.cssText = '--color: undefined;';
}
}
}
}
result.then(open, onError)
});
});
@@ -683,7 +688,7 @@ export function tryLoad() {
true,
);
const observer = new MutationObserver(() => { documentTextColor() })
observer.observe(document.getElementById('toolbar')!, { attributes: true, childList: true, subtree: true })
observer.observe(document!, { attributes: true, childList: true, subtree: true, attributeFilter: ['td'], })
}
function ChangeMenuItemPositions(storage: any) {
@@ -773,16 +778,11 @@ function main(storedSetting: any) {
if (onoff) {
console.log('[BetterSEQTA+] Enabled');
initialize();
if (!isChrome || isChrome === 'undefined') {
tryLoad();
}
window.addEventListener('load', tryLoad);
} else {
if (!isChrome || isChrome === 'undefined') {
handleDisabled();
}
handleDisabled()
window.addEventListener('load', handleDisabled);
}
}
+3 -10
View File
@@ -59,7 +59,6 @@ html {
border-radius: 10px !important;
cursor: pointer;
background: var(--text-primary) !important;
border-radius: 10px;
color: var(--theme-primary) !important;
height: 35px;
justify-content: center;
@@ -132,7 +131,7 @@ html {
min-height: unset !important;
.title {
padding: 1rem 1rem !important;
padding: 1rem !important;
}
}
}
@@ -761,7 +760,6 @@ div > ol:has(.uiFileHandlerWrapper) {
}
.home-container h1 {
text-align: center;
font-weight: 400;
font-size: 3em !important;
font-weight: 300;
margin: 0 auto;
@@ -955,12 +953,11 @@ div > ol:has(.uiFileHandlerWrapper) {
font-weight: 200;
}
.notice h6 {
margin: 0px 0px 40px 0px;
margin: 0px 0px 40px;
font-weight: 100;
color: #c9c9c9;
}
.day {
box-shadow: inset 0px 0px 10px 0.1px var(--better-sub);
width: 100%;
display: flex;
flex-direction: column;
@@ -1051,7 +1048,7 @@ div > ol:has(.uiFileHandlerWrapper) {
width: 20px;
padding: 10px;
text-align: center;
margin: 20px auto 0px auto;
margin: 20px auto 0px;
cursor: pointer;
}
@@ -2126,7 +2123,6 @@ li.MessageList__unread___3imtO {
overflow-y: hidden;
}
.upcoming-checkbox-container {
display: block;
position: relative;
padding: none !important;
padding-left: 25px !important;
@@ -2213,7 +2209,6 @@ li.MessageList__unread___3imtO {
cursor: pointer;
}
.day {
box-shadow: inset 0px 0px 10px 0.1px var(--better-sub);
width: 100%;
display: flex;
flex-direction: column;
@@ -2287,7 +2282,6 @@ li.MessageList__unread___3imtO {
}
.upcoming-items {
background: var(--background-primary);
transition: 200ms;
width: 100%;
max-height: 55em;
overflow-y: auto;
@@ -2375,7 +2369,6 @@ li.MessageList__unread___3imtO {
overflow-y: hidden;
}
.upcoming-checkbox-container {
display: block;
position: relative;
padding: none !important;
padding-left: 25px !important;