support all languages && improved code readability and maintainability

This commit is contained in:
qcrao
2024-05-15 12:03:10 +08:00
parent 0267d05e83
commit 6fc1a93ac2
6 changed files with 87 additions and 101 deletions

View File

@@ -3,23 +3,22 @@ if (typeof window.globalsLoaded === 'undefined') {
window.globalsLoaded = true;
let lastChecked = null;
const lastChecked = null;
let Selectors = {
// Plus 用户的选择器
const Selectors = {
conversationsCheckbox: '.conversation-checkbox:checked',
confirmDeleteButton: 'button.btn.btn-danger',
threeDotButton: '[id^="radix-"]',
// 其他 Plus 用户选择器...
CONVERSATION_SELECTOR: 'div > div > div > div > div > div > nav > div > div > div > div > ol > li > div > a',
TITLE_SELECTOR: '.relative.grow.overflow-hidden.whitespace-nowrap',
};
let CHECKBOX_CLASS = 'conversation-checkbox';
const CHECKBOX_CLASS = 'conversation-checkbox';
// Expose variables to the global scope
window.lastChecked = lastChecked;
window.Selectors = Selectors;
window.CHECKBOX_CLASS = CHECKBOX_CLASS;
} else {
console.log('globals.js already loaded, skipping re-initialization');
}
}