mirror of
https://github.com/obsqrbtz/goose-highlighter.git
synced 2026-04-08 20:19:06 +03:00
298 lines
11 KiB
HTML
298 lines
11 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: 20px; height: 20px;">
|
|
</div>
|
|
<span class="header-title" data-i18n="extension_name">Goose Highlighter</span>
|
|
</div>
|
|
<label class="switch-wrapper">
|
|
<input type="checkbox" id="globalHighlightToggle" class="switch-input" />
|
|
<span class="switch-slider"></span>
|
|
</label>
|
|
</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>
|
|
<button class="tab-button" data-tab="options">
|
|
<i class="fa-solid fa-sliders"></i>
|
|
<span data-i18n="options">Options</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" title="Rename List">
|
|
<i class="fa-solid fa-pen"></i>
|
|
</button>
|
|
<button class="icon-button" id="newListBtn" title="New List">
|
|
<i class="fa-solid fa-plus"></i>
|
|
</button>
|
|
<button class="icon-button danger" id="deleteListBtn" 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>Manage Lists</span>
|
|
</button>
|
|
|
|
<!-- Color Pickers -->
|
|
<div class="color-pickers-row">
|
|
<div class="color-picker-group">
|
|
<label class="color-picker-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">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">Preview</label>
|
|
<div class="preview-box">
|
|
<p class="preview-text">
|
|
This is how your <span class="preview-highlight" id="previewHighlight">highlighted text</span> will appear.
|
|
</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">Enable Highlighting</p>
|
|
<p class="enable-toggle-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">
|
|
<i class="fa-solid fa-search word-search-icon"></i>
|
|
<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">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>
|
|
|
|
<!-- Options Tab -->
|
|
<div class="tab-content" data-tab-content="options">
|
|
<div class="tab-inner">
|
|
<div class="options-section">
|
|
<label class="section-label">
|
|
<i class="fa-solid fa-sliders"></i>
|
|
<span data-i18n="options">Options</span>
|
|
</label>
|
|
|
|
<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="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>
|