mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-06-06 03:34:40 +00:00
refactor: remove extra non-essential logging
This commit is contained in:
+1
-4
@@ -98,7 +98,6 @@ export function enableAnimatedBackground() {
|
||||
async function HideMenuItems(): Promise<void> {
|
||||
try {
|
||||
let stylesheetInnerText: string = ''
|
||||
console.log('ASssessments: ', settingsState.menuitems)
|
||||
for (const [menuItem, { toggle }] of Object.entries(settingsState.menuitems)) {
|
||||
if (!toggle) {
|
||||
stylesheetInnerText += SetDisplayNone(menuItem)
|
||||
@@ -1007,7 +1006,7 @@ export function OpenMenuOptions() {
|
||||
},
|
||||
});
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
console.error(err)
|
||||
}
|
||||
|
||||
function changeDisplayProperty(element: any) {
|
||||
@@ -1048,7 +1047,6 @@ export function OpenMenuOptions() {
|
||||
}
|
||||
|
||||
function closeAll() {
|
||||
console.log("Closing!")
|
||||
menusettings?.remove()
|
||||
cover?.remove()
|
||||
MenuOptionsOpen = false
|
||||
@@ -2357,7 +2355,6 @@ export function SendNewsPage() {
|
||||
AppendLoadingSymbol('newsloading', '#news-container')
|
||||
|
||||
browser.runtime.sendMessage({ type: 'sendNews' }).then(function (response) {
|
||||
console.log(response)
|
||||
let newsarticles = response.news.articles
|
||||
var newscontainer = document.querySelector('#news-container')
|
||||
document.getElementById('newsloading')!.remove()
|
||||
|
||||
+3
-5
@@ -1,5 +1,4 @@
|
||||
import browser from 'webextension-polyfill'
|
||||
import { onError } from './seqta/utils/onError';
|
||||
import { SettingsState } from "./types/storage";
|
||||
import { applyYoutubeStyles } from './seqta/ui/VideoLoader';
|
||||
|
||||
@@ -68,7 +67,7 @@ function reloadSeqtaPages() {
|
||||
}
|
||||
}
|
||||
}
|
||||
result.then(open, onError)
|
||||
result.then(open, console.error)
|
||||
}
|
||||
|
||||
// Main message listener
|
||||
@@ -105,7 +104,6 @@ browser.runtime.onMessage.addListener((request: any, _sender: any, sendResponse:
|
||||
break;
|
||||
|
||||
case 'sendNews':
|
||||
console.log("Sending news")
|
||||
const date = new Date();
|
||||
|
||||
const from =
|
||||
@@ -275,7 +273,7 @@ function UpdateCurrentValues() {
|
||||
|
||||
SetStorageValue(NewValue);
|
||||
}
|
||||
result.then(open, onError)
|
||||
result.then(open, console.error)
|
||||
}
|
||||
|
||||
function migrateOldStorage() {
|
||||
@@ -310,7 +308,7 @@ function migrateOldStorage() {
|
||||
setting.then(() => console.log('Migration Completed.'))
|
||||
}
|
||||
}
|
||||
result.then(open, onError)
|
||||
result.then(open, console.error)
|
||||
}
|
||||
|
||||
browser.runtime.onInstalled.addListener(function (event) {
|
||||
|
||||
@@ -6,7 +6,6 @@ import { settingsState } from "../utils/listeners/SettingsState";
|
||||
import { updateAllColors } from "./colors/Manager";
|
||||
|
||||
export async function AddBetterSEQTAElements() {
|
||||
console.log('AddBetterSEQTAElements');
|
||||
if (settingsState.onoff) {
|
||||
initializeSettings();
|
||||
if (settingsState.DarkMode) {
|
||||
|
||||
@@ -18,7 +18,6 @@ export function updateBgDurations() {
|
||||
maxBase = 150,
|
||||
) => {
|
||||
const scaledValue = 2 + ((maxBase - baseValue) / (maxBase - minBase)) ** 4;
|
||||
console.log(scaledValue);
|
||||
return scaledValue + offset;
|
||||
};
|
||||
|
||||
|
||||
@@ -108,10 +108,8 @@ const main = async (): Promise<void> => {
|
||||
}
|
||||
});
|
||||
} catch (error) {
|
||||
console.log('An error occurred:', error);
|
||||
console.error('An error occurred:', error);
|
||||
}
|
||||
};
|
||||
|
||||
main()
|
||||
// Run the main function when the document is ready
|
||||
//document.addEventListener('DOMContentLoaded', main);
|
||||
main()
|
||||
@@ -18,7 +18,6 @@ class StorageManager {
|
||||
if (prop in target) {
|
||||
return (target as any)[prop];
|
||||
}
|
||||
//console.log(this.data[prop], prop, this.data)
|
||||
return Reflect.get(target.data, prop);
|
||||
},
|
||||
set: (target, prop: keyof SettingsState, value) => {
|
||||
|
||||
@@ -67,7 +67,6 @@ export class StorageChangeHandler {
|
||||
}
|
||||
|
||||
private handleShortcutsChange(newValue: { enabled: boolean, name: string }[], oldValue: { enabled: boolean, name: string }[]) {
|
||||
console.log(oldValue, newValue);
|
||||
const addedShortcuts = newValue.filter((newItem: any) => {
|
||||
const isAdded = oldValue.some((oldItem: any) => {
|
||||
const match = oldItem.name === newItem.name;
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
export function onError (error: string) { console.log(`Error: ${error}`) }
|
||||
Reference in New Issue
Block a user