mirror of
https://github.com/obsqrbtz/goose-highlighter.git
synced 2026-04-08 20:19:06 +03:00
316 lines
13 KiB
HTML
316 lines
13 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title data-i18n="extension_name">Goose Highlighter</title>
|
|
<link rel="stylesheet" href="popup.css" />
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css" />
|
|
</head>
|
|
|
|
<body>
|
|
<div class="loading-overlay">
|
|
<div class="loading-spinner"></div>
|
|
</div>
|
|
<div class="popup-container">
|
|
|
|
<!-- Header -->
|
|
<div class="header">
|
|
<div class="header-content">
|
|
<div class="header-logo">
|
|
<img src="../img/logo-outlined.png" alt="Goose" style="width: 18px; height: 18px;">
|
|
</div>
|
|
<span class="header-title" data-i18n="extension_name">Goose Highlighter</span>
|
|
</div>
|
|
<div class="header-actions">
|
|
<button class="icon-button header-settings-btn" id="settingsBtn" data-i18n-title="options" title="Options" aria-label="Settings">
|
|
<i class="fa-solid fa-gear"></i>
|
|
</button>
|
|
<label class="header-power-toggle" title="Toggle highlighting" aria-label="Toggle highlighting">
|
|
<input type="checkbox" id="globalHighlightToggle" class="header-power-input" />
|
|
<span class="power-icon-wrapper">
|
|
<i class="fa-solid fa-power-off"></i>
|
|
</span>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Tabs -->
|
|
<div class="tabs">
|
|
<button class="tab-button active" data-tab="lists">
|
|
<i class="fa-solid fa-list"></i>
|
|
<span data-i18n="tab_lists">Lists</span>
|
|
</button>
|
|
<button class="tab-button" data-tab="words">
|
|
<i class="fa-solid fa-tags"></i>
|
|
<span data-i18n="tab_words">Words</span>
|
|
</button>
|
|
<button class="tab-button" data-tab="page-highlights">
|
|
<i class="fa-solid fa-location-dot"></i>
|
|
<span data-i18n="tab_page_highlights">On Page</span>
|
|
</button>
|
|
<button class="tab-button" data-tab="exceptions">
|
|
<i class="fa-solid fa-ban"></i>
|
|
<span data-i18n="tab_exceptions">Exceptions</span>
|
|
</button>
|
|
</div>
|
|
|
|
<!-- Lists Tab -->
|
|
<div class="tab-content active" data-tab-content="lists">
|
|
<div class="tab-inner">
|
|
<div class="list-selector-section">
|
|
<!-- List Selector with Actions -->
|
|
<div class="list-selector-row">
|
|
<div class="list-dropdown-wrapper">
|
|
<button class="list-dropdown-button" id="listDropdownBtn">
|
|
<div class="list-dropdown-content">
|
|
<div class="list-color-indicator" id="currentListColor"></div>
|
|
<span class="list-dropdown-text" id="currentListName">Default List</span>
|
|
</div>
|
|
<i class="fa-solid fa-chevron-down"></i>
|
|
</button>
|
|
<div class="list-dropdown-menu" id="listDropdownMenu">
|
|
<!-- Populated dynamically -->
|
|
</div>
|
|
</div>
|
|
<button class="icon-button" id="renameListBtn" data-i18n-title="rename_list_title" title="Rename list">
|
|
<i class="fa-solid fa-pen"></i>
|
|
</button>
|
|
<button class="icon-button" id="newListBtn" data-i18n-title="new_list_title" title="New list">
|
|
<i class="fa-solid fa-plus"></i>
|
|
</button>
|
|
<button class="icon-button danger" id="deleteListBtn" data-i18n-title="delete_list_title" title="Delete list">
|
|
<i class="fa-solid fa-trash"></i>
|
|
</button>
|
|
</div>
|
|
|
|
<!-- Manage Lists Button -->
|
|
<button class="manage-lists-btn" id="manageListsBtn">
|
|
<i class="fa-solid fa-layer-group"></i>
|
|
<span data-i18n="manage_lists">Manage Lists</span>
|
|
</button>
|
|
|
|
<!-- Color Pickers -->
|
|
<div class="color-pickers-row">
|
|
<div class="color-picker-group">
|
|
<label class="color-picker-label" data-i18n="background_label">Background</label>
|
|
<div class="color-picker-input-group">
|
|
<input type="color" id="listBg" class="color-picker-swatch" />
|
|
<input type="text" id="listBgText" class="color-picker-text" maxlength="7" />
|
|
</div>
|
|
</div>
|
|
<div class="color-picker-group">
|
|
<label class="color-picker-label" data-i18n="foreground_label">Foreground</label>
|
|
<div class="color-picker-input-group">
|
|
<input type="color" id="listFg" class="color-picker-swatch" />
|
|
<input type="text" id="listFgText" class="color-picker-text" maxlength="7" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Preview -->
|
|
<div class="preview-section">
|
|
<label class="preview-label" data-i18n="preview_label">Preview</label>
|
|
<div class="preview-box">
|
|
<p class="preview-text">
|
|
<span data-i18n="preview_text_before">This is how your</span>
|
|
<span class="preview-highlight" id="previewHighlight" data-i18n="preview_text_highlight">highlighted text</span>
|
|
<span data-i18n="preview_text_after">will appear.</span>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Enable Toggle -->
|
|
<div class="enable-toggle-section">
|
|
<div class="enable-toggle-content">
|
|
<div class="enable-toggle-text">
|
|
<p class="enable-toggle-title" data-i18n="enable_highlighting_title">Enable Highlighting</p>
|
|
<p class="enable-toggle-subtitle" data-i18n="enable_highlighting_subtitle">Show highlights on pages</p>
|
|
</div>
|
|
<label class="switch-wrapper">
|
|
<input type="checkbox" id="listActive" class="switch-input" />
|
|
<span class="switch-slider"></span>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Apply Button -->
|
|
<button class="apply-button" id="applyListSettingsBtn">
|
|
<i class="fa-solid fa-check"></i>
|
|
<span data-i18n="apply">Apply Changes</span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Words Tab -->
|
|
<div class="tab-content" data-tab-content="words">
|
|
<div class="tab-inner">
|
|
<!-- Add Words Section -->
|
|
<div class="add-words-section">
|
|
<label class="section-label">
|
|
<i class="fa-solid fa-pen"></i>
|
|
<span data-i18n="add_words">Add Words</span>
|
|
</label>
|
|
<textarea id="bulkPaste" class="add-words-textarea" data-i18n="paste_hint" placeholder="Paste words or phrases here. Each new word/phrase should start from next line."></textarea>
|
|
<button class="add-words-button" id="addWordsBtn">
|
|
<span data-i18n="apply_paste">Add Words</span>
|
|
</button>
|
|
</div>
|
|
|
|
<!-- Word List Section -->
|
|
<div class="word-list-section">
|
|
<div class="word-list-header">
|
|
<label class="section-label">
|
|
<i class="fa-solid fa-tags"></i>
|
|
<span data-i18n="word_list">Word List</span>
|
|
<span class="word-count-badge" id="wordCount">0</span>
|
|
</label>
|
|
</div>
|
|
|
|
<!-- Action Buttons -->
|
|
<div class="word-actions-row">
|
|
<button class="word-action-btn" id="selectAllBtn">
|
|
<span data-i18n="select_all">Select</span>
|
|
</button>
|
|
<button class="word-action-btn" id="deselectAllBtn">
|
|
<span data-i18n="deselect_all">Deselect</span>
|
|
</button>
|
|
<button class="word-action-btn" id="enableSelectedBtn">
|
|
<span data-i18n="enable_selected">Enable</span>
|
|
</button>
|
|
<button class="word-action-btn" id="disableSelectedBtn">
|
|
<span data-i18n="disable_selected">Disable</span>
|
|
</button>
|
|
<button class="word-action-btn danger" id="deleteSelectedBtn">
|
|
<span data-i18n="delete_selected">Delete</span>
|
|
</button>
|
|
</div>
|
|
|
|
<!-- Search -->
|
|
<div class="word-search-wrapper">
|
|
<input type="text" id="wordSearch" class="word-search-input" data-i18n="search_placeholder" placeholder="Search..." />
|
|
</div>
|
|
|
|
<!-- Word List -->
|
|
<div id="wordList" class="word-list-container"></div>
|
|
|
|
<!-- Help text -->
|
|
<p class="word-list-hint" data-i18n="multi_select_hint">Click to select • Ctrl/Cmd+Click for multi-select</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Page Highlights Tab -->
|
|
<div class="tab-content" data-tab-content="page-highlights">
|
|
<div class="tab-inner">
|
|
<div class="page-highlights-section">
|
|
<div class="page-highlights-info-card">
|
|
<span data-i18n="total_highlights">Total:</span>
|
|
<strong id="totalHighlightsCount">0</strong>
|
|
</div>
|
|
|
|
<button class="refresh-button" id="refreshHighlightsBtn">
|
|
<i class="fa-solid fa-rotate"></i>
|
|
<span data-i18n="refresh">Refresh</span>
|
|
</button>
|
|
|
|
<div id="pageHighlightsList" class="page-highlights-list"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Exceptions Tab -->
|
|
<div class="tab-content" data-tab-content="exceptions">
|
|
<div class="tab-inner">
|
|
<div class="exceptions-section">
|
|
<label class="section-label">
|
|
<i class="fa-solid fa-ban"></i>
|
|
<span data-i18n="site_exceptions">Site Exceptions</span>
|
|
</label>
|
|
|
|
<button class="exception-toggle-btn" id="toggleExceptionBtn">
|
|
<i class="fa-solid fa-plus"></i>
|
|
<span id="exceptionBtnText" data-i18n="add_exception">Add to Exceptions</span>
|
|
</button>
|
|
|
|
<div class="exceptions-list-wrapper">
|
|
<label class="section-label">
|
|
<span data-i18n="exceptions_list">Exception Sites:</span>
|
|
</label>
|
|
<div id="exceptionsList" class="exceptions-list"></div>
|
|
</div>
|
|
|
|
<button class="clear-exceptions-btn" id="clearExceptionsBtn">
|
|
<i class="fa-solid fa-trash"></i>
|
|
<span data-i18n="clear_all">Clear All</span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Settings Overlay -->
|
|
<div class="settings-overlay" id="settingsOverlay">
|
|
<div class="settings-overlay-content">
|
|
<div class="settings-overlay-header">
|
|
<h3 class="settings-overlay-title" data-i18n="options">Options</h3>
|
|
<button class="icon-button settings-close-btn" id="settingsCloseBtn" aria-label="Close">
|
|
<i class="fa-solid fa-xmark"></i>
|
|
</button>
|
|
</div>
|
|
<div class="settings-overlay-body">
|
|
<div class="options-checkboxes">
|
|
<label class="option-checkbox-label">
|
|
<input type="checkbox" id="matchCase" class="option-checkbox" />
|
|
<span data-i18n="match_case">Match Case</span>
|
|
</label>
|
|
<label class="option-checkbox-label">
|
|
<input type="checkbox" id="matchWhole" class="option-checkbox" />
|
|
<span data-i18n="match_whole">Match Whole Word</span>
|
|
</label>
|
|
</div>
|
|
|
|
<div class="theme-toggle-section">
|
|
<div class="theme-toggle-content">
|
|
<div class="theme-toggle-text">
|
|
<p class="theme-toggle-title" data-i18n="dark_mode_title">Dark Mode</p>
|
|
<p class="theme-toggle-subtitle" data-i18n="dark_mode_subtitle">Toggle dark/light theme</p>
|
|
</div>
|
|
<label class="switch-wrapper">
|
|
<input type="checkbox" id="themeToggle" class="switch-input" />
|
|
<span class="switch-slider"></span>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="options-buttons">
|
|
<button class="option-button" id="importBtn">
|
|
<i class="fa-solid fa-upload"></i>
|
|
<span data-i18n="import_list">Import</span>
|
|
</button>
|
|
<input type="file" id="importInput" accept="application/json" hidden />
|
|
<button class="option-button" id="exportBtn">
|
|
<i class="fa-solid fa-download"></i>
|
|
<span data-i18n="export_list">Export</span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Footer -->
|
|
<div class="footer">
|
|
<span class="footer-version">v<span id="version-number">...</span></span>
|
|
<a href="https://github.com/obsqrbtz/goose-highlighter" target="_blank" class="footer-link">
|
|
<i class="fa-brands fa-github"></i>
|
|
<span>GitHub</span>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
|
|
<script type="module" src="../dist/popup/popup.js"></script>
|
|
</body>
|
|
|
|
</html>
|