Suggestions or Bug Report
62 |63 | Please create an issue on the Github issue tracker for any suggestion or bug report. 64 | It will be resolved as fast as possible. 65 |
66 | 67 | Create an Issue 68 | 69 |├── .github ├── FUNDING.yml └── workflows │ └── npm-grunt.yml ├── interface ├── lib │ ├── isPopup.js │ ├── isDevtools.js │ ├── options │ │ ├── themes.js │ │ ├── exportFormats.js │ │ ├── extraInfos.js │ │ └── options.js │ ├── env.js │ ├── browsers.js │ ├── guid.js │ ├── eventEmitter.js │ ├── jsonFormat.js │ ├── ads │ │ ├── ad.js │ │ ├── adHandler.js │ │ └── activeAds.js │ ├── themeHandler.js │ ├── headerstringFormat.js │ ├── genericStorageHandler.js │ ├── netscapeFormat.js │ ├── browserDetector.js │ ├── permissionHandler.js │ └── genericCookieHandler.js ├── popup │ ├── pixel.png │ ├── dark.css │ └── cookieHandlerPopup.js ├── devtools │ ├── devtool.html │ ├── style.css │ ├── devtools.js │ ├── permissionHandler.js │ └── cookieHandlerDevtools.js ├── sidepanel │ └── style.css ├── popup-mobile │ └── dark.css ├── theme │ ├── switch.css │ ├── light.css │ └── dark.css └── options │ ├── style.css │ ├── options.js │ └── options.html ├── site ├── favicon.ico ├── robots.txt ├── img │ ├── cookie-add.png │ ├── cookie-edit.png │ ├── cookie-list.png │ ├── from-android.png │ ├── from-toolbar.png │ ├── cookie-delete.png │ ├── cookie-import.png │ ├── from-devtools.png │ ├── tab-for-cause.png │ ├── zoom.svg │ ├── edge-logo.svg │ ├── vivaldi-logo.svg │ ├── opera-logo.svg │ ├── github-logo.svg │ ├── cookie-filled.svg │ ├── digitalocean-vertical.svg │ └── chrome-logo.svg ├── sitemap.xml ├── 404.html └── privacy.html ├── readme ├── get-opera.png ├── get-chrome.png └── get-firefox.webp ├── .gitattributes ├── icons ├── cookie-128-filled.png ├── cookie-150-filled.png ├── cookie-16-filled.png ├── cookie-19-filled.png ├── cookie-32-filled.png ├── cookie-38-filled.png ├── cookie-38-legacy.png ├── cookie-44-filled.png ├── cookie-48-filled.png ├── cookie-50-filled.png ├── cookie-64-filled.png ├── cookie-small.svg ├── cookie-light-small.svg ├── cookie-filled-small.svg ├── cookie.svg ├── cookie-light.svg └── cookie-filled.svg ├── safari └── Cookie-Editor │ ├── Shared (App) │ ├── Assets.xcassets │ │ ├── Contents.json │ │ ├── AppIcon.appiconset │ │ │ ├── mac-icon-128@1x.png │ │ │ ├── mac-icon-128@2x.png │ │ │ ├── mac-icon-16@1x.png │ │ │ ├── mac-icon-16@2x.png │ │ │ ├── mac-icon-256@1x.png │ │ │ ├── mac-icon-256@2x.png │ │ │ ├── mac-icon-32@1x.png │ │ │ ├── mac-icon-32@2x.png │ │ │ ├── mac-icon-512@1x.png │ │ │ ├── mac-icon-512@2x.png │ │ │ ├── universal-icon-1024@1x.png │ │ │ └── Contents.json │ │ ├── LargeIcon.imageset │ │ │ ├── cookie-128-filled.png │ │ │ └── Contents.json │ │ └── AccentColor.colorset │ │ │ └── Contents.json │ ├── Resources │ │ ├── Icon.png │ │ ├── screenshot-ios.jpg │ │ ├── Style.css │ │ └── Script.js │ ├── Base.lproj │ │ └── Main.html │ └── ViewController.swift │ ├── Cookie-Editor.xcodeproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist │ ├── macOS (App) │ ├── Info.plist │ ├── AppDelegate.swift │ ├── Cookie-Editor.entitlements │ └── Base.lproj │ │ └── Main.storyboard │ ├── iOS (App) │ ├── SceneDelegate.swift │ ├── AppDelegate.swift │ ├── Info.plist │ └── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── macOS (Extension) │ ├── Cookie-Editor.entitlements │ └── Info.plist │ ├── iOS (Extension) │ └── Info.plist │ └── Shared (Extension) │ └── SafariWebExtensionHandler.swift ├── .prettierrc.json ├── .editorconfig ├── .gitignore ├── .prettierignore ├── .vscode └── settings.json ├── package.json ├── manifest.edge.json ├── manifest.safari.json ├── manifest.opera.json ├── manifest.chrome.json ├── eslint.config.mjs ├── manifest.firefox.json ├── README.md └── CODE_OF_CONDUCT.md /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: [moustachauve] 2 | -------------------------------------------------------------------------------- /interface/lib/isPopup.js: -------------------------------------------------------------------------------- 1 | window.isPopup = true; 2 | -------------------------------------------------------------------------------- /interface/lib/isDevtools.js: -------------------------------------------------------------------------------- 1 | window.isDevtools = true; 2 | -------------------------------------------------------------------------------- /site/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moustachauve/cookie-editor/HEAD/site/favicon.ico -------------------------------------------------------------------------------- /site/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | 4 | SITEMAP: https://cookie-editor.com/sitemap.xml -------------------------------------------------------------------------------- /readme/get-opera.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moustachauve/cookie-editor/HEAD/readme/get-opera.png -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text eol=lf 2 | 3 | *.ico binary 4 | *.jpg binary 5 | *.png binary 6 | *.webp binary -------------------------------------------------------------------------------- /readme/get-chrome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moustachauve/cookie-editor/HEAD/readme/get-chrome.png -------------------------------------------------------------------------------- /readme/get-firefox.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moustachauve/cookie-editor/HEAD/readme/get-firefox.webp -------------------------------------------------------------------------------- /site/img/cookie-add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moustachauve/cookie-editor/HEAD/site/img/cookie-add.png -------------------------------------------------------------------------------- /interface/popup/pixel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moustachauve/cookie-editor/HEAD/interface/popup/pixel.png -------------------------------------------------------------------------------- /site/img/cookie-edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moustachauve/cookie-editor/HEAD/site/img/cookie-edit.png -------------------------------------------------------------------------------- /site/img/cookie-list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moustachauve/cookie-editor/HEAD/site/img/cookie-list.png -------------------------------------------------------------------------------- /site/img/from-android.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moustachauve/cookie-editor/HEAD/site/img/from-android.png -------------------------------------------------------------------------------- /site/img/from-toolbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moustachauve/cookie-editor/HEAD/site/img/from-toolbar.png -------------------------------------------------------------------------------- /icons/cookie-128-filled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moustachauve/cookie-editor/HEAD/icons/cookie-128-filled.png -------------------------------------------------------------------------------- /icons/cookie-150-filled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moustachauve/cookie-editor/HEAD/icons/cookie-150-filled.png -------------------------------------------------------------------------------- /icons/cookie-16-filled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moustachauve/cookie-editor/HEAD/icons/cookie-16-filled.png -------------------------------------------------------------------------------- /icons/cookie-19-filled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moustachauve/cookie-editor/HEAD/icons/cookie-19-filled.png -------------------------------------------------------------------------------- /icons/cookie-32-filled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moustachauve/cookie-editor/HEAD/icons/cookie-32-filled.png -------------------------------------------------------------------------------- /icons/cookie-38-filled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moustachauve/cookie-editor/HEAD/icons/cookie-38-filled.png -------------------------------------------------------------------------------- /icons/cookie-38-legacy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moustachauve/cookie-editor/HEAD/icons/cookie-38-legacy.png -------------------------------------------------------------------------------- /icons/cookie-44-filled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moustachauve/cookie-editor/HEAD/icons/cookie-44-filled.png -------------------------------------------------------------------------------- /icons/cookie-48-filled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moustachauve/cookie-editor/HEAD/icons/cookie-48-filled.png -------------------------------------------------------------------------------- /icons/cookie-50-filled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moustachauve/cookie-editor/HEAD/icons/cookie-50-filled.png -------------------------------------------------------------------------------- /icons/cookie-64-filled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moustachauve/cookie-editor/HEAD/icons/cookie-64-filled.png -------------------------------------------------------------------------------- /site/img/cookie-delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moustachauve/cookie-editor/HEAD/site/img/cookie-delete.png -------------------------------------------------------------------------------- /site/img/cookie-import.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moustachauve/cookie-editor/HEAD/site/img/cookie-import.png -------------------------------------------------------------------------------- /site/img/from-devtools.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moustachauve/cookie-editor/HEAD/site/img/from-devtools.png -------------------------------------------------------------------------------- /site/img/tab-for-cause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moustachauve/cookie-editor/HEAD/site/img/tab-for-cause.png -------------------------------------------------------------------------------- /interface/lib/options/themes.js: -------------------------------------------------------------------------------- 1 | export const Themes = Object.freeze({ 2 | Auto: 'auto', 3 | Light: 'light', 4 | Dark: 'dark', 5 | }); 6 | -------------------------------------------------------------------------------- /safari/Cookie-Editor/Shared (App)/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /interface/lib/env.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains global environment variables. 3 | */ 4 | export class Env { 5 | static browserName = '@@browser_name'; 6 | } 7 | -------------------------------------------------------------------------------- /safari/Cookie-Editor/Shared (App)/Resources/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moustachauve/cookie-editor/HEAD/safari/Cookie-Editor/Shared (App)/Resources/Icon.png -------------------------------------------------------------------------------- /safari/Cookie-Editor/Shared (App)/Resources/screenshot-ios.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moustachauve/cookie-editor/HEAD/safari/Cookie-Editor/Shared (App)/Resources/screenshot-ios.jpg -------------------------------------------------------------------------------- /interface/devtools/devtool.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /interface/lib/options/exportFormats.js: -------------------------------------------------------------------------------- 1 | export const ExportFormats = Object.freeze({ 2 | HeaderString: 'headerstring', 3 | JSON: 'json', 4 | Netscape: 'netscape', 5 | Ask: 'ask', 6 | }); 7 | -------------------------------------------------------------------------------- /interface/lib/browsers.js: -------------------------------------------------------------------------------- 1 | export const Browsers = Object.freeze({ 2 | Any: 'any', 3 | Chrome: 'chrome', 4 | Edge: 'edge', 5 | Firefox: 'firefox', 6 | Opera: 'opera', 7 | Safari: 'safari', 8 | }); 9 | -------------------------------------------------------------------------------- /safari/Cookie-Editor/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-128@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moustachauve/cookie-editor/HEAD/safari/Cookie-Editor/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-128@1x.png -------------------------------------------------------------------------------- /safari/Cookie-Editor/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-128@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moustachauve/cookie-editor/HEAD/safari/Cookie-Editor/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-128@2x.png -------------------------------------------------------------------------------- /safari/Cookie-Editor/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-16@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moustachauve/cookie-editor/HEAD/safari/Cookie-Editor/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-16@1x.png -------------------------------------------------------------------------------- /safari/Cookie-Editor/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-16@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moustachauve/cookie-editor/HEAD/safari/Cookie-Editor/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-16@2x.png -------------------------------------------------------------------------------- /safari/Cookie-Editor/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-256@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moustachauve/cookie-editor/HEAD/safari/Cookie-Editor/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-256@1x.png -------------------------------------------------------------------------------- /safari/Cookie-Editor/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-256@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moustachauve/cookie-editor/HEAD/safari/Cookie-Editor/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-256@2x.png -------------------------------------------------------------------------------- /safari/Cookie-Editor/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-32@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moustachauve/cookie-editor/HEAD/safari/Cookie-Editor/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-32@1x.png -------------------------------------------------------------------------------- /safari/Cookie-Editor/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-32@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moustachauve/cookie-editor/HEAD/safari/Cookie-Editor/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-32@2x.png -------------------------------------------------------------------------------- /safari/Cookie-Editor/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-512@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moustachauve/cookie-editor/HEAD/safari/Cookie-Editor/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-512@1x.png -------------------------------------------------------------------------------- /safari/Cookie-Editor/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-512@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moustachauve/cookie-editor/HEAD/safari/Cookie-Editor/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-512@2x.png -------------------------------------------------------------------------------- /safari/Cookie-Editor/Shared (App)/Assets.xcassets/LargeIcon.imageset/cookie-128-filled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moustachauve/cookie-editor/HEAD/safari/Cookie-Editor/Shared (App)/Assets.xcassets/LargeIcon.imageset/cookie-128-filled.png -------------------------------------------------------------------------------- /safari/Cookie-Editor/Cookie-Editor.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 |You can turn on Cookie-Editor’s Safari extension in Settings.
15 |
16 | Here's how to access Cookie-Editor in Safari:
17 |
18 |
You can turn on Cookie-Editor’s extension in Safari Extensions preferences.
20 |Cookie-Editor’s extension is currently on. You can turn it off in Safari Extensions preferences.
21 |Cookie-Editor’s extension is currently off. You can turn it on in Safari Extensions preferences.
22 | 23 |24 | Due to some limitation on the Safari browser, not all cookies can be displayed. 25 | For example, Safari can't display cookies with "HTTPOnly" set to true. 26 |
27 | 28 | 29 | -------------------------------------------------------------------------------- /interface/devtools/devtools.js: -------------------------------------------------------------------------------- 1 | import { BrowserDetector } from '../lib/browserDetector.js'; 2 | import { GenericStorageHandler } from '../lib/genericStorageHandler.js'; 3 | import { OptionsHandler } from '../lib/optionsHandler.js'; 4 | 5 | (async function () { 6 | ('use strict'); 7 | const browserDetector = new BrowserDetector(); 8 | const storageHandler = new GenericStorageHandler(browserDetector); 9 | const optionHandler = new OptionsHandler(browserDetector, storageHandler); 10 | 11 | await optionHandler.loadOptions(); 12 | optionHandler.on('optionsChanged', onOptionsChanged); 13 | handleDevtools(); 14 | 15 | /** 16 | * Creates the devtools panel. 17 | */ 18 | function createDevtools() { 19 | browserDetector 20 | .getApi() 21 | .devtools.panels.create( 22 | 'Cookie-Editor', 23 | '/icons/cookie-filled-small.svg', 24 | '/interface/devtools/cookie-list.html', 25 | function (panel) {} 26 | ); 27 | } 28 | 29 | /** 30 | * Shows or hides the devtools depending on the options. 31 | */ 32 | function handleDevtools() { 33 | console.log('devtools enabled?', optionHandler.getDevtoolsEnabled()); 34 | if (optionHandler.getDevtoolsEnabled()) { 35 | createDevtools(); 36 | } 37 | } 38 | 39 | /** 40 | * Handles the changes required to the devtools when the options are changed 41 | * by an external source. 42 | * @param {Option} oldOptions the options before changes. 43 | */ 44 | function onOptionsChanged(oldOptions) { 45 | if (oldOptions.devtoolsEnabled != optionHandler.getDevtoolsEnabled()) { 46 | handleDevtools(); 47 | } 48 | } 49 | })(); 50 | -------------------------------------------------------------------------------- /interface/lib/themeHandler.js: -------------------------------------------------------------------------------- 1 | import { Themes } from './options/themes.js'; 2 | 3 | /** 4 | * Class used to handle the theme of a page. 5 | */ 6 | export class ThemeHandler { 7 | /** 8 | * Constructs the ThemeHandler. 9 | * @param {optionHandler} optionHandler 10 | */ 11 | constructor(optionHandler) { 12 | this.optionHandler = optionHandler; 13 | optionHandler.on('optionsChanged', this.onOptionsChanged); 14 | window 15 | .matchMedia('(prefers-color-scheme: dark)') 16 | .addEventListener('change', event => { 17 | console.log('theme changed!'); 18 | this.updateTheme(); 19 | }); 20 | } 21 | 22 | /** 23 | * Handles which theme the page will be rendered with. 24 | */ 25 | updateTheme() { 26 | const prefersDarkScheme = window.matchMedia('(prefers-color-scheme: dark)'); 27 | const selectedTheme = this.optionHandler.getTheme(); 28 | switch (selectedTheme) { 29 | case Themes.Light: 30 | case Themes.Dark: 31 | document.body.dataset.theme = selectedTheme; 32 | break; 33 | default: 34 | if (prefersDarkScheme.matches) { 35 | document.body.dataset.theme = 'dark'; 36 | } else { 37 | document.body.dataset.theme = 'light'; 38 | } 39 | break; 40 | } 41 | } 42 | 43 | /** 44 | * Handles the changes required to the interface when the options are changed 45 | * by an external source. 46 | * @param {Option} oldOptions the options before changes. 47 | */ 48 | onOptionsChanged = oldOptions => { 49 | if (oldOptions.theme != this.optionHandler.getTheme()) { 50 | this.updateTheme(); 51 | } 52 | }; 53 | } 54 | -------------------------------------------------------------------------------- /interface/theme/light.css: -------------------------------------------------------------------------------- 1 | :root { 2 | --primary-surface-color: #ffffff; 3 | --primary-border-color: #c5c5c5; 4 | --primary-outline-color: #444; 5 | --primary-text-color: #000000; 6 | --primary-link-color: #0d63d3; 7 | --primary-link-hover-color: #85b9fc; 8 | --primary-danger-color: #cf000f; 9 | --primary-safe-color: #1e824c; 10 | --secondary-danger-color: #970707; 11 | 12 | --secondary-surface-color: #eaeaea; 13 | --secondary-border-color: #aaaaaa; 14 | --secondary-text-color: #777777; 15 | --secondary-text-onsurface-color: var(--primary-text-color); 16 | 17 | --changed-surface-color: #fdfb8e; 18 | --success-surface-color: #9ee7a8; 19 | 20 | --ad-surface-color: #b1d7f7; 21 | --ad-text-color: #214357; 22 | --ad-link-color: #195179; 23 | 24 | --search-surface-color: #f5f5f5; 25 | --search-surface-hover-color: #ffffec; 26 | --search-surface-content-color: gold; 27 | 28 | --button-primary-surface-color: #1b98f1; 29 | --button-primary-text-color: #ffffff; 30 | --button-danger-surface-color: #f800002b; 31 | 32 | --notification-surface-color: rgba(0, 0, 0, 0.8); 33 | --notification-text-color: #fafafa; 34 | --notification-dismiss-color: #656565; 35 | --notification-dismiss-hover-parent-color: #aaa; 36 | --notification-dismiss-hover-color: var(--notification-text-color); 37 | 38 | --menu-surface-color: var(--primary-surface-color); 39 | --menu-surface-hover-color: var(--secondary-surface-color); 40 | --menu-border-color: var(--primary-border-color); 41 | 42 | --switch-surface-handle-color: var(--primary-surface-color); 43 | --switch-surface-on-color: #2196F3; 44 | --switch-surface-neutral-color: var(--primary-border-color); 45 | 46 | --notice-danger-surface-color: #f8000011; 47 | } -------------------------------------------------------------------------------- /interface/theme/dark.css: -------------------------------------------------------------------------------- 1 | [data-theme='dark'] { 2 | color-scheme: dark; 3 | 4 | --primary-surface-color: #2c2e31; 5 | --primary-border-color: #696969; 6 | --primary-outline-color: #4786ec; 7 | --primary-text-color: #fafafa; 8 | --primary-link-color: #8fc9eb; 9 | --primary-link-hover-color: #d5ecf8; 10 | --primary-danger-color: #f71323; 11 | --primary-safe-color: #1db464; 12 | 13 | --secondary-surface-color: #303134; 14 | --secondary-border-color: #3f4146; 15 | --secondary-text-color: #aaaaaa; 16 | --secondary-text-onsurface-color: #eaeaea; 17 | --secondary-danger-color: #f8abb0; 18 | 19 | --changed-surface-color: #3a391a; 20 | --success-surface-color: #15531d; 21 | 22 | --ad-surface-color: #122738; 23 | --ad-text-color: #7ac2ec; 24 | --ad-link-color: var(--primary-link-color); 25 | 26 | --search-surface-color: #383b41; 27 | --search-surface-hover-color: #494b50; 28 | --search-surface-content-color: #665f37; 29 | 30 | --button-primary-surface-color: #1b98f1; 31 | --button-primary-text-color: #ffffff; 32 | --button-danger-surface-color: #f800003f; 33 | 34 | --notification-surface-color: rgba(0, 0, 0, 0.8); 35 | --notification-text-color: #fafafa; 36 | --notification-dismiss-color: #656565; 37 | --notification-dismiss-hover-parent-color: #aaa; 38 | --notification-dismiss-hover-color: var(--notification-text-color); 39 | 40 | --menu-surface-color: #45474d; 41 | --menu-surface-hover-color: #373b44; 42 | --menu-border-color: rgba(255, 255, 255, 0.2); 43 | 44 | --switch-surface-handle-color: var(--secondary-surface-color); 45 | --switch-surface-on-color: #1b7bca; 46 | --switch-surface-neutral-color: var(--primary-border-color); 47 | 48 | --notice-danger-surface-color: #f8000015; 49 | } 50 | -------------------------------------------------------------------------------- /interface/popup/dark.css: -------------------------------------------------------------------------------- 1 | 2 | [data-theme='dark'] #cookie-container #searchField { 3 | border: 1px solid var(--secondary-border-color); 4 | } 5 | 6 | [data-theme='dark'] #cookie-container .header { 7 | border: none; 8 | border-top: 1px solid rgba(255, 255, 255, 0.08); 9 | background-color: var(--secondary-surface-color); 10 | } 11 | 12 | [data-theme="dark"] #cookie-container .expando { 13 | background-color: rgba(255, 255, 255, 0.04); 14 | } 15 | [data-theme="dark"] #cookie-container textarea, 16 | [data-theme="dark"] #cookie-container input[type='text'], 17 | [data-theme="dark"] #cookie-container select { 18 | background-color: rgba(255, 255, 255, 0.1); 19 | border-color: rgba(255, 255, 255, 0.1); 20 | } 21 | 22 | [data-theme="dark"] #cookie-container textarea:hover, 23 | [data-theme="dark"] #cookie-container input:not([disabled])[type='text']:hover { 24 | border-color: rgb(82, 130, 192); 25 | box-shadow: 1px 1px 5px rgba(150, 150, 150, 0.4); 26 | } 27 | 28 | [data-theme="dark"] .panel-section-footer-button:hover, 29 | [data-theme="dark"] .panel-section-footer-button:focus { 30 | background-color: rgba(255, 255, 255, 0.2); 31 | border: 1px solid rgba(255, 255, 255, 0.2); 32 | color: var(--primary-text-color); 33 | fill: var(--primary-text-color); 34 | } 35 | [data-theme="dark"] .panel-section-footer-button .tooltip { 36 | color: var(--primary-text-color); 37 | } 38 | [data-theme="dark"] .panel-section-footer-button:hover .tooltip, 39 | [data-theme="dark"] .panel-section-footer-button:focus .tooltip { 40 | color: var(--primary-text-color); 41 | } 42 | 43 | [data-theme="dark"] #export-menu button:hover { 44 | border-color: rgba(255, 255, 255, 0.3); 45 | background-color: rgba(255, 255, 255, 0.15); 46 | box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.1); 47 | } 48 | -------------------------------------------------------------------------------- /eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import js from '@eslint/js'; 2 | import google from 'eslint-config-google'; 3 | import prettierConfig from 'eslint-config-prettier'; 4 | import prettier from 'eslint-plugin-prettier'; 5 | import simpleImportSort from 'eslint-plugin-simple-import-sort'; 6 | import globals from 'globals'; 7 | 8 | export default [ 9 | // Global ignores 10 | { 11 | ignores: [ 12 | 'dist/**', 13 | 'build/**', 14 | 'node_modules/**', 15 | '.vscode/extensions.js', 16 | 'safari/**', 17 | ], 18 | }, 19 | 20 | // Base configuration for JS/MJS files 21 | js.configs.recommended, 22 | 23 | // Google's style guide 24 | google, 25 | 26 | // Main custom configuration 27 | { 28 | files: ['**/*.{js,mjs}'], 29 | plugins: { 30 | prettier, 31 | 'simple-import-sort': simpleImportSort, 32 | }, 33 | languageOptions: { 34 | ecmaVersion: 'latest', 35 | sourceType: 'module', 36 | globals: { 37 | ...globals.browser, 38 | ...globals.webextensions, 39 | }, 40 | }, 41 | rules: { 42 | 'prettier/prettier': 'error', 43 | 'simple-import-sort/imports': 'error', 44 | 'simple-import-sort/exports': 'error', 45 | }, 46 | }, 47 | 48 | // Override for Node.js configuration files 49 | { 50 | files: ['eslint.config.mjs'], 51 | languageOptions: { 52 | globals: { 53 | ...globals.node, 54 | }, 55 | }, 56 | }, 57 | { 58 | files: ['Gruntfile.js'], 59 | languageOptions: { 60 | sourceType: 'commonjs', 61 | globals: { 62 | ...globals.node, 63 | }, 64 | }, 65 | }, 66 | 67 | // Prettier config must be last 68 | // This turns off all rules that are unnecessary or might conflict with Prettier. 69 | prettierConfig, 70 | ]; 71 | -------------------------------------------------------------------------------- /interface/lib/headerstringFormat.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This class is responsible for parsing and formatting cookies to the 3 | * Header string format. 4 | */ 5 | export class HeaderstringFormat { 6 | /** 7 | * Parses a string of cookie in the JSON format to a cookie object. 8 | * @param {string} cookieString Cookies in the JSON format. 9 | * @return {object} List of Cookies. 10 | */ 11 | static parse(cookieString) { 12 | const cookies = []; 13 | const rawCookies = cookieString.split(';'); 14 | for (let rawCookie of rawCookies) { 15 | rawCookie = rawCookie.trim(); 16 | if (!rawCookie.length) { 17 | continue; 18 | } 19 | const eqPos = rawCookie.indexOf('='); 20 | if (eqPos === -1) { 21 | console.log('invalid cookie: ', rawCookie); 22 | continue; 23 | } 24 | cookies.push({ 25 | name: rawCookie.substring(0, eqPos), 26 | value: rawCookie.substring(eqPos + 1), 27 | }); 28 | } 29 | 30 | if (cookies.length === 0) { 31 | throw new Error('No cookies found.'); 32 | } 33 | 34 | return cookies; 35 | } 36 | 37 | /** 38 | * Formats a list of cookies into a Header string formatted string. 39 | * @param {Cookie[]} cookies Cookies to format. 40 | * @return {string} Header string formatted cookie string. 41 | */ 42 | static format(cookies) { 43 | const exportedCookies = []; 44 | for (const cookieId in cookies) { 45 | if (!Object.prototype.hasOwnProperty.call(cookies, cookieId)) { 46 | continue; 47 | } 48 | const exportedCookie = cookies[cookieId].cookie; 49 | const name = exportedCookie.name; 50 | const value = exportedCookie.value; 51 | exportedCookies.push(`${name}=${value}`); 52 | } 53 | return exportedCookies.join(';'); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /safari/Cookie-Editor/Shared (App)/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "1024x1024", 5 | "idiom" : "universal", 6 | "filename" : "universal-icon-1024@1x.png", 7 | "platform" : "ios" 8 | }, 9 | { 10 | "size" : "16x16", 11 | "idiom" : "mac", 12 | "filename" : "mac-icon-16@1x.png", 13 | "scale" : "1x" 14 | }, 15 | { 16 | "size" : "16x16", 17 | "idiom" : "mac", 18 | "filename" : "mac-icon-16@2x.png", 19 | "scale" : "2x" 20 | }, 21 | { 22 | "size" : "32x32", 23 | "idiom" : "mac", 24 | "filename" : "mac-icon-32@1x.png", 25 | "scale" : "1x" 26 | }, 27 | { 28 | "size" : "32x32", 29 | "idiom" : "mac", 30 | "filename" : "mac-icon-32@2x.png", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "size" : "128x128", 35 | "idiom" : "mac", 36 | "filename" : "mac-icon-128@1x.png", 37 | "scale" : "1x" 38 | }, 39 | { 40 | "size" : "128x128", 41 | "idiom" : "mac", 42 | "filename" : "mac-icon-128@2x.png", 43 | "scale" : "2x" 44 | }, 45 | { 46 | "size" : "256x256", 47 | "idiom" : "mac", 48 | "filename" : "mac-icon-256@1x.png", 49 | "scale" : "1x" 50 | }, 51 | { 52 | "size" : "256x256", 53 | "idiom" : "mac", 54 | "filename" : "mac-icon-256@2x.png", 55 | "scale" : "2x" 56 | }, 57 | { 58 | "size" : "512x512", 59 | "idiom" : "mac", 60 | "filename" : "mac-icon-512@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "512x512", 65 | "idiom" : "mac", 66 | "filename" : "mac-icon-512@2x.png", 67 | "scale" : "2x" 68 | } 69 | ], 70 | "info" : { 71 | "version" : 1, 72 | "author" : "xcode" 73 | } 74 | } -------------------------------------------------------------------------------- /safari/Cookie-Editor/Shared (App)/Resources/Script.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-unused-vars */ 2 | /** 3 | * Shows the window in the main app that serves to sideload the extension. 4 | * @param {object} platform 5 | * @param {boolean} enabled 6 | * @param {boolean} useSettingsInsteadOfPreferences 7 | */ 8 | function show(platform, enabled, useSettingsInsteadOfPreferences) { 9 | document.body.classList.add(`platform-${platform}`); 10 | 11 | if (useSettingsInsteadOfPreferences) { 12 | document.getElementsByClassName('platform-mac state-on')[0].innerText = 13 | 'Cookie-Editor’s extension is currently on. You can turn it off in the Extensions section of Safari Settings.'; 14 | document.getElementsByClassName('platform-mac state-off')[0].innerText = 15 | 'Cookie-Editor’s extension is currently off. You can turn it on in the Extensions section of Safari Settings.'; 16 | document.getElementsByClassName('platform-mac state-unknown')[0].innerText = 17 | 'You can turn on Cookie-Editor’s extension in the Extensions section of Safari Settings.'; 18 | document.getElementsByClassName( 19 | 'platform-mac open-preferences', 20 | )[0].innerText = 'Quit and Open Safari Settings…'; 21 | } 22 | 23 | if (typeof enabled === 'boolean') { 24 | document.body.classList.toggle(`state-on`, enabled); 25 | document.body.classList.toggle(`state-off`, !enabled); 26 | } else { 27 | document.body.classList.remove(`state-on`); 28 | document.body.classList.remove(`state-off`); 29 | } 30 | } 31 | 32 | /** 33 | * Opens Safari's preference window. 34 | */ 35 | function openPreferences() { 36 | // eslint-disable-next-line no-undef 37 | webkit.messageHandlers.controller.postMessage('open-preferences'); 38 | } 39 | 40 | document 41 | .querySelector('button.open-preferences') 42 | .addEventListener('click', openPreferences); 43 | -------------------------------------------------------------------------------- /interface/lib/genericStorageHandler.js: -------------------------------------------------------------------------------- 1 | import { EventEmitter } from './eventEmitter.js'; 2 | 3 | /** 4 | * Abstract class used to implement basic common Storage API handling. 5 | */ 6 | export class GenericStorageHandler extends EventEmitter { 7 | /** 8 | * Constructs a GenericStorageHandler. 9 | * @param {BrowserDetector} browserDetector 10 | */ 11 | constructor(browserDetector) { 12 | super(); 13 | this.browserDetector = browserDetector; 14 | } 15 | 16 | /** 17 | * Gets a value from LocalStorage. 18 | * @param {string} key Key to identify the value in the LocalStorage. 19 | * @return {Promise} 20 | */ 21 | async getLocal(key) { 22 | const self = this; 23 | let promise; 24 | if (this.browserDetector.supportsPromises()) { 25 | promise = this.browserDetector.getApi().storage.local.get([key]); 26 | } else { 27 | promise = new Promise((resolve, reject) => { 28 | self.browserDetector.getApi().storage.local.get([key], data => { 29 | const error = self.browserDetector.getApi().runtime.lastError; 30 | if (error) { 31 | reject(error); 32 | } 33 | resolve(data ?? null); 34 | }); 35 | }); 36 | } 37 | 38 | return promise.then(data => { 39 | return data[key] ?? null; 40 | }); 41 | } 42 | 43 | /** 44 | * Sets a value in the LocalStorage. 45 | * @param {string} key Key to identify the value in the LocalStorage. 46 | * @param {any} data Data to store in the LocalStorage 47 | * @return {Promise} 48 | */ 49 | async setLocal(key, data) { 50 | const self = this; 51 | const dataObj = {}; 52 | dataObj[key] = data; 53 | 54 | if (this.browserDetector.supportsPromises()) { 55 | return this.browserDetector.getApi().storage.local.set(dataObj); 56 | } else { 57 | return new Promise((resolve, reject) => { 58 | this.browserDetector.getApi().storage.local.set(dataObj, () => { 59 | const error = self.browserDetector.getApi().runtime.lastError; 60 | if (error) { 61 | reject(error); 62 | } 63 | resolve(); 64 | }); 65 | }); 66 | } 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /manifest.firefox.json: -------------------------------------------------------------------------------- 1 | { 2 | "manifest_version": 3, 3 | "name": "Cookie-Editor", 4 | "version": "1.13.0", 5 | "author": "Moustachauve", 6 | "description": "Simple yet powerful Cookie Editor that allow you to quickly create, edit and delete cookies without leaving your tab.", 7 | "background": { 8 | "scripts": [ 9 | "interface/lib/env.js", 10 | "interface/lib/browserDetector.js", 11 | "interface/lib/permissionHandler.js", 12 | "cookie-editor.js" 13 | ], 14 | "type": "module" 15 | }, 16 | "action": { 17 | "default_icon": { 18 | "16": "icons/cookie-filled-small.svg", 19 | "32": "icons/cookie-filled-small.svg", 20 | "48": "icons/cookie-filled.svg", 21 | "128": "icons/cookie-filled.svg" 22 | }, 23 | "theme_icons": [ 24 | { 25 | "light": "icons/cookie-light-small.svg", 26 | "dark": "icons/cookie-small.svg", 27 | "size": 16 28 | }, 29 | { 30 | "light": "icons/cookie-light-small.svg", 31 | "dark": "icons/cookie-small.svg", 32 | "size": 32 33 | }, 34 | { 35 | "light": "icons/cookie-light.svg", 36 | "dark": "icons/cookie.svg", 37 | "size": 128 38 | } 39 | ], 40 | "default_title": "Cookie-Editor", 41 | "default_popup": "interface/popup/cookie-list.html" 42 | }, 43 | "sidebar_action": { 44 | "default_icon": { 45 | "16": "icons/cookie-filled-small.svg", 46 | "32": "icons/cookie-filled-small.svg" 47 | }, 48 | "default_title": "Cookie-Editor", 49 | "default_panel": "interface/sidepanel/cookie-list.html" 50 | }, 51 | "devtools_page": "interface/devtools/devtool.html", 52 | "options_ui": { 53 | "page": "interface/options/options.html" 54 | }, 55 | "permissions": [ 56 | "cookies", 57 | "tabs", 58 | "storage" 59 | ], 60 | "host_permissions": [ 61 | "
64 |
65 |
66 |
67 |
51 | You can find the source code of this project on Github. Contribute as you desire to the project. All the 52 | help is appreciated. 53 |
54 |63 | Please create an issue on the Github issue tracker for any suggestion or bug report. 64 | It will be resolved as fast as possible. 65 |
66 | 67 | Create an Issue 68 | 69 |It's simple: the Cookie-Editor extension does not collect any data at all.
34 |48 | You can find the source code of this project on Github. Contribute as you desire to the project. All the 49 | help is appreciated. 50 |
51 |60 | Please create an issue on the Github issue tracker for any suggestion or bug report. 61 | It will be resolved as fast as possible. 62 |
63 | 64 | Create an Issue 65 | 66 |