fix overscrolling issue with popup

This commit is contained in:
SethBurkart123
2023-10-20 06:58:20 +11:00
parent 1edcf442e6
commit 7525a9041e
4 changed files with 34 additions and 29 deletions
+28 -27
View File
@@ -637,35 +637,11 @@ function main(storedSetting) {
}
if (storedSetting.onoff) {
console.log("[BetterSEQTA+] Enabled");
// Injecting CSS File to the webpage to overwrite SEQTA's default CSS
var cssFile = chrome.runtime.getURL("inject/injected.css");
var fileref = document.createElement("link");
fileref.setAttribute("rel", "stylesheet");
fileref.setAttribute("type", "text/css");
fileref.setAttribute("href", cssFile);
document.head.appendChild(fileref);
document.getElementsByTagName("html")[0].appendChild(fileref);
// Injecting custom icons font file
const fontURL = chrome.runtime.getURL("fonts/IconFamily.woff");
const style = document.createElement("style");
style.setAttribute("type", "text/css");
style.innerHTML = `
@font-face {
font-family: 'IconFamily';
src: url('${fontURL}') format('woff');
font-weight: normal;
font-style: normal;
}`;
document.head.appendChild(style);
InjectStyles();
InjectCustomIcons();
updateAllColors(storedSetting);
ApplyCSSToHiddenMenuItems();
loading();
CheckLoadOnPeriods();
if (!isChrome || isChrome == "undefined") {
@@ -689,6 +665,31 @@ function main(storedSetting) {
}
}
function InjectStyles() {
var cssFile = chrome.runtime.getURL("inject/injected.css");
var fileref = document.createElement("link");
fileref.setAttribute("rel", "stylesheet");
fileref.setAttribute("type", "text/css");
fileref.setAttribute("href", cssFile);
document.head.appendChild(fileref);
document.getElementsByTagName("html")[0].appendChild(fileref);
}
function InjectCustomIcons() {
const fontURL = chrome.runtime.getURL("fonts/IconFamily.woff");
const style = document.createElement("style");
style.setAttribute("type", "text/css");
style.innerHTML = `
@font-face {
font-family: 'IconFamily';
src: url('${fontURL}') format('woff');
font-weight: normal;
font-style: normal;
}`;
document.head.appendChild(style);
}
export function AppendElementsToDisabledPage() {
AddBetterSEQTAElements(false);
@@ -790,7 +791,7 @@ function addExtensionSettings() {
iframe.src = chrome.runtime.getURL("interface/index.html");
iframe.allowTransparency = "true";
iframe.style.width = "384px";
iframe.style.height = "610px";
iframe.style.height = "600px";
iframe.style.border = "none";
iframe.setAttribute("excludeDarkCheck", "true");