Sy removed

This commit is contained in:
Zan
2026-01-15 17:23:09 +01:00
parent 4aab9afebd
commit 15ab433064
7 changed files with 2 additions and 167 deletions

View File

@@ -40,9 +40,7 @@
"grades/chart.js",
"i18n/*.json",
"tools/storageManager.js",
"tools/storageTest.js",
"tools/sentry.js",
"tools/sentry-browser.min.js"
"tools/storageTest.js"
],
"matches": [
"<all_urls>"
@@ -67,8 +65,6 @@
"https://eugyintezes.e-kreta.hu/*"
],
"js": [
"tools/sentry-browser.min.js",
"tools/sentry.js",
"global/language.js",
"global/theme.js",
"tools/loadingScreen.js",

View File

@@ -40,9 +40,7 @@
"grades/chart.js",
"i18n/*.json",
"tools/storageManager.js",
"tools/storageTest.js",
"tools/sentry.js",
"tools/sentry-browser.min.js"
"tools/storageTest.js"
],
"matches": [
"<all_urls>"
@@ -67,8 +65,6 @@
"https://eugyintezes.e-kreta.hu/*"
],
"js": [
"tools/sentry-browser.min.js",
"tools/sentry.js",
"global/language.js",
"global/theme.js",
"tools/loadingScreen.js",

View File

@@ -337,8 +337,6 @@
</div>
</div>
<script src="../tools/sentry-browser.min.js"></script>
<script src="../tools/sentry.js"></script>
<script src="../tools/helper.js"></script>
<script src="../tools/storageManager.js"></script>
<script src="../global/language.js"></script>

View File

@@ -152,8 +152,6 @@
</div>
</div>
<script src="../tools/sentry-browser.min.js"></script>
<script src="../tools/sentry.js"></script>
<script src="../tools/storageManager.js"></script>
<script src="../global/language.js"></script>
<script src="setup.js"></script>

View File

@@ -1,24 +1,3 @@
const SENTRY_DSN = 'https://c7d88b71f550a276f973885a44b6536d@o4510511576055808.ingest.de.sentry.io/4510511935193168';
async function initSentry() {
try {
const result = await chrome.storage.sync.get('firka_errorReporting');
const enabled = result.firka_errorReporting !== false;
if (enabled) {
self.addEventListener('error', (event) => {
console.error('[Background Error]', event.error || event);
});
self.addEventListener('unhandledrejection', (event) => {
console.error('[Background Unhandled Rejection]', event.reason);
});
}
} catch (error) {
console.error('[Sentry] Nem sikerült inicializálni:', error);
}
}
chrome.runtime.onInstalled.addListener(async (details) => {
if (details.reason === 'install') {
const setupCompleted = await chrome.storage.sync.get('firka_setupCompleted');
@@ -29,8 +8,6 @@ chrome.runtime.onInstalled.addListener(async (details) => {
});
}
}
await initSentry();
});
chrome.runtime.onMessage.addListener((request, sender, sendResponse) => {

File diff suppressed because one or more lines are too long

View File

@@ -1,127 +0,0 @@
(function() {
'use strict';
const SENTRY_DSN = 'https://c7d88b71f550a276f973885a44b6536d@o4510511576055808.ingest.de.sentry.io/4510511935193168';
let sentryInitialized = false;
async function isErrorReportingEnabled() {
try {
const result = await chrome.storage.sync.get('firka_errorReporting');
return result.firka_errorReporting !== false;
} catch (error) {
return true;
}
}
async function initSentry() {
if (sentryInitialized) {
return;
}
const enabled = await isErrorReportingEnabled();
if (!enabled) {
return;
}
setTimeout(() => {
configureSentry();
}, 100);
}
function configureSentry() {
try {
const SentrySDK = window.Sentry || (typeof Sentry !== 'undefined' ? Sentry : null);
if (!SentrySDK) {
setTimeout(configureSentry, 500);
return;
}
if (!SentrySDK.init) {
return;
}
const manifest = chrome.runtime.getManifest();
SentrySDK.init({
dsn: SENTRY_DSN,
release: `firka-extension@${manifest.version}`,
environment: 'production',
integrations: [],
beforeSend(event, hint) {
if (event.request) {
delete event.request.cookies;
delete event.request.headers;
}
return event;
},
});
sentryInitialized = true;
} catch (error) {
}
}
window.addEventListener('error', function(event) {
if (sentryInitialized) {
const SentrySDK = window.Sentry || (typeof Sentry !== 'undefined' ? Sentry : null);
if (SentrySDK && SentrySDK.captureException) {
SentrySDK.captureException(event.error || new Error(event.message));
} else {
console.warn('[Sentry] SDK not available for capturing');
}
} else {
console.warn('[Sentry] Not initialized yet, cannot capture error');
}
}, true);
window.addEventListener('unhandledrejection', function(event) {
if (sentryInitialized) {
const SentrySDK = window.Sentry || (typeof Sentry !== 'undefined' ? Sentry : null);
if (SentrySDK && SentrySDK.captureException) {
SentrySDK.captureException(event.reason);
}
}
}, true);
if (typeof chrome !== 'undefined' && chrome.storage) {
chrome.storage.onChanged.addListener(function(changes, namespace) {
if (namespace === 'sync' && changes.firka_errorReporting) {
const newValue = changes.firka_errorReporting.newValue;
if (newValue === false && sentryInitialized) {
if (typeof Sentry !== 'undefined' && Sentry.close) {
Sentry.close();
sentryInitialized = false;
}
} else if (newValue !== false && !sentryInitialized) {
initSentry();
}
}
});
}
window.FirkaSentry = {
init: initSentry,
isEnabled: isErrorReportingEnabled,
captureException: function(error) {
if (sentryInitialized) {
const SentrySDK = window.Sentry || (typeof Sentry !== 'undefined' ? Sentry : null);
if (SentrySDK && SentrySDK.captureException) {
SentrySDK.captureException(error);
}
}
},
captureMessage: function(message, level = 'info') {
if (sentryInitialized) {
const SentrySDK = window.Sentry || (typeof Sentry !== 'undefined' ? Sentry : null);
if (SentrySDK && SentrySDK.captureMessage) {
SentrySDK.captureMessage(message, level);
}
}
}
};
initSentry();
})();