├── .vscode ├── settings.json └── tasks.json ├── Extension ├── icon_128.png ├── icon_48.png ├── icon_96.png ├── icon_1024.png ├── hide.svg ├── manifest.chromium.json ├── manifest.safari.json ├── manifest.firefox.json ├── editor │ ├── css │ │ └── main.css.map │ └── js │ │ ├── utils.js │ │ └── domParser.js ├── minimize.svg ├── Detector.js ├── popup.html ├── logo.svg ├── popup.js └── Consent.js ├── xcode ├── Shared (App) │ ├── Resources │ │ ├── Icon.png │ │ ├── Script.js │ │ └── Style.css │ ├── Assets.xcassets │ │ ├── Contents.json │ │ ├── LargeIcon.imageset │ │ │ ├── Icon.png │ │ │ └── Contents.json │ │ ├── AppIcon.appiconset │ │ │ ├── AppIcon.png │ │ │ ├── icon_16x16.png │ │ │ ├── icon_32x32.png │ │ │ ├── icon_128x128.png │ │ │ ├── icon_16x16@2x.png │ │ │ ├── icon_256x256.png │ │ │ ├── icon_32x32@2x.png │ │ │ ├── icon_512x512.png │ │ │ ├── icon_128x128@2x.png │ │ │ ├── icon_256x256@2x.png │ │ │ ├── icon_512x512@2x.png │ │ │ └── Contents.json │ │ └── AccentColor.colorset │ │ │ └── Contents.json │ ├── Base.lproj │ │ └── Main.html │ └── ViewController.swift ├── Consent-O-Matic.xcodeproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ ├── xcuserdata │ │ │ └── cavi.xcuserdatad │ │ │ │ └── UserInterfaceState.xcuserstate │ │ └── xcshareddata │ │ │ ├── WorkspaceSettings.xcsettings │ │ │ └── IDEWorkspaceChecks.plist │ └── xcuserdata │ │ └── cavi.xcuserdatad │ │ └── xcschemes │ │ └── xcschememanagement.plist ├── macOS (Extension) │ ├── Consent-O-Matic.entitlements │ └── Info.plist ├── macOS (App) │ ├── Consent-O-Matic.entitlements │ ├── Info.plist │ └── AppDelegate.swift ├── iOS (App) │ ├── SceneDelegate.swift │ ├── AppDelegate.swift │ ├── Info.plist │ └── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard ├── iOS (Extension) │ └── Info.plist └── Shared (Extension) │ └── SafariWebExtensionHandler.swift ├── .gitignore ├── package.json ├── LICENSE ├── rules ├── umf.dk.json ├── sourcepoint.json ├── mitid.json ├── azofreeware.com.json ├── google_eomdialog.json ├── rusal.json ├── gov.ukopen.json ├── Flightaware.com.json ├── yahoo_popup.json ├── koboopen.json ├── whatsapp.json ├── hetzner.json ├── google_consentdomain_1.json ├── onetrust_hidden.json ├── phpipam.net.json ├── thenextwebopen.json ├── hampshirepoliceopen.json ├── ikea_toast.json ├── linkedin_popup.json ├── paypal_banner.json ├── sundhed.dk.json ├── instagram.json ├── nordpoolgroupopen.json ├── opensuchenmobile.de.json ├── trustarc_bar.json ├── dpgmedia.json ├── facebook.json ├── asus.json ├── ameli_connect.fr.json ├── lucide.json ├── riadaljana.json ├── theVerge.json ├── thenextweb.json ├── trustarc_popup_hider.json ├── chrysal.com.json ├── mindfactory.json ├── cdiscountopen.json ├── reddit.json ├── jamsoftware.json ├── harvester.json ├── onetrust_banner.json ├── typo3cookieman.json ├── canalplus.json ├── twitter.json ├── check24.json ├── begadi.com.json ├── paypal_page.json ├── amazon.json ├── sourcepoint_popup.json ├── hl.co.uk.json ├── cookiewow.json ├── rozhlas.cz.json ├── autohero.json ├── tournamentsoftware.json ├── lesatlantes.json ├── setonosylius.json ├── volkswagen.json ├── elektroniklavpris.json ├── google_consentdomain_2.json └── benq.json └── webpack.config.js /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "cmake.configureOnOpen": false 3 | } -------------------------------------------------------------------------------- /Extension/icon_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/HEAD/Extension/icon_128.png -------------------------------------------------------------------------------- /Extension/icon_48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/HEAD/Extension/icon_48.png -------------------------------------------------------------------------------- /Extension/icon_96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/HEAD/Extension/icon_96.png -------------------------------------------------------------------------------- /Extension/icon_1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/HEAD/Extension/icon_1024.png -------------------------------------------------------------------------------- /xcode/Shared (App)/Resources/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/HEAD/xcode/Shared (App)/Resources/Icon.png -------------------------------------------------------------------------------- /xcode/Shared (App)/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /xcode/Shared (App)/Assets.xcassets/LargeIcon.imageset/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/HEAD/xcode/Shared (App)/Assets.xcassets/LargeIcon.imageset/Icon.png -------------------------------------------------------------------------------- /xcode/Shared (App)/Assets.xcassets/AppIcon.appiconset/AppIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/HEAD/xcode/Shared (App)/Assets.xcassets/AppIcon.appiconset/AppIcon.png -------------------------------------------------------------------------------- /xcode/Shared (App)/Assets.xcassets/AppIcon.appiconset/icon_16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/HEAD/xcode/Shared (App)/Assets.xcassets/AppIcon.appiconset/icon_16x16.png -------------------------------------------------------------------------------- /xcode/Shared (App)/Assets.xcassets/AppIcon.appiconset/icon_32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/HEAD/xcode/Shared (App)/Assets.xcassets/AppIcon.appiconset/icon_32x32.png -------------------------------------------------------------------------------- /xcode/Shared (App)/Assets.xcassets/AppIcon.appiconset/icon_128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/HEAD/xcode/Shared (App)/Assets.xcassets/AppIcon.appiconset/icon_128x128.png -------------------------------------------------------------------------------- /xcode/Shared (App)/Assets.xcassets/AppIcon.appiconset/icon_16x16@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/HEAD/xcode/Shared (App)/Assets.xcassets/AppIcon.appiconset/icon_16x16@2x.png -------------------------------------------------------------------------------- /xcode/Shared (App)/Assets.xcassets/AppIcon.appiconset/icon_256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/HEAD/xcode/Shared (App)/Assets.xcassets/AppIcon.appiconset/icon_256x256.png -------------------------------------------------------------------------------- /xcode/Shared (App)/Assets.xcassets/AppIcon.appiconset/icon_32x32@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/HEAD/xcode/Shared (App)/Assets.xcassets/AppIcon.appiconset/icon_32x32@2x.png -------------------------------------------------------------------------------- /xcode/Shared (App)/Assets.xcassets/AppIcon.appiconset/icon_512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/HEAD/xcode/Shared (App)/Assets.xcassets/AppIcon.appiconset/icon_512x512.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea/.gitignore 2 | .idea/Consent-O-Matic-Github.iml 3 | .idea/misc.xml 4 | .idea/modules.xml 5 | .idea/vcs.xml 6 | .idea/watcherTasks.xml 7 | node_modules/ 8 | dist/ 9 | .DS_Store 10 | -------------------------------------------------------------------------------- /xcode/Shared (App)/Assets.xcassets/AppIcon.appiconset/icon_128x128@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/HEAD/xcode/Shared (App)/Assets.xcassets/AppIcon.appiconset/icon_128x128@2x.png -------------------------------------------------------------------------------- /xcode/Shared (App)/Assets.xcassets/AppIcon.appiconset/icon_256x256@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/HEAD/xcode/Shared (App)/Assets.xcassets/AppIcon.appiconset/icon_256x256@2x.png -------------------------------------------------------------------------------- /xcode/Shared (App)/Assets.xcassets/AppIcon.appiconset/icon_512x512@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/HEAD/xcode/Shared (App)/Assets.xcassets/AppIcon.appiconset/icon_512x512@2x.png -------------------------------------------------------------------------------- /xcode/Consent-O-Matic.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /xcode/Consent-O-Matic.xcodeproj/project.xcworkspace/xcuserdata/cavi.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/HEAD/xcode/Consent-O-Matic.xcodeproj/project.xcworkspace/xcuserdata/cavi.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /xcode/macOS (Extension)/Consent-O-Matic.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /xcode/Consent-O-Matic.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /xcode/Consent-O-Matic.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /xcode/macOS (App)/Consent-O-Matic.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.network.client 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /xcode/macOS (App)/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ITSAppUsesNonExemptEncryption 6 | 7 | SFSafariWebExtensionConverterVersion 8 | 13.2.1 9 | 10 | 11 | -------------------------------------------------------------------------------- /xcode/Shared (App)/Assets.xcassets/LargeIcon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "Icon.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /xcode/Shared (App)/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0x99", 9 | "green" : "0x33", 10 | "red" : "0x00" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | } 15 | ], 16 | "info" : { 17 | "author" : "xcode", 18 | "version" : 1 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /xcode/iOS (App)/SceneDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SceneDelegate.swift 3 | // iOS (App) 4 | // 5 | // Created by cavi_13pro on 25/01/2022. 6 | // 7 | 8 | import UIKit 9 | 10 | class SceneDelegate: UIResponder, UIWindowSceneDelegate { 11 | 12 | var window: UIWindow? 13 | 14 | func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { 15 | guard let _ = (scene as? UIWindowScene) else { return } 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /xcode/iOS (Extension)/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | NSExtension 6 | 7 | NSExtensionPointIdentifier 8 | com.apple.Safari.web-extension 9 | NSExtensionPrincipalClass 10 | $(PRODUCT_MODULE_NAME).SafariWebExtensionHandler 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /xcode/macOS (Extension)/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | NSExtension 6 | 7 | NSExtensionPointIdentifier 8 | com.apple.Safari.web-extension 9 | NSExtensionPrincipalClass 10 | $(PRODUCT_MODULE_NAME).SafariWebExtensionHandler 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=733558 3 | // for the documentation about the tasks.json format 4 | "version": "2.0.0", 5 | "tasks": [ 6 | { 7 | "type": "npm", 8 | "script": "build", 9 | "group": { 10 | "kind": "build", 11 | "isDefault": true 12 | }, 13 | "problemMatcher": [], 14 | "label": "npm: build", 15 | "detail": "webpack" 16 | } 17 | ] 18 | } -------------------------------------------------------------------------------- /xcode/macOS (App)/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // macOS (App) 4 | // 5 | // Created by cavi_13pro on 25/01/2022. 6 | // 7 | 8 | import Cocoa 9 | 10 | @main 11 | class AppDelegate: NSObject, NSApplicationDelegate { 12 | 13 | func applicationDidFinishLaunching(_ notification: Notification) { 14 | // Override point for customization after application launch. 15 | } 16 | 17 | func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { 18 | return true 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /xcode/Consent-O-Matic.xcodeproj/xcuserdata/cavi.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Consent-O-Matic (iOS).xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | Consent-O-Matic (macOS).xcscheme_^#shared#^_ 13 | 14 | orderHint 15 | 1 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /xcode/Shared (App)/Resources/Script.js: -------------------------------------------------------------------------------- 1 | function show(platform, enabled) { 2 | document.body.classList.add(`platform-${platform}`); 3 | 4 | if (typeof enabled === "boolean") { 5 | document.body.classList.toggle(`state-on`, enabled); 6 | document.body.classList.toggle(`state-off`, !enabled); 7 | } else { 8 | document.body.classList.remove(`state-on`); 9 | document.body.classList.remove(`state-off`); 10 | } 11 | } 12 | 13 | function openPreferences() { 14 | webkit.messageHandlers.controller.postMessage("open-preferences"); 15 | } 16 | 17 | document.querySelector("button.open-preferences").addEventListener("click", openPreferences); 18 | -------------------------------------------------------------------------------- /xcode/iOS (App)/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // iOS (App) 4 | // 5 | // Created by cavi_13pro on 25/01/2022. 6 | // 7 | 8 | import UIKit 9 | 10 | @main 11 | class AppDelegate: UIResponder, UIApplicationDelegate { 12 | 13 | var window: UIWindow? 14 | 15 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 16 | // Override point for customization after application launch. 17 | return true 18 | } 19 | 20 | func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { 21 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /Extension/hide.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "consent-o-matic", 3 | "version": "1.1.5", 4 | "description": "A browser extension that tries to fill out GDPR consent popups for you", 5 | "license": "MIT", 6 | "repository": { 7 | "type": "git", 8 | "url": "https://github.com/cavi-au/Consent-O-Matic" 9 | }, 10 | "scripts": { 11 | "build-firefox": "webpack --env target=firefox", 12 | "build-chromium": "webpack --env target=chromium", 13 | "build-safari": "webpack --env target=safari", 14 | "build": "webpack --env target=firefox && webpack --env target=chromium && webpack --env target=safari" 15 | }, 16 | "dependencies": { 17 | "copy-webpack-plugin": "^12.0.2", 18 | "glob": "^10.3.12", 19 | "html-minimizer-webpack-plugin": "^5.0.0", 20 | "sass": "^1.77.0", 21 | "sass-loader": "^16.0.5", 22 | "webpack-cli": "^5.1.4", 23 | "zip-webpack-plugin": "^4.0.1" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /xcode/Shared (Extension)/SafariWebExtensionHandler.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SafariWebExtensionHandler.swift 3 | // Shared (Extension) 4 | // 5 | // Created by cavi_13pro on 25/01/2022. 6 | // 7 | 8 | import SafariServices 9 | import os.log 10 | 11 | let SFExtensionMessageKey = "message" 12 | 13 | class SafariWebExtensionHandler: NSObject, NSExtensionRequestHandling { 14 | 15 | func beginRequest(with context: NSExtensionContext) { 16 | let item = context.inputItems[0] as! NSExtensionItem 17 | let message = item.userInfo?[SFExtensionMessageKey] 18 | os_log(.default, "Received message from browser.runtime.sendNativeMessage: %@", message as! CVarArg) 19 | 20 | let response = NSExtensionItem() 21 | response.userInfo = [ SFExtensionMessageKey: [ "Response to": message ] ] 22 | 23 | context.completeRequest(returningItems: [response], completionHandler: nil) 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /xcode/iOS (App)/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ITSAppUsesNonExemptEncryption 6 | 7 | SFSafariWebExtensionConverterVersion 8 | 13.2.1 9 | UIApplicationSceneManifest 10 | 11 | UIApplicationSupportsMultipleScenes 12 | 13 | UISceneConfigurations 14 | 15 | UIWindowSceneSessionRoleApplication 16 | 17 | 18 | UISceneConfigurationName 19 | Default Configuration 20 | UISceneDelegateClassName 21 | $(PRODUCT_MODULE_NAME).SceneDelegate 22 | UISceneStoryboardFile 23 | Main 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /Extension/manifest.chromium.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Consent-O-Matic", 3 | "description": "Automatic handling of GDPR consent forms", 4 | "author": "CAVI - Aarhus University", 5 | "homepage_url": "https://github.com/cavi-au/Consent-O-Matic", 6 | "version": "REPLACED_BY_BUILD_SCRIPT", 7 | "manifest_version": 3, 8 | "permissions": [ 9 | "activeTab", 10 | "tabs", 11 | "storage" 12 | ], 13 | "host_permissions": [ 14 | "" 15 | ], 16 | "action": { 17 | "default_title": "Consent-O-Matic", 18 | "default_popup": "popup.html" 19 | }, 20 | "background": { 21 | "service_worker": "service.js" 22 | }, 23 | "content_scripts": [ 24 | { 25 | "matches": [ 26 | "" 27 | ], 28 | "js": [ 29 | "content.js" 30 | ], 31 | "css": [ 32 | "content.css" 33 | ], 34 | "all_frames": true, 35 | "match_about_blank": true, 36 | "run_at": "document_start" 37 | } 38 | ], 39 | "options_ui": { 40 | "page": "options.html", 41 | "open_in_tab": true 42 | }, 43 | "icons": { 44 | "48": "icon_48.png", 45 | "96": "icon_96.png" 46 | } 47 | } -------------------------------------------------------------------------------- /Extension/manifest.safari.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Consent-O-Matic", 3 | "description": "Automatic handling of GDPR consent forms", 4 | "author": "CAVI - Aarhus University", 5 | "homepage_url": "https://github.com/cavi-au/Consent-O-Matic", 6 | "version": "REPLACED_BY_BUILD_SCRIPT", 7 | "manifest_version": 3, 8 | "permissions": [ 9 | "activeTab", 10 | "tabs", 11 | "storage" 12 | ], 13 | "host_permissions": [ 14 | "" 15 | ], 16 | "action": { 17 | "default_title": "Consent-O-Matic", 18 | "default_popup": "popup.html" 19 | }, 20 | "background": { 21 | "scripts": ["service.js"], 22 | "persistent": false 23 | }, 24 | "content_scripts": [ 25 | { 26 | "matches": [ 27 | "" 28 | ], 29 | "js": [ 30 | "content.js" 31 | ], 32 | "css": [ 33 | "content.css" 34 | ], 35 | "all_frames": true, 36 | "match_about_blank": true, 37 | "run_at": "document_start" 38 | } 39 | ], 40 | "options_ui": { 41 | "page": "options.html", 42 | "open_in_tab": true 43 | }, 44 | "icons": { 45 | "48": "icon_48.png", 46 | "96": "icon_96.png" 47 | } 48 | } -------------------------------------------------------------------------------- /Extension/manifest.firefox.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Consent-O-Matic", 3 | "description": "Automatic handling of GDPR consent forms", 4 | "author": "CAVI - Aarhus University", 5 | "homepage_url": "https://github.com/cavi-au/Consent-O-Matic", 6 | "version": "REPLACED_BY_BUILD_SCRIPT", 7 | "manifest_version": 3, 8 | "permissions": [ 9 | "activeTab", 10 | "tabs", 11 | "storage" 12 | ], 13 | "host_permissions": [ 14 | "" 15 | ], 16 | "action": { 17 | "default_title": "Consent-O-Matic", 18 | "default_popup": "popup.html" 19 | }, 20 | "background": { 21 | "scripts": [ 22 | "service.js" 23 | ] 24 | }, 25 | "content_scripts": [ 26 | { 27 | "matches": [ 28 | "" 29 | ], 30 | "js": [ 31 | "content.js" 32 | ], 33 | "css": [ 34 | "content.css" 35 | ], 36 | "all_frames": true, 37 | "match_about_blank": true, 38 | "run_at": "document_start" 39 | } 40 | ], 41 | "options_ui": { 42 | "page": "options.html", 43 | "open_in_tab": true 44 | }, 45 | "icons": { 46 | "48": "icon_48.png", 47 | "96": "icon_96.png" 48 | }, 49 | "browser_specific_settings": { 50 | "gecko": { 51 | "id": "gdpr@cavi.au.dk", 52 | "strict_min_version": "109.0" 53 | } 54 | } 55 | } -------------------------------------------------------------------------------- /xcode/Shared (App)/Resources/Style.css: -------------------------------------------------------------------------------- 1 | * { 2 | -webkit-user-select: none; 3 | -webkit-user-drag: none; 4 | cursor: default; 5 | } 6 | 7 | :root { 8 | color-scheme: light dark; 9 | 10 | --spacing: 20px; 11 | } 12 | 13 | html { 14 | height: 100%; 15 | } 16 | 17 | body { 18 | display: flex; 19 | align-items: center; 20 | justify-content: center; 21 | flex-direction: column; 22 | 23 | gap: var(--spacing); 24 | margin: 0 calc(var(--spacing) * 2); 25 | height: 100%; 26 | 27 | font: -apple-system-short-body; 28 | text-align: center; 29 | } 30 | 31 | body:not(.platform-mac, .platform-ios) :is(.platform-mac, .platform-ios) { 32 | display: none; 33 | } 34 | 35 | body.platform-ios .platform-mac { 36 | display: none; 37 | } 38 | 39 | body.platform-mac .platform-ios { 40 | display: none; 41 | } 42 | 43 | body.platform-ios .platform-mac { 44 | display: none; 45 | } 46 | 47 | body:not(.state-on, .state-off) :is(.state-on, .state-off) { 48 | display: none; 49 | } 50 | 51 | body.state-on :is(.state-off, .state-unknown) { 52 | display: none; 53 | } 54 | 55 | body.state-off :is(.state-on, .state-unknown) { 56 | display: none; 57 | } 58 | 59 | button { 60 | font-size: 1em; 61 | } 62 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019,2020,2021,2022 Janus Bager Kristensen and Rolf Bagge, 4 | CAVI - Center for Advanced Visualization and Interaction, Aarhus University 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | SOFTWARE. 23 | -------------------------------------------------------------------------------- /Extension/editor/css/main.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sourceRoot":"","sources":["../scss/main.scss"],"names":[],"mappings":";AAAA;EACI;IAAM;;EACN;IAAI;;;AAKR;EACI;EACA;EACA;EACA;EACA;;;AAEJ;EACI;EACA;EACA;;;AAEJ;EACI;EACA;EACA;EACA;;;AAGJ;EACI;EACA;EACA;EACA;EACA,OA1BQ;EA2BR;EACA;EACA;;AAEA;EACI;EACA;EACA;EACA;EACA;EACA;;AAGJ;EACI;EACA;;AAGJ;EACI;EACA;;AAEA;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGJ;EACI;;;AAKZ;EACI;EACA;EACA;EACA;;AAEA;EACI;;AAGJ;EAKI;EACA;EACA;EACA;EACA;;AARA;EACI;;AASJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACI;;;AAMhB;EACI;EACA;EACA;EACA;EACA;;AAEA;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACH;;AAGD;EACI;;;AAKR;AACA;EACI;EACA;EACA;EACA;;AAEA;EACI;EACA;;AAEJ;EAAuB;;AACvB;EAAwB;;AACxB;EAAyB;;AACzB;EACI;EACA;EACA;;AACA;EACI;EACA;;AAEA;EACI;;AAIZ;EAAwB;;AACxB;EAA4B;;;AAEhC;EACI;EACA;EACA;EACA;;AACA;EACI;;;AAGR;EACI;EACA;EACA;;;AAIA;EACI;EACA;EACA;EACA;EACA;EACA;EACA;;AAIA;EACI;;AAEJ;EACI;;;AAIZ;EACI;;AAEA;EACI;;AACA;EACI;;AAKJ;EACI;;AAEA;EACI;;AAKJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEJ;EACI;;AAKZ;EACI;EACA;EACA;;;AAIR;EACI;;;AAEJ;EACI;;;AAEJ;EACI;;;AAGJ;EACI;EACA;EACA;EACA;EACA;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;EACA;EACA;EACA;;AAEA;EACI;;;AAIR;EACI;EACA;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGJ;EACI;EACA;EACA;;;AAGJ;EACI;EACA","file":"main.css"} -------------------------------------------------------------------------------- /xcode/Shared (App)/Base.lproj/Main.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | Consent-O-Matic Icon 14 |

To enable this extension, go to
Settings -> Safari -> Extensions

Make sure Consent-O-Matic is enabled and has permission to read the content of all websites.

15 |

You can turn on Consent-O-Matic’s extension in Safari Extensions preferences.

16 |

Consent-O-Matic’s extension is currently on. You can turn it off in Safari Extensions preferences.

17 |

Consent-O-Matic’s extension is currently off. You can turn it on in Safari Extensions preferences.

18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /rules/umf.dk.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules.schema.json", 3 | "umf.dk": { 4 | "detectors": [ 5 | { 6 | "presentMatcher": { 7 | "parent": null, 8 | "target": { 9 | "selector": "#portal-cookieoptout" 10 | }, 11 | "type": "css" 12 | }, 13 | "showingMatcher": { 14 | "parent": null, 15 | "target": { 16 | "selector": "#portal-cookieoptout" 17 | }, 18 | "type": "css" 19 | } 20 | } 21 | ], 22 | "methods": [ 23 | { 24 | "action": { 25 | "consents": [ 26 | { 27 | "falseAction": { 28 | "target": { 29 | "selector": "#portal-cookieoptout a[href='./#cookieoptout']" 30 | }, 31 | "type": "click" 32 | }, 33 | "trueAction": { 34 | "target": { 35 | "selector": "#portal-cookieoptout a[href='./#cookieoptin']" 36 | }, 37 | "type": "click" 38 | }, 39 | "type": "B" 40 | } 41 | ], 42 | "type": "consent" 43 | }, 44 | "name": "DO_CONSENT" 45 | } 46 | ] 47 | } 48 | } -------------------------------------------------------------------------------- /rules/sourcepoint.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules.schema.json", 3 | "sourcepoint": { 4 | "detectors": [ 5 | { 6 | "presentMatcher": { 7 | "parent": null, 8 | "target": { 9 | "selector": "[class^='sp_message_container']" 10 | }, 11 | "type": "css" 12 | }, 13 | "showingMatcher": { 14 | "parent": null, 15 | "target": { 16 | "selector": "[class^='sp_message_container']" 17 | }, 18 | "type": "css" 19 | } 20 | } 21 | ], 22 | "methods": [ 23 | { 24 | "action": { 25 | "parent": null, 26 | "target": { 27 | "selector": "[class^='sp_message_container'] button", 28 | "textFilter": [ 29 | "Consent", 30 | "Options" 31 | ] 32 | }, 33 | "type": "click" 34 | }, 35 | "name": "UTILITY" 36 | } 37 | ] 38 | } 39 | } -------------------------------------------------------------------------------- /Extension/minimize.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /rules/mitid.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules.schema.json", 3 | "mitid": { 4 | "detectors": [ 5 | { 6 | "presentMatcher": [ 7 | { 8 | "type": "css", 9 | "target": { 10 | "selector": "#mitid-shared--cookie-warning-popup-modal-wrapper" 11 | } 12 | } 13 | ], 14 | "showingMatcher": [ 15 | { 16 | "type": "css", 17 | "target": { 18 | "selector": "#mitid-shared--cookie-warning-popup-modal-wrapper", 19 | "displayFilter": true 20 | } 21 | } 22 | ] 23 | } 24 | ], 25 | "methods": [ 26 | { 27 | "action": { 28 | "type": "hide", 29 | "target": { 30 | "selector": "#mitid-shared--cookie-warning-popup-modal-wrapper, #mitid-shared--cookie-warning-popup-overlay" 31 | } 32 | }, 33 | "name": "HIDE_CMP" 34 | }, 35 | { 36 | "name": "OPEN_OPTIONS" 37 | }, 38 | { 39 | "action": { 40 | "type": "click", 41 | "target": { 42 | "selector": "#button-accept-cookie-policy" 43 | } 44 | }, 45 | "name": "DO_CONSENT" 46 | }, 47 | { 48 | "name": "SAVE_CONSENT" 49 | }, 50 | { 51 | "name": "UTILITY" 52 | } 53 | ] 54 | } 55 | } -------------------------------------------------------------------------------- /Extension/editor/js/utils.js: -------------------------------------------------------------------------------- 1 | import Language from "../../Language.js"; 2 | 3 | /** 4 | * Replaces the given node with a clone of the node, effectively clearing all event listeners. 5 | * @param {HTMLElement} node 6 | */ 7 | export function replaceNodeWithClone(node) { 8 | let clone = node.cloneNode(true); 9 | node.parentNode.replaceChild(clone, node); 10 | return clone; 11 | } 12 | 13 | export async function loadTemplate(id) { 14 | let response = await fetch("./templates.html"); 15 | let text = await response.text(); 16 | 17 | let parser = new DOMParser(); 18 | let dom = parser.parseFromString(text, "text/html"); 19 | 20 | let fragment = document.importNode(dom.querySelector("#"+id).content, true); 21 | 22 | let newFragment = document.createDocumentFragment(); 23 | 24 | let i = 0; 25 | 26 | Array.from(fragment.children).forEach((child)=>{ 27 | newFragment.appendChild(child); 28 | i++; 29 | }); 30 | 31 | if(i > 1) { 32 | console.error("More than 1 child!"); 33 | } 34 | 35 | Language.doAttributes(newFragment); 36 | Language.doLanguage(newFragment); 37 | 38 | return newFragment.children[0]; 39 | } 40 | 41 | async function fetchJson(url) { 42 | let response = await fetch(url); 43 | let json = await response.json(); 44 | return json; 45 | } 46 | 47 | export function switchView(step) { 48 | document.querySelector("body").setAttribute("data-view", step); 49 | } 50 | -------------------------------------------------------------------------------- /rules/azofreeware.com.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules.schema.json", 3 | "azofreeware.com": { 4 | "detectors": [ 5 | { 6 | "presentMatcher": [ 7 | { 8 | "type": "css", 9 | "target": { 10 | "selector": "#cookieChoiceInfo" 11 | } 12 | } 13 | ], 14 | "showingMatcher": [ 15 | { 16 | "type": "css", 17 | "target": { 18 | "selector": "#cookieChoiceInfo" 19 | } 20 | } 21 | ] 22 | } 23 | ], 24 | "methods": [ 25 | { 26 | "name": "HIDE_CMP" 27 | }, 28 | { 29 | "name": "OPEN_OPTIONS" 30 | }, 31 | { 32 | "name": "DO_CONSENT" 33 | }, 34 | { 35 | "action": { 36 | "type": "click", 37 | "target": { 38 | "selector": "#cookieChoiceDismiss" 39 | } 40 | }, 41 | "name": "SAVE_CONSENT" 42 | }, 43 | { 44 | "name": "UTILITY" 45 | } 46 | ] 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /Extension/Detector.js: -------------------------------------------------------------------------------- 1 | import {Matcher} from "./Matcher.js"; 2 | 3 | export default class Detector { 4 | constructor(config) { 5 | this.config = config; 6 | 7 | this.presentMatchers = []; 8 | this.showingMatchers = []; 9 | 10 | if(!Array.isArray(this.config.presentMatcher)) { 11 | this.config.presentMatcher = [this.config.presentMatcher]; 12 | } 13 | if(!Array.isArray(this.config.showingMatcher)) { 14 | this.config.showingMatcher = [this.config.showingMatcher]; 15 | } 16 | 17 | this.config.presentMatcher.forEach((matcher)=>{ 18 | if(matcher != null) { 19 | this.presentMatchers.push(Matcher.createMatcher(matcher)); 20 | } 21 | }); 22 | this.config.showingMatcher.forEach((matcher)=>{ 23 | if(matcher != null) { 24 | this.showingMatchers.push(Matcher.createMatcher(matcher)); 25 | } 26 | }); 27 | } 28 | 29 | detect() { 30 | if(this.presentMatchers.length === 0) { 31 | return false; 32 | } 33 | 34 | return this.presentMatchers.every((matcher)=>{ 35 | return matcher.matches(); 36 | }); 37 | } 38 | 39 | isShowing() { 40 | if(this.showingMatchers.length === 0) { 41 | return true; 42 | } 43 | 44 | return this.showingMatchers.every((matcher)=>{ 45 | return matcher.matches(); 46 | }); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /rules/google_eomdialog.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules.schema.json", 3 | "google_eomdialog": { 4 | "detectors": [ 5 | { 6 | "presentMatcher": [ 7 | { 8 | "type": "css", 9 | "target": { 10 | "selector": ".eom-dialog-container .eom-dialog" 11 | } 12 | } 13 | ], 14 | "showingMatcher": [ 15 | { 16 | "type": "css", 17 | "target": { 18 | "selector": ".eom-dialog-container .eom-dialog" 19 | } 20 | } 21 | ] 22 | } 23 | ], 24 | "methods": [ 25 | { 26 | "name": "HIDE_CMP" 27 | }, 28 | { 29 | "name": "OPEN_OPTIONS" 30 | }, 31 | { 32 | "name": "DO_CONSENT" 33 | }, 34 | { 35 | "name": "SAVE_CONSENT" 36 | }, 37 | { 38 | "action": { 39 | "type": "click", 40 | "target": { 41 | "selector": ".eom-dialog .eom-customize a" 42 | } 43 | }, 44 | "name": "UTILITY" 45 | } 46 | ] 47 | } 48 | } -------------------------------------------------------------------------------- /rules/rusal.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules.schema.json", 3 | "rusal": { 4 | "detectors": [ 5 | { 6 | "presentMatcher": [ 7 | { 8 | "type": "css", 9 | "target": { 10 | "selector": ".cookie[data-cookie='']" 11 | } 12 | } 13 | ], 14 | "showingMatcher": [ 15 | { 16 | "type": "css", 17 | "target": { 18 | "selector": ".cookie[data-cookie='']", 19 | "displayFilter": true 20 | } 21 | } 22 | ] 23 | } 24 | ], 25 | "methods": [ 26 | { 27 | "name": "HIDE_CMP" 28 | }, 29 | { 30 | "name": "OPEN_OPTIONS" 31 | }, 32 | { 33 | "name": "DO_CONSENT" 34 | }, 35 | { 36 | "action": { 37 | "type": "click", 38 | "target": { 39 | "selector": "[data-cookie-close]" 40 | } 41 | }, 42 | "name": "SAVE_CONSENT" 43 | }, 44 | { 45 | "name": "UTILITY" 46 | } 47 | ] 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /rules/gov.ukopen.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules.schema.json", 3 | "gov.ukopen": { 4 | "detectors": [ 5 | { 6 | "presentMatcher": [ 7 | { 8 | "type": "css", 9 | "target": { 10 | "selector": ".govuk-cookie-banner" 11 | } 12 | } 13 | ], 14 | "showingMatcher": [ 15 | { 16 | "type": "css", 17 | "target": { 18 | "selector": ".govuk-cookie-banner", 19 | "displayFilter": true 20 | } 21 | } 22 | ] 23 | } 24 | ], 25 | "methods": [ 26 | { 27 | "name": "HIDE_CMP" 28 | }, 29 | { 30 | "action": { 31 | "type": "click", 32 | "target": { 33 | "selector": "[href='/help/cookies']" 34 | } 35 | }, 36 | "name": "OPEN_OPTIONS" 37 | }, 38 | { 39 | "name": "DO_CONSENT" 40 | }, 41 | { 42 | "name": "SAVE_CONSENT" 43 | }, 44 | { 45 | "name": "UTILITY" 46 | } 47 | ] 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /rules/Flightaware.com.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules.schema.json", 3 | "Flightaware.com": { 4 | "detectors": [ 5 | { 6 | "presentMatcher": [ 7 | { 8 | "type": "css", 9 | "target": { 10 | "selector": "#cookieDisclaimerContainer" 11 | } 12 | } 13 | ], 14 | "showingMatcher": [ 15 | { 16 | "type": "css", 17 | "target": { 18 | "selector": "#cookieDisclaimerContainer", 19 | "displayFilter": true 20 | } 21 | } 22 | ] 23 | } 24 | ], 25 | "methods": [ 26 | { 27 | "name": "HIDE_CMP" 28 | }, 29 | { 30 | "name": "OPEN_OPTIONS" 31 | }, 32 | { 33 | "name": "DO_CONSENT" 34 | }, 35 | { 36 | "action": { 37 | "type": "click", 38 | "target": { 39 | "selector": "#cookieDisclaimerButtonText" 40 | } 41 | }, 42 | "name": "SAVE_CONSENT" 43 | }, 44 | { 45 | "name": "UTILITY" 46 | } 47 | ] 48 | } 49 | } -------------------------------------------------------------------------------- /rules/yahoo_popup.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules.schema.json", 3 | "yahoo_popup": { 4 | "detectors": [ 5 | { 6 | "presentMatcher": [ 7 | { 8 | "type": "css", 9 | "target": { 10 | "selector": "#consent-page .con-wizard .consent-text", 11 | "textFilter": "Yahoo" 12 | } 13 | } 14 | ], 15 | "showingMatcher": [ 16 | { 17 | "type": "css", 18 | "target": { 19 | "selector": "#consent-page a.manage-settings" 20 | } 21 | } 22 | ] 23 | } 24 | ], 25 | "methods": [ 26 | { 27 | "name": "HIDE_CMP" 28 | }, 29 | { 30 | "action": { 31 | "type": "click", 32 | "target": { 33 | "selector": "#consent-page a.manage-settings" 34 | } 35 | }, 36 | "name": "OPEN_OPTIONS" 37 | }, 38 | { 39 | "name": "DO_CONSENT" 40 | }, 41 | { 42 | "name": "SAVE_CONSENT" 43 | }, 44 | { 45 | "name": "UTILITY" 46 | } 47 | ] 48 | } 49 | } -------------------------------------------------------------------------------- /rules/koboopen.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules.schema.json", 3 | "koboopen": { 4 | "detectors": [ 5 | { 6 | "presentMatcher": [ 7 | { 8 | "type": "css", 9 | "target": { 10 | "selector": ".gdpr-consent-wrap .cookie-consent-header" 11 | } 12 | } 13 | ], 14 | "showingMatcher": [ 15 | { 16 | "type": "css", 17 | "target": { 18 | "selector": ".gdpr-consent-wrap .cookie-consent-header", 19 | "displayFilter": true 20 | } 21 | } 22 | ] 23 | } 24 | ], 25 | "methods": [ 26 | { 27 | "name": "HIDE_CMP" 28 | }, 29 | { 30 | "name": "OPEN_OPTIONS" 31 | }, 32 | { 33 | "name": "DO_CONSENT" 34 | }, 35 | { 36 | "name": "SAVE_CONSENT" 37 | }, 38 | { 39 | "action": { 40 | "type": "click", 41 | "target": { 42 | "selector": ".view-privacy-button" 43 | } 44 | }, 45 | "name": "UTILITY" 46 | } 47 | ] 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /rules/whatsapp.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules.schema.json", 3 | "whatsapp": { 4 | "detectors": [ 5 | { 6 | "presentMatcher": [ 7 | { 8 | "type": "css", 9 | "target": { 10 | "selector": "[data-testid='wa_cookies_banner_modal']" 11 | } 12 | } 13 | ], 14 | "showingMatcher": [ 15 | { 16 | "type": "css", 17 | "target": { 18 | "selector": "[data-testid='wa_cookies_banner_modal']", 19 | "displayFilter": true 20 | } 21 | } 22 | ] 23 | } 24 | ], 25 | "methods": [ 26 | { 27 | "name": "HIDE_CMP" 28 | }, 29 | { 30 | "name": "OPEN_OPTIONS" 31 | }, 32 | { 33 | "name": "DO_CONSENT" 34 | }, 35 | { 36 | "action": { 37 | "type": "click", 38 | "target": { 39 | "selector": "[data-cookiebanner='accept_button']" 40 | } 41 | }, 42 | "name": "SAVE_CONSENT" 43 | }, 44 | { 45 | "name": "UTILITY" 46 | } 47 | ] 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /rules/hetzner.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules.schema.json", 3 | "hetzner": { 4 | "detectors": [ 5 | { 6 | "presentMatcher": [ 7 | { 8 | "type": "css", 9 | "target": { 10 | "selector": "#CookieConsent .modal-content .modal-header" 11 | } 12 | } 13 | ], 14 | "showingMatcher": [ 15 | { 16 | "type": "css", 17 | "target": { 18 | "selector": "#CookieConsent", 19 | "displayFilter": true 20 | } 21 | } 22 | ] 23 | } 24 | ], 25 | "methods": [ 26 | { 27 | "name": "HIDE_CMP" 28 | }, 29 | { 30 | "name": "OPEN_OPTIONS" 31 | }, 32 | { 33 | "name": "DO_CONSENT" 34 | }, 35 | { 36 | "action": { 37 | "type": "click", 38 | "target": { 39 | "selector": "#CookieConsentDeclined", 40 | "displayFilter": true 41 | } 42 | }, 43 | "name": "SAVE_CONSENT" 44 | }, 45 | { 46 | "name": "UTILITY" 47 | } 48 | ] 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /rules/google_consentdomain_1.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules.schema.json", 3 | "google_consentdomain_1": { 4 | "detectors": [ 5 | { 6 | "presentMatcher": [ 7 | { 8 | "type": "url", 9 | "url": [ 10 | "consent.google.com" 11 | ] 12 | } 13 | ], 14 | "showingMatcher": [ 15 | { 16 | "type": "css", 17 | "target": { 18 | "selector": ".contentText", 19 | "textFilter": [ 20 | "cookies" 21 | ] 22 | } 23 | } 24 | ] 25 | } 26 | ], 27 | "methods": [ 28 | { 29 | "name": "HIDE_CMP" 30 | }, 31 | { 32 | "name": "OPEN_OPTIONS" 33 | }, 34 | { 35 | "name": "DO_CONSENT" 36 | }, 37 | { 38 | "name": "SAVE_CONSENT" 39 | }, 40 | { 41 | "action": { 42 | "type": "click", 43 | "target": { 44 | "selector": ".customButtonContainer .basebutton" 45 | } 46 | }, 47 | "name": "UTILITY" 48 | } 49 | ] 50 | } 51 | } -------------------------------------------------------------------------------- /rules/onetrust_hidden.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules.schema.json", 3 | "onetrust_hidden": { 4 | "detectors": [ 5 | { 6 | "presentMatcher": [ 7 | { 8 | "type": "css", 9 | "target": { 10 | "selector": ".optanon-toggle-display:not([data-m*='footer_privacysettings']):not([class*='PageFooterdesktop'])" 11 | } 12 | } 13 | ], 14 | "showingMatcher": [ 15 | { 16 | "type": "css", 17 | "target": { 18 | "selector": ".optanon-toggle-display:not([data-m*='footer_privacysettings']):not([class*='PageFooterdesktop'])", 19 | "displayFilter": true 20 | } 21 | } 22 | ] 23 | } 24 | ], 25 | "methods": [ 26 | { 27 | "name": "HIDE_CMP" 28 | }, 29 | { 30 | "name": "OPEN_OPTIONS" 31 | }, 32 | { 33 | "name": "DO_CONSENT" 34 | }, 35 | { 36 | "name": "SAVE_CONSENT" 37 | }, 38 | { 39 | "action": { 40 | "type": "click", 41 | "target": { 42 | "selector": ".optanon-toggle-display" 43 | } 44 | }, 45 | "name": "UTILITY" 46 | } 47 | ] 48 | } 49 | } -------------------------------------------------------------------------------- /rules/phpipam.net.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules.schema.json", 3 | "phpipam.net": { 4 | "detectors": [ 5 | { 6 | "presentMatcher": [ 7 | { 8 | "type": "css", 9 | "target": { 10 | "selector": ".container.cookies" 11 | }, 12 | "parent": { 13 | "selector": "#cookie" 14 | } 15 | } 16 | ], 17 | "showingMatcher": [ 18 | { 19 | "type": "css", 20 | "target": { 21 | "selector": ".container.cookies" 22 | }, 23 | "parent": { 24 | "selector": "#cookie" 25 | } 26 | } 27 | ] 28 | } 29 | ], 30 | "methods": [ 31 | { 32 | "name": "HIDE_CMP" 33 | }, 34 | { 35 | "name": "OPEN_OPTIONS" 36 | }, 37 | { 38 | "name": "DO_CONSENT" 39 | }, 40 | { 41 | "action": { 42 | "type": "click", 43 | "target": { 44 | "selector": "#cAgree" 45 | } 46 | }, 47 | "name": "SAVE_CONSENT" 48 | }, 49 | { 50 | "name": "UTILITY" 51 | } 52 | ] 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /rules/thenextwebopen.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules.schema.json", 3 | "thenextwebopen": { 4 | "detectors": [ 5 | { 6 | "presentMatcher": [ 7 | { 8 | "type": "css", 9 | "target": { 10 | "selector": "#cookie-consent-banner" 11 | } 12 | } 13 | ], 14 | "showingMatcher": [ 15 | { 16 | "type": "css", 17 | "target": { 18 | "selector": ".cookie-consent-banner__btn-wrap" 19 | }, 20 | "parent": { 21 | "selector": "#cookie-consent-banner", 22 | "displayFilter": true 23 | } 24 | } 25 | ] 26 | } 27 | ], 28 | "methods": [ 29 | { 30 | "name": "HIDE_CMP" 31 | }, 32 | { 33 | "name": "OPEN_OPTIONS" 34 | }, 35 | { 36 | "name": "DO_CONSENT" 37 | }, 38 | { 39 | "name": "SAVE_CONSENT" 40 | }, 41 | { 42 | "action": { 43 | "type": "click", 44 | "target": { 45 | "selector": ".cookie-consent-banner__btn-secondary" 46 | } 47 | }, 48 | "name": "UTILITY" 49 | } 50 | ] 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /Extension/popup.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 |
14 |
15 |
[[AUTOFILL_NOT_WORKING]]
16 |
17 | 18 |
19 |
20 |
21 |
[[KEEP_RUNNING]]
22 | 23 |
24 |
25 | 26 |
27 |
28 |
29 | 40 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /xcode/Shared (App)/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "AppIcon.png", 5 | "idiom" : "universal", 6 | "platform" : "ios", 7 | "size" : "1024x1024" 8 | }, 9 | { 10 | "filename" : "icon_16x16.png", 11 | "idiom" : "mac", 12 | "scale" : "1x", 13 | "size" : "16x16" 14 | }, 15 | { 16 | "filename" : "icon_16x16@2x.png", 17 | "idiom" : "mac", 18 | "scale" : "2x", 19 | "size" : "16x16" 20 | }, 21 | { 22 | "filename" : "icon_32x32.png", 23 | "idiom" : "mac", 24 | "scale" : "1x", 25 | "size" : "32x32" 26 | }, 27 | { 28 | "filename" : "icon_32x32@2x.png", 29 | "idiom" : "mac", 30 | "scale" : "2x", 31 | "size" : "32x32" 32 | }, 33 | { 34 | "filename" : "icon_128x128.png", 35 | "idiom" : "mac", 36 | "scale" : "1x", 37 | "size" : "128x128" 38 | }, 39 | { 40 | "filename" : "icon_128x128@2x.png", 41 | "idiom" : "mac", 42 | "scale" : "2x", 43 | "size" : "128x128" 44 | }, 45 | { 46 | "filename" : "icon_256x256.png", 47 | "idiom" : "mac", 48 | "scale" : "1x", 49 | "size" : "256x256" 50 | }, 51 | { 52 | "filename" : "icon_256x256@2x.png", 53 | "idiom" : "mac", 54 | "scale" : "2x", 55 | "size" : "256x256" 56 | }, 57 | { 58 | "filename" : "icon_512x512.png", 59 | "idiom" : "mac", 60 | "scale" : "1x", 61 | "size" : "512x512" 62 | }, 63 | { 64 | "filename" : "icon_512x512@2x.png", 65 | "idiom" : "mac", 66 | "scale" : "2x", 67 | "size" : "512x512" 68 | } 69 | ], 70 | "info" : { 71 | "author" : "xcode", 72 | "version" : 1 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /rules/hampshirepoliceopen.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules.schema.json", 3 | "hampshire.policeopen": { 4 | "detectors": [ 5 | { 6 | "presentMatcher": [ 7 | { 8 | "type": "css", 9 | "target": { 10 | "selector": "#js-cookie-consent-banner" 11 | } 12 | } 13 | ], 14 | "showingMatcher": [ 15 | { 16 | "type": "css", 17 | "target": { 18 | "selector": "#js-cookie-consent-banner", 19 | "displayFilter": true 20 | } 21 | } 22 | ] 23 | } 24 | ], 25 | "methods": [ 26 | { 27 | "name": "HIDE_CMP" 28 | }, 29 | { 30 | "name": "OPEN_OPTIONS" 31 | }, 32 | { 33 | "name": "DO_CONSENT" 34 | }, 35 | { 36 | "name": "SAVE_CONSENT" 37 | }, 38 | { 39 | "action": { 40 | "type": "ifcss", 41 | "target": { 42 | "selector": "#js-functional-cookie-manager" 43 | }, 44 | "falseAction": { 45 | "type": "click", 46 | "target": { 47 | "selector": "#cookie-close-button" 48 | } 49 | } 50 | }, 51 | "name": "UTILITY" 52 | } 53 | ] 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /rules/ikea_toast.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules.schema.json", 3 | "ikeaToast": { 4 | "detectors": [ 5 | { 6 | "presentMatcher": { 7 | "target": { 8 | "selector": "[data-widget='cookie-dialog'].toast" 9 | }, 10 | "type": "css" 11 | }, 12 | "showingMatcher": { 13 | "target": { 14 | "displayFilter": true, 15 | "selector": "[data-widget='cookie-dialog'].toast" 16 | }, 17 | "type": "css" 18 | } 19 | } 20 | ], 21 | "methods": [ 22 | { 23 | "action": { 24 | "actions": [ 25 | { 26 | "openInTab": true, 27 | "target": { 28 | "selector": "[data-widget='cookie-dialog'].toast .toast__privacy-link", 29 | "textFilter": [ 30 | "Cookie and privacy statement" 31 | ] 32 | }, 33 | "type": "click" 34 | }, 35 | { 36 | "target": { 37 | "selector": "[data-widget='cookie-dialog'].toast .toast__close" 38 | }, 39 | "type": "click" 40 | } 41 | ], 42 | "type": "list" 43 | }, 44 | "name": "OPEN_OPTIONS" 45 | } 46 | ] 47 | } 48 | } -------------------------------------------------------------------------------- /rules/linkedin_popup.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules.schema.json", 3 | "linkedin_popup": { 4 | "detectors": [ 5 | { 6 | "presentMatcher": [ 7 | { 8 | "type": "css", 9 | "target": { 10 | "selector": "div[type=\"COOKIE_CONSENT\"]" 11 | } 12 | } 13 | ], 14 | "showingMatcher": [ 15 | { 16 | "type": "css", 17 | "target": { 18 | "selector": "div[type=\"COOKIE_CONSENT\"]", 19 | "displayFilter": true 20 | } 21 | } 22 | ] 23 | } 24 | ], 25 | "methods": [ 26 | { 27 | "name": "HIDE_CMP" 28 | }, 29 | { 30 | "name": "OPEN_OPTIONS" 31 | }, 32 | { 33 | "name": "DO_CONSENT" 34 | }, 35 | { 36 | "name": "SAVE_CONSENT" 37 | }, 38 | { 39 | "action": { 40 | "type": "click", 41 | "target": { 42 | "selector": "[data-tracking-control-name*=\"global-alerts-alert-link-cta\"]", 43 | "textFilter": [ 44 | "settings" 45 | ] 46 | }, 47 | "parent": { 48 | "selector": "div[type=\"COOKIE_CONSENT\"]" 49 | } 50 | }, 51 | "name": "UTILITY" 52 | } 53 | ] 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /rules/paypal_banner.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules.schema.json", 3 | "paypal_banner": { 4 | "detectors": [ 5 | { 6 | "presentMatcher": [ 7 | { 8 | "type": "css", 9 | "target": { 10 | "selector": "#gdprCookieBanner #manageCookiesLink" 11 | } 12 | } 13 | ], 14 | "showingMatcher": [ 15 | { 16 | "type": "css", 17 | "target": { 18 | "selector": "#gdprCookieBanner #manageCookiesLink" 19 | } 20 | } 21 | ] 22 | } 23 | ], 24 | "methods": [ 25 | { 26 | "name": "HIDE_CMP" 27 | }, 28 | { 29 | "name": "OPEN_OPTIONS" 30 | }, 31 | { 32 | "name": "DO_CONSENT" 33 | }, 34 | { 35 | "name": "SAVE_CONSENT" 36 | }, 37 | { 38 | "action": { 39 | "type": "ifallownone", 40 | "trueAction": { 41 | "type": "click", 42 | "target": { 43 | "selector": "#gdprCookieBanner #bannerDeclineButton" 44 | } 45 | }, 46 | "falseAction": { 47 | "type": "click", 48 | "target": { 49 | "selector": "#gdprCookieBanner #manageCookiesLink" 50 | } 51 | } 52 | }, 53 | "name": "UTILITY" 54 | } 55 | ] 56 | } 57 | } -------------------------------------------------------------------------------- /rules/sundhed.dk.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules.schema.json", 3 | "Sundhed.dk": { 4 | "detectors": [ 5 | { 6 | "presentMatcher": [ 7 | { 8 | "type": "css", 9 | "target": { 10 | "selector": "sdk-layout-main-cookiebox" 11 | } 12 | } 13 | ], 14 | "showingMatcher": [ 15 | { 16 | "type": "css", 17 | "target": { 18 | "selector": ".cookie-box", 19 | "displayFilter": true 20 | } 21 | } 22 | ] 23 | } 24 | ], 25 | "methods": [ 26 | { 27 | "name": "HIDE_CMP" 28 | }, 29 | { 30 | "name": "OPEN_OPTIONS" 31 | }, 32 | { 33 | "name": "DO_CONSENT" 34 | }, 35 | { 36 | "action": { 37 | "type": "ifallowall", 38 | "trueAction": { 39 | "type": "click", 40 | "target": { 41 | "selector": "[ng-click='vm.acceptCookie()']" 42 | } 43 | }, 44 | "falseAction": { 45 | "type": "click", 46 | "target": { 47 | "selector": "[ng-click='vm.rejectCookie()']" 48 | } 49 | } 50 | }, 51 | "name": "SAVE_CONSENT" 52 | }, 53 | { 54 | "name": "UTILITY" 55 | } 56 | ] 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /rules/instagram.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules.schema.json", 3 | "Instagram": { 4 | "detectors": [ 5 | { 6 | "presentMatcher": [ 7 | { 8 | "type": "css", 9 | "target": { 10 | "selector": ".x1qjc9v5.x9f619.x78zum5.xdt5ytf.x1iyjqo2.xl56j7k" 11 | } 12 | } 13 | ], 14 | "showingMatcher": [ 15 | { 16 | "type": "css", 17 | "target": { 18 | "selector": ".x1qjc9v5.x9f619.x78zum5.xdt5ytf.x1iyjqo2.xl56j7k", 19 | "displayFilter": true 20 | } 21 | } 22 | ] 23 | } 24 | ], 25 | "methods": [ 26 | { 27 | "name": "HIDE_CMP" 28 | }, 29 | { 30 | "name": "OPEN_OPTIONS" 31 | }, 32 | { 33 | "name": "DO_CONSENT" 34 | }, 35 | { 36 | "action": { 37 | "type": "ifallowall", 38 | "trueAction": { 39 | "type": "click", 40 | "target": { 41 | "selector": "._a9--._a9_0" 42 | } 43 | }, 44 | "falseAction": { 45 | "type": "click", 46 | "target": { 47 | "selector": "._a9--._a9_1" 48 | } 49 | } 50 | }, 51 | "name": "SAVE_CONSENT" 52 | }, 53 | { 54 | "name": "UTILITY" 55 | } 56 | ] 57 | } 58 | } -------------------------------------------------------------------------------- /rules/nordpoolgroupopen.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules.schema.json", 3 | "nordpoolgroupopen": { 4 | "detectors": [ 5 | { 6 | "presentMatcher": [ 7 | { 8 | "type": "css", 9 | "target": { 10 | "selector": "#cookie-consent[ng-controller='CookieConsentKitController as cookieConsentCtrl']" 11 | } 12 | } 13 | ], 14 | "showingMatcher": [ 15 | { 16 | "type": "css", 17 | "target": { 18 | "selector": "#cookie-consent[ng-controller='CookieConsentKitController as cookieConsentCtrl']", 19 | "displayFilter": true 20 | } 21 | } 22 | ] 23 | } 24 | ], 25 | "methods": [ 26 | { 27 | "name": "HIDE_CMP" 28 | }, 29 | { 30 | "name": "OPEN_OPTIONS" 31 | }, 32 | { 33 | "name": "DO_CONSENT" 34 | }, 35 | { 36 | "name": "SAVE_CONSENT" 37 | }, 38 | { 39 | "action": { 40 | "type": "ifcss", 41 | "target": { 42 | "selector": "[ng-controller='CookieConsentKitController as cookieConsentCtrl'][id='main-content']" 43 | }, 44 | "falseAction": { 45 | "type": "click", 46 | "target": { 47 | "selector": "a[href]" 48 | } 49 | } 50 | }, 51 | "name": "UTILITY" 52 | } 53 | ] 54 | } 55 | } -------------------------------------------------------------------------------- /rules/opensuchenmobile.de.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules.schema.json", 3 | "opensuchenmobile.de": { 4 | "detectors": [ 5 | { 6 | "presentMatcher": [ 7 | { 8 | "type": "css", 9 | "target": { 10 | "selector": "#mde-consent-modal-container" 11 | } 12 | } 13 | ], 14 | "showingMatcher": [ 15 | { 16 | "type": "css", 17 | "target": { 18 | "selector": "#mde-consent-modal-container", 19 | "displayFilter": true 20 | } 21 | } 22 | ] 23 | } 24 | ], 25 | "methods": [ 26 | { 27 | "name": "HIDE_CMP" 28 | }, 29 | { 30 | "name": "OPEN_OPTIONS" 31 | }, 32 | { 33 | "name": "DO_CONSENT" 34 | }, 35 | { 36 | "name": "SAVE_CONSENT" 37 | }, 38 | { 39 | "action": { 40 | "type": "ifallowall", 41 | "trueAction": { 42 | "type": "click", 43 | "target": { 44 | "selector": ".mde-consent-accept-btn" 45 | } 46 | }, 47 | "falseAction": { 48 | "type": "click", 49 | "target": { 50 | "selector": ".sc-bczRLJ.sc-gsnTZi.iBneUr.hteZdj" 51 | } 52 | } 53 | }, 54 | "name": "UTILITY" 55 | } 56 | ] 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /rules/trustarc_bar.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules.schema.json", 3 | "trustarcbar": { 4 | "detectors": [ 5 | { 6 | "presentMatcher": [ 7 | { 8 | "type": "css", 9 | "target": { 10 | "selector": "#truste-consent-content, .truste-consent-content, #truste-consent-track" 11 | } 12 | } 13 | ], 14 | "showingMatcher": [ 15 | { 16 | "type": "css", 17 | "target": { 18 | "selector": "#truste-consent-content, .truste-consent-content, #truste-consent-track" 19 | } 20 | } 21 | ] 22 | } 23 | ], 24 | "methods": [ 25 | { 26 | "action": { 27 | "type": "list", 28 | "actions": [ 29 | { 30 | "type": "waitcss", 31 | "target": { 32 | "selector": "#truste-show-consent, #truste-show-consent_", 33 | "displayFilter": true 34 | }, 35 | "retries": 50, 36 | "waitTime": 50 37 | }, 38 | { 39 | "type": "click", 40 | "target": { 41 | "selector": "#truste-show-consent, #truste-show-consent_" 42 | } 43 | } 44 | ] 45 | }, 46 | "name": "UTILITY" 47 | }, 48 | { 49 | "name": "HIDE_CMP" 50 | }, 51 | { 52 | "name": "OPEN_OPTIONS" 53 | }, 54 | { 55 | "name": "DO_CONSENT" 56 | }, 57 | { 58 | "name": "SAVE_CONSENT" 59 | } 60 | ] 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /rules/dpgmedia.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules.schema.json", 3 | "dpgmedia": { 4 | "detectors": [ 5 | { 6 | "presentMatcher": [ 7 | { 8 | "type": "css", 9 | "target": { 10 | "selector": "#pg-modal" 11 | }, 12 | "parent": { 13 | "selector": "#pg-shadow-host" 14 | } 15 | } 16 | ], 17 | "showingMatcher": [ 18 | { 19 | "type": "css", 20 | "target": { 21 | "selector": "#pg-modal" 22 | }, 23 | "parent": { 24 | "selector": "#pg-shadow-host" 25 | } 26 | } 27 | ] 28 | } 29 | ], 30 | "methods": [ 31 | { 32 | "name": "HIDE_CMP" 33 | }, 34 | { 35 | "name": "OPEN_OPTIONS", 36 | "action": { 37 | "type": "click", 38 | "target": { 39 | "selector": "#pg-modal #pg-first-layer #pg-footer #pg-configure-btn" 40 | }, 41 | "parent": { 42 | "selector": "#pg-shadow-host" 43 | } 44 | } 45 | }, 46 | { 47 | "name": "DO_CONSENT" 48 | }, 49 | { 50 | "name": "SAVE_CONSENT", 51 | "action": { 52 | "type": "click", 53 | "target": { 54 | "selector": "#pg-modal #pg-second-layer #pg-footer #pg-reject-btn" 55 | }, 56 | "parent": { 57 | "selector": "#pg-shadow-host" 58 | } 59 | } 60 | }, 61 | { 62 | "name": "UTILITY" 63 | } 64 | ] 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /rules/facebook.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules.schema.json", 3 | "Facebook": { 4 | "detectors": [ 5 | { 6 | "presentMatcher": [ 7 | { 8 | "type": "css", 9 | "target": { 10 | "selector": "[data-testid=\"cookie-policy-manage-dialog\"]" 11 | } 12 | } 13 | ], 14 | "showingMatcher": [ 15 | { 16 | "type": "css", 17 | "target": { 18 | "selector": "[data-testid=\"cookie-policy-manage-dialog\"]", 19 | "displayFilter": true 20 | } 21 | } 22 | ] 23 | } 24 | ], 25 | "methods": [ 26 | { 27 | "action": { 28 | "type": "hide", 29 | "target": { 30 | "selector": "[data-testid=\"cookie-policy-manage-dialog\"]" 31 | } 32 | }, 33 | "name": "HIDE_CMP" 34 | }, 35 | { 36 | "name": "OPEN_OPTIONS" 37 | }, 38 | { 39 | "action": { 40 | "type": "ifallowall", 41 | "trueAction": { 42 | "type": "click", 43 | "target": { 44 | "selector": "[data-cookiebanner=\"accept_only_essential_button\"]" 45 | } 46 | }, 47 | "falseAction": { 48 | "type": "click", 49 | "target": { 50 | "selector": "[data-cookiebanner=\"accept_button\"]" 51 | } 52 | } 53 | }, 54 | "name": "DO_CONSENT" 55 | }, 56 | { 57 | "name": "SAVE_CONSENT" 58 | }, 59 | { 60 | "name": "UTILITY" 61 | } 62 | ] 63 | } 64 | } -------------------------------------------------------------------------------- /rules/asus.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules.schema.json", 3 | "Asus": { 4 | "detectors": [ 5 | { 6 | "presentMatcher": [ 7 | { 8 | "type": "css", 9 | "target": { 10 | "selector": "#cookie-policy-info" 11 | } 12 | } 13 | ], 14 | "showingMatcher": [ 15 | { 16 | "type": "css", 17 | "target": { 18 | "selector": "#cookie-policy-info", 19 | "displayFilter": true 20 | } 21 | } 22 | ] 23 | } 24 | ], 25 | "methods": [ 26 | { 27 | "action": { 28 | "type": "hide", 29 | "target": { 30 | "selector": "#cookie-policy-info" 31 | } 32 | }, 33 | "name": "HIDE_CMP" 34 | }, 35 | { 36 | "name": "OPEN_OPTIONS" 37 | }, 38 | { 39 | "name": "DO_CONSENT" 40 | }, 41 | { 42 | "action": { 43 | "type": "ifallowall", 44 | "trueAction": { 45 | "type": "click", 46 | "target": { 47 | "selector": ".btn-asus.btn-ok.btn-read-ck" 48 | }, 49 | "parent": { 50 | "selector": "#cookie-policy-info" 51 | } 52 | }, 53 | "falseAction": { 54 | "type": "click", 55 | "target": { 56 | "selector": ".btn-asus.btn-reject" 57 | }, 58 | "parent": { 59 | "selector": "#cookie-policy-info" 60 | } 61 | } 62 | }, 63 | "name": "SAVE_CONSENT" 64 | }, 65 | { 66 | "name": "UTILITY" 67 | } 68 | ] 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /Extension/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /rules/ameli_connect.fr.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules.schema.json", 3 | "ameli_connect": { 4 | "detectors": [ 5 | { 6 | "presentMatcher": [ 7 | { 8 | "type": "css", 9 | "target": { 10 | "selector": "#pageConsentement" 11 | } 12 | } 13 | ], 14 | "showingMatcher": [ 15 | { 16 | "type": "css", 17 | "target": { 18 | "selector": "#pageConsentement", 19 | "displayFilter": true 20 | } 21 | } 22 | ] 23 | } 24 | ], 25 | "methods": [ 26 | { 27 | "action": { 28 | "type": "hide", 29 | "target": { 30 | "selector": "#pageConsentement" 31 | } 32 | }, 33 | "name": "HIDE_CMP" 34 | }, 35 | { 36 | "action": { 37 | "type": "list", 38 | "actions": [ 39 | { 40 | "type": "consent", 41 | "consents": [ 42 | { 43 | "trueAction": { 44 | "type": "click", 45 | "target": { 46 | "selector": ".consentAccepter" 47 | } 48 | }, 49 | "falseAction": { 50 | "type": "click", 51 | "target": { 52 | "selector": ".consentRefuser" 53 | } 54 | }, 55 | "type": "B" 56 | } 57 | ] 58 | } 59 | ] 60 | }, 61 | "name": "DO_CONSENT" 62 | } 63 | ] 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /rules/lucide.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules.schema.json", 3 | "lucide": { 4 | "detectors": [ 5 | { 6 | "presentMatcher": [ 7 | { 8 | "type": "css", 9 | "target": { 10 | "selector": ".modal.cookie.fade.in#cookieconsent" 11 | } 12 | } 13 | ], 14 | "showingMatcher": [ 15 | { 16 | "type": "css", 17 | "target": { 18 | "selector": ".modal.cookie.fade.in#cookieconsent", 19 | "displayFilter": true 20 | } 21 | } 22 | ] 23 | } 24 | ], 25 | "methods": [ 26 | { 27 | "name": "HIDE_CMP" 28 | }, 29 | { 30 | "name": "OPEN_OPTIONS" 31 | }, 32 | { 33 | "name": "DO_CONSENT" 34 | }, 35 | { 36 | "action": { 37 | "type": "list", 38 | "actions": [ 39 | { 40 | "type": "ifallowall", 41 | "trueAction": { 42 | "type": "click", 43 | "target": { 44 | "selector": "[onclick*='setCookieAcceptType'][onclick*='all']" 45 | } 46 | }, 47 | "falseAction": { 48 | "type": "click", 49 | "target": { 50 | "selector": "[onclick*='setCookieAcceptType'][onclick*='none']" 51 | } 52 | } 53 | }, 54 | { 55 | "type": "click", 56 | "target": { 57 | "selector": "button[aria-label='Close']" 58 | } 59 | } 60 | ] 61 | }, 62 | "name": "SAVE_CONSENT" 63 | }, 64 | { 65 | "name": "UTILITY" 66 | } 67 | ] 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /xcode/Shared (App)/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // Shared (App) 4 | // 5 | // Created by cavi_13pro on 25/01/2022. 6 | // 7 | 8 | import WebKit 9 | 10 | #if os(iOS) 11 | import UIKit 12 | typealias PlatformViewController = UIViewController 13 | #elseif os(macOS) 14 | import Cocoa 15 | import SafariServices 16 | typealias PlatformViewController = NSViewController 17 | #endif 18 | 19 | let extensionBundleIdentifier = "com.github.Consent-O-Matic.Extension" 20 | 21 | class ViewController: PlatformViewController, WKNavigationDelegate, WKScriptMessageHandler { 22 | 23 | @IBOutlet var webView: WKWebView! 24 | 25 | override func viewDidLoad() { 26 | super.viewDidLoad() 27 | 28 | self.webView.navigationDelegate = self 29 | 30 | #if os(iOS) 31 | self.webView.scrollView.isScrollEnabled = false 32 | #endif 33 | 34 | self.webView.configuration.userContentController.add(self, name: "controller") 35 | 36 | self.webView.loadFileURL(Bundle.main.url(forResource: "Main", withExtension: "html")!, allowingReadAccessTo: Bundle.main.resourceURL!) 37 | } 38 | 39 | func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) { 40 | #if os(iOS) 41 | webView.evaluateJavaScript("show('ios')") 42 | #elseif os(macOS) 43 | webView.evaluateJavaScript("show('mac')") 44 | 45 | SFSafariExtensionManager.getStateOfSafariExtension(withIdentifier: extensionBundleIdentifier) { (state, error) in 46 | guard let state = state, error == nil else { 47 | // Insert code to inform the user that something went wrong. 48 | return 49 | } 50 | 51 | DispatchQueue.main.async { 52 | webView.evaluateJavaScript("show('mac', \(state.isEnabled))") 53 | } 54 | } 55 | #endif 56 | } 57 | 58 | func userContentController(_ userContentController: WKUserContentController, didReceive message: WKScriptMessage) { 59 | #if os(macOS) 60 | if (message.body as! String != "open-preferences") { 61 | return; 62 | } 63 | 64 | SFSafariApplication.showPreferencesForExtension(withIdentifier: extensionBundleIdentifier) { error in 65 | guard error == nil else { 66 | // Insert code to inform the user that something went wrong. 67 | return 68 | } 69 | 70 | DispatchQueue.main.async { 71 | NSApplication.shared.terminate(nil) 72 | } 73 | } 74 | #endif 75 | } 76 | 77 | } 78 | -------------------------------------------------------------------------------- /rules/riadaljana.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules.schema.json", 3 | "Riadaljana": { 4 | "detectors": [ 5 | { 6 | "presentMatcher": [ 7 | { 8 | "type": "css", 9 | "target": { 10 | "childFilter": { 11 | "target": { 12 | "selector": ".refuse" 13 | } 14 | }, 15 | "selector": ".content" 16 | }, 17 | "parent": { 18 | "selector": ".cookies" 19 | } 20 | } 21 | ], 22 | "showingMatcher": [ 23 | { 24 | "type": "css", 25 | "target": { 26 | "childFilter": { 27 | "target": { 28 | "selector": ".refuse" 29 | } 30 | }, 31 | "selector": ".content", 32 | "displayFilter": true 33 | }, 34 | "parent": { 35 | "selector": ".cookies" 36 | } 37 | } 38 | ] 39 | } 40 | ], 41 | "methods": [ 42 | { 43 | "name": "HIDE_CMP" 44 | }, 45 | { 46 | "name": "OPEN_OPTIONS" 47 | }, 48 | { 49 | "name": "DO_CONSENT" 50 | }, 51 | { 52 | "action": { 53 | "type": "ifallowall", 54 | "trueAction": { 55 | "type": "click", 56 | "target": { 57 | "selector": ".ok" 58 | } 59 | }, 60 | "falseAction": { 61 | "type": "click", 62 | "target": { 63 | "selector": ".refuse" 64 | } 65 | } 66 | }, 67 | "name": "SAVE_CONSENT" 68 | }, 69 | { 70 | "name": "UTILITY" 71 | } 72 | ] 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- 1 | const HtmlMinimizerPlugin = require("html-minimizer-webpack-plugin"); 2 | const PACKAGE = require('./package.json'); 3 | const ZipPlugin = require('zip-webpack-plugin'); 4 | const CopyPlugin = require("copy-webpack-plugin"); 5 | const path = require('path'); 6 | const glob = require("glob"); 7 | module.exports = env=>({ 8 | mode: 'production', 9 | entry: { 10 | service: ['./Extension/background.js'], 11 | content: [ 12 | './Extension/contentScript.js', 13 | "./Extension/content.scss", 14 | "./Extension/icon_48.png", 15 | "./Extension/icon_96.png", 16 | ...glob.sync(__dirname + "/Extension/*.svg") 17 | ], 18 | ui: [ 19 | './Extension/options.js', 20 | './Extension/popup.js', 21 | './Extension/ui.scss', 22 | ...glob.sync(__dirname + "/Extension/*.html") 23 | ], 24 | editor: [ 25 | ...glob.sync(__dirname + "/Extension/editor/js/*.js"), 26 | './Extension/editor/scss/main.scss', 27 | ...glob.sync(__dirname + "/Extension/editor/*.html") 28 | ] 29 | }, 30 | output: { 31 | publicPath: "", 32 | filename: '[name].js', 33 | path: path.resolve(__dirname, 'build') 34 | }, 35 | module: { 36 | parser: { 37 | javascript: { 38 | exportsPresence: "error", 39 | importExportsPresence: "error" 40 | } 41 | }, 42 | rules: [ 43 | { 44 | test: /\.(png|json|svg|html)/, 45 | type: 'asset/resource', 46 | generator: { 47 | filename: '[name][ext]' 48 | } 49 | }, 50 | { 51 | test: /\.(sc|sa)ss$/i, 52 | type: 'asset/resource', 53 | use: [ 54 | "sass-loader" 55 | ], 56 | generator: { 57 | filename: '[name].css' 58 | } 59 | }, 60 | ] 61 | }, 62 | optimization: { 63 | minimize: true, 64 | minimizer: [ 65 | '...', 66 | new HtmlMinimizerPlugin(), 67 | ], 68 | }, 69 | plugins: [ 70 | new CopyPlugin({patterns: [{ 71 | from: "Extension/manifest." + env.target + ".json", 72 | to: "manifest.json", 73 | force: true, 74 | transform(content, path) { 75 | // Parse the manifest JSON and inject version 76 | const manifest = JSON.parse(content.toString()); 77 | manifest.version = PACKAGE.version; 78 | return JSON.stringify(manifest, null, 2); 79 | } 80 | }]}), 81 | new ZipPlugin({ 82 | path: 'dist/', 83 | filename: PACKAGE.name+"-v"+PACKAGE.version+"-unpacked-release-"+env.target+".zip", 84 | exclude: [/^dist/] 85 | }) 86 | ] 87 | }); -------------------------------------------------------------------------------- /xcode/iOS (App)/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /rules/theVerge.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules.schema.json", 3 | "TheVerge": { 4 | "detectors": [ 5 | { 6 | "presentMatcher": [ 7 | { 8 | "type": "css", 9 | "target": { 10 | "selector": ".duet--cta--cookie-banner" 11 | } 12 | } 13 | ], 14 | "showingMatcher": [ 15 | { 16 | "type": "css", 17 | "target": { 18 | "selector": ".duet--cta--cookie-banner", 19 | "displayFilter": true 20 | } 21 | } 22 | ] 23 | } 24 | ], 25 | "methods": [ 26 | { 27 | "action": { 28 | "type": "hide", 29 | "target": { 30 | "selector": ".duet--cta--cookie-banner" 31 | } 32 | }, 33 | "name": "HIDE_CMP" 34 | }, 35 | { 36 | "name": "OPEN_OPTIONS" 37 | }, 38 | { 39 | "name": "DO_CONSENT" 40 | }, 41 | { 42 | "action": { 43 | "type": "ifallowall", 44 | "trueAction": { 45 | "type": "click", 46 | "target": { 47 | "selector": "button", 48 | "textFilter": [ 49 | "I Accept" 50 | ] 51 | } 52 | }, 53 | "falseAction": { 54 | "type": "click", 55 | "target": { 56 | "childFilter": { 57 | "target": { 58 | "selector": "span", 59 | "textFilter": [ 60 | "I Do Not Accept" 61 | ] 62 | } 63 | }, 64 | "selector": "button" 65 | } 66 | } 67 | }, 68 | "name": "SAVE_CONSENT" 69 | }, 70 | { 71 | "name": "UTILITY" 72 | } 73 | ] 74 | } 75 | } -------------------------------------------------------------------------------- /xcode/iOS (App)/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /rules/thenextweb.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules.schema.json", 3 | "thenextweb": { 4 | "detectors": [ 5 | { 6 | "presentMatcher": [ 7 | { 8 | "type": "css", 9 | "target": { 10 | "selector": ".cookie-consent-form__body" 11 | } 12 | } 13 | ], 14 | "showingMatcher": [ 15 | { 16 | "type": "css", 17 | "target": { 18 | "selector": ".cookie-consent-form__body", 19 | "displayFilter": true 20 | } 21 | } 22 | ] 23 | } 24 | ], 25 | "methods": [ 26 | { 27 | "name": "HIDE_CMP" 28 | }, 29 | { 30 | "name": "OPEN_OPTIONS" 31 | }, 32 | { 33 | "action": { 34 | "type": "consent", 35 | "consents": [ 36 | { 37 | "matcher": { 38 | "type": "css", 39 | "target": { 40 | "selector": "#cookie-consent-form__input--granted" 41 | } 42 | }, 43 | "trueAction": { 44 | "type": "click", 45 | "target": { 46 | "selector": "#cookie-consent-form__input--granted" 47 | } 48 | }, 49 | "falseAction": { 50 | "type": "click", 51 | "target": { 52 | "selector": "#cookie-consent-form__input--denied" 53 | } 54 | }, 55 | "type": "F" 56 | } 57 | ] 58 | }, 59 | "name": "DO_CONSENT" 60 | }, 61 | { 62 | "action": { 63 | "type": "click", 64 | "target": { 65 | "selector": ".cookie-consent-form__btn-primary" 66 | } 67 | }, 68 | "name": "SAVE_CONSENT" 69 | }, 70 | { 71 | "name": "UTILITY" 72 | } 73 | ] 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /Extension/popup.js: -------------------------------------------------------------------------------- 1 | import GDPRConfig from './GDPRConfig.js'; 2 | import Language from './Language.js'; 3 | 4 | let frontTab = document.querySelector(".fronttab"); 5 | if (frontTab){ 6 | chrome.tabs.query({ 7 | active: true, 8 | currentWindow: true 9 | }, (tabs) => { 10 | const urlObj = new URL(tabs[0].url); 11 | const url = urlObj.host; 12 | 13 | let activeInput = document.querySelector(".siteselector input"); 14 | document.querySelector("#site").textContent = url; 15 | document.querySelector("#unhandled_site").textContent = url; 16 | document.querySelector("#settings").addEventListener("click", function () { 17 | chrome.runtime.openOptionsPage(); 18 | window.close(); 19 | }); 20 | 21 | GDPRConfig.isActive(url).then((active) => { 22 | activeInput.checked = active; 23 | }); 24 | activeInput.addEventListener("input", () => { 25 | GDPRConfig.setPageActive(url, activeInput.checked); 26 | }); 27 | 28 | GDPRConfig.getDebugValues().then((settings) => { 29 | let confirmationInput = document.querySelector("#no-confirmation"); 30 | confirmationInput.checked = (settings.skipSubmitConfirmation === true); 31 | 32 | confirmationInput.addEventListener("input", () => { 33 | settings.skipSubmitConfirmation = confirmationInput.checked; 34 | GDPRConfig.setDebugValues(settings); 35 | }); 36 | 37 | document.querySelector("#unhandled").addEventListener("click", () => { 38 | document.querySelector(".fronttab").style.display = "none"; 39 | document.querySelector(".unhandledtab").style.display = "block"; 40 | if (settings.skipSubmitConfirmation){ 41 | document.querySelector("#unhandled_send").click(); 42 | } 43 | }); 44 | document.querySelector("#unhandled_cancel").addEventListener("click", () => { 45 | document.querySelector(".unhandledtab").style.display = "none"; 46 | document.querySelector(".fronttab").style.display = "block"; 47 | window.close(); 48 | }); 49 | document.querySelector("#unhandled_send").addEventListener("click", () => { 50 | fetch("https://gdprconsent.projects.cavi.au.dk/report.php?url=" + encodeURIComponent(url)); 51 | document.querySelector(".unhandledtab").style.display = "none"; 52 | document.querySelector(".unhandledtab_complete").style.display = "block"; 53 | setTimeout(() => { 54 | window.close(); 55 | }, 1250); 56 | }); 57 | }); 58 | }); 59 | 60 | window.addEventListener("DOMContentLoaded", ()=>{ 61 | Language.doLanguage(); 62 | }); 63 | } -------------------------------------------------------------------------------- /rules/trustarc_popup_hider.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules.schema.json", 3 | "trustarc_popup_hider": { 4 | "detectors": [ 5 | { 6 | "presentMatcher": [ 7 | { 8 | "type": "css", 9 | "target": { 10 | "selector": ".truste_box_overlay" 11 | } 12 | } 13 | ], 14 | "showingMatcher": [ 15 | { 16 | "type": "css", 17 | "target": { 18 | "selector": ".truste_box_overlay", 19 | "displayFilter": true 20 | } 21 | } 22 | ] 23 | } 24 | ], 25 | "methods": [ 26 | { 27 | "action": { 28 | "type": "list", 29 | "actions": [ 30 | { 31 | "type": "hide", 32 | "target": { 33 | "selector": ".truste_box_overlay" 34 | } 35 | }, 36 | { 37 | "type": "hide", 38 | "target": { 39 | "selector": ".truste_overlay" 40 | } 41 | }, 42 | { 43 | "type": "hide", 44 | "target": { 45 | "selector": "#trustarc-banner-overlay" 46 | } 47 | }, 48 | { 49 | "type": "hide", 50 | "target": { 51 | "selector": ".truste-consent-track-class" 52 | } 53 | } 54 | ] 55 | }, 56 | "name": "HIDE_CMP" 57 | }, 58 | { 59 | "action": { 60 | "type": "waitcss", 61 | "target": { 62 | "selector": ".truste_box_overlay", 63 | "displayFilter": true 64 | }, 65 | "retries": 100, 66 | "waitTime": 50, 67 | "negated": true 68 | }, 69 | "name": "OPEN_OPTIONS" 70 | }, 71 | { 72 | "name": "DO_CONSENT" 73 | }, 74 | { 75 | "name": "SAVE_CONSENT" 76 | }, 77 | { 78 | "name": "UTILITY" 79 | } 80 | ] 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /rules/chrysal.com.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules.schema.json", 3 | "chrysal.com": { 4 | "detectors": [ 5 | { 6 | "presentMatcher": [ 7 | { 8 | "type": "css", 9 | "target": { 10 | "selector": "#popup-cookie-settings" 11 | }, 12 | "parent": { 13 | "selector": ".popup-content" 14 | } 15 | } 16 | ], 17 | "showingMatcher": [ 18 | { 19 | "type": "css", 20 | "target": { 21 | "selector": ".popup-text", 22 | "displayFilter": true 23 | }, 24 | "parent": { 25 | "selector": ".popup-content" 26 | } 27 | } 28 | ] 29 | } 30 | ], 31 | "methods": [ 32 | { 33 | "action": { 34 | "type": "hide", 35 | "target": { 36 | "selector": ".popup-content.info" 37 | } 38 | }, 39 | "name": "HIDE_CMP" 40 | }, 41 | { 42 | "action": { 43 | "type": "click", 44 | "target": { 45 | "selector": ".button.secondary" 46 | } 47 | }, 48 | "name": "OPEN_OPTIONS" 49 | }, 50 | { 51 | "action": { 52 | "type": "ifallowall", 53 | "trueAction": { 54 | "type": "click", 55 | "target": { 56 | "selector": "#cookie_level_option_1" 57 | } 58 | }, 59 | "falseAction": { 60 | "type": "click", 61 | "target": { 62 | "selector": "#cookie_level_option_2" 63 | } 64 | } 65 | }, 66 | "name": "DO_CONSENT" 67 | }, 68 | { 69 | "action": { 70 | "type": "click", 71 | "target": { 72 | "selector": ".button", 73 | "textFilter": [ 74 | "Agree" 75 | ] 76 | } 77 | }, 78 | "name": "SAVE_CONSENT" 79 | }, 80 | { 81 | "name": "UTILITY" 82 | } 83 | ] 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /rules/mindfactory.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules.schema.json", 3 | "mindfactory": { 4 | "detectors": [ 5 | { 6 | "presentMatcher": [ 7 | { 8 | "type": "css", 9 | "target": { 10 | "selector": "#cookieModalOverlay" 11 | } 12 | } 13 | ], 14 | "showingMatcher": [ 15 | { 16 | "type": "css", 17 | "target": { 18 | "selector": "#cookieModalOverlay", 19 | "displayFilter": true 20 | } 21 | } 22 | ] 23 | } 24 | ], 25 | "methods": [ 26 | { 27 | "action": { 28 | "type": "hide", 29 | "target": { 30 | "selector": "#cookieModalOverlay" 31 | } 32 | }, 33 | "name": "HIDE_CMP" 34 | }, 35 | { 36 | "action": { 37 | "type": "click", 38 | "target": { 39 | "selector": ".btn-default.collapsible" 40 | }, 41 | "parent": { 42 | "selector": "#cookieModalOverlay" 43 | } 44 | }, 45 | "name": "OPEN_OPTIONS" 46 | }, 47 | { 48 | "action": { 49 | "type": "consent", 50 | "consents": [ 51 | { 52 | "matcher": { 53 | "type": "checkbox", 54 | "target": { 55 | "selector": "[name='piwik']" 56 | } 57 | }, 58 | "toggleAction": { 59 | "type": "click", 60 | "target": { 61 | "selector": "[name='piwik']" 62 | } 63 | }, 64 | "type": "F" 65 | } 66 | ] 67 | }, 68 | "name": "DO_CONSENT" 69 | }, 70 | { 71 | "action": { 72 | "type": "click", 73 | "target": { 74 | "selector": "#saveSettings" 75 | } 76 | }, 77 | "name": "SAVE_CONSENT" 78 | }, 79 | { 80 | "name": "UTILITY" 81 | } 82 | ] 83 | } 84 | } -------------------------------------------------------------------------------- /rules/cdiscountopen.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules.schema.json", 3 | "cdiscountopen": { 4 | "detectors": [ 5 | { 6 | "presentMatcher": [ 7 | { 8 | "type": "css", 9 | "target": { 10 | "selector": "#tc-privacy-wrapper" 11 | } 12 | } 13 | ], 14 | "showingMatcher": [ 15 | { 16 | "type": "css", 17 | "target": { 18 | "selector": ".tc-privacy-iab-banner,#popin_tc_privacy", 19 | "displayFilter": true 20 | } 21 | } 22 | ] 23 | } 24 | ], 25 | "methods": [ 26 | { 27 | "action": { 28 | "type": "list", 29 | "actions": [ 30 | { 31 | "type": "hide", 32 | "target": { 33 | "selector": "#tc-privacy-wrapper" 34 | } 35 | }, 36 | { 37 | "type": "hide", 38 | "target": { 39 | "selector": "#privacy-overlay" 40 | } 41 | }, 42 | { 43 | "type": "hide", 44 | "target": { 45 | "selector": "#privacy-container" 46 | } 47 | } 48 | ] 49 | }, 50 | "name": "HIDE_CMP" 51 | }, 52 | { 53 | "action": { 54 | "type": "list", 55 | "actions": [ 56 | { 57 | "type": "click", 58 | "target": { 59 | "selector": "#popin_tc_privacy_button,#footer_tc_privacy_button" 60 | } 61 | } 62 | ] 63 | }, 64 | "name": "OPEN_OPTIONS" 65 | }, 66 | { 67 | "action": { 68 | "type": "waitcss", 69 | "target": { 70 | "selector": "#tc-privacy-wrapper" 71 | }, 72 | "retries": 100, 73 | "waitTime": 250, 74 | "negated": true 75 | }, 76 | "name": "DO_CONSENT" 77 | }, 78 | { 79 | "name": "SAVE_CONSENT" 80 | }, 81 | { 82 | "name": "UTILITY" 83 | } 84 | ] 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /rules/reddit.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules.schema.json", 3 | "Reddit": { 4 | "detectors": [ 5 | { 6 | "presentMatcher": [ 7 | { 8 | "type": "css", 9 | "target": { 10 | "selector": "section a[href=\"https://www.redditinc.com/policies/cookie-notice\"]" 11 | } 12 | } 13 | ], 14 | "showingMatcher": [ 15 | { 16 | "type": "css", 17 | "target": { 18 | "selector": "section a[href=\"https://www.redditinc.com/policies/cookie-notice\"]", 19 | "displayFilter": true 20 | } 21 | } 22 | ] 23 | } 24 | ], 25 | "methods": [ 26 | { 27 | "name": "HIDE_CMP" 28 | }, 29 | { 30 | "name": "OPEN_OPTIONS" 31 | }, 32 | { 33 | "action": { 34 | "type": "ifallowall", 35 | "trueAction": { 36 | "type": "click", 37 | "target": { 38 | "selector": "button", 39 | "textFilter": [ 40 | "Accept all" 41 | ] 42 | }, 43 | "parent": { 44 | "childFilter": { 45 | "target": { 46 | "selector": "a[href=\"https://www.redditinc.com/policies/cookie-notice\"]" 47 | } 48 | }, 49 | "selector": "section" 50 | } 51 | }, 52 | "falseAction": { 53 | "type": "click", 54 | "target": { 55 | "selector": "button", 56 | "textFilter": [ 57 | "Reject non-essential" 58 | ] 59 | }, 60 | "parent": { 61 | "childFilter": { 62 | "target": { 63 | "selector": "a[href=\"https://www.redditinc.com/policies/cookie-notice\"]" 64 | } 65 | }, 66 | "selector": "section" 67 | } 68 | } 69 | }, 70 | "name": "DO_CONSENT" 71 | }, 72 | { 73 | "name": "SAVE_CONSENT" 74 | }, 75 | { 76 | "name": "UTILITY" 77 | } 78 | ] 79 | } 80 | } -------------------------------------------------------------------------------- /rules/jamsoftware.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules.schema.json", 3 | "jamsoftware": { 4 | "detectors": [ 5 | { 6 | "presentMatcher": [ 7 | { 8 | "type": "css", 9 | "target": { 10 | "selector": "#cookiehint" 11 | } 12 | } 13 | ], 14 | "showingMatcher": [ 15 | { 16 | "type": "css", 17 | "target": { 18 | "selector": "#cookiehint", 19 | "displayFilter": true 20 | } 21 | } 22 | ] 23 | } 24 | ], 25 | "methods": [ 26 | { 27 | "action": { 28 | "type": "hide", 29 | "target": { 30 | "selector": "#cookiehint" 31 | } 32 | }, 33 | "name": "HIDE_CMP" 34 | }, 35 | { 36 | "name": "OPEN_OPTIONS" 37 | }, 38 | { 39 | "action": { 40 | "type": "consent", 41 | "consents": [ 42 | { 43 | "matcher": { 44 | "type": "checkbox", 45 | "target": { 46 | "selector": "#jam_consent_opt_1" 47 | } 48 | }, 49 | "toggleAction": { 50 | "type": "click", 51 | "target": { 52 | "selector": "#jam_consent_opt_1" 53 | } 54 | }, 55 | "type": "B" 56 | }, 57 | { 58 | "matcher": { 59 | "type": "checkbox", 60 | "target": { 61 | "selector": "#jam_consent_opt_2" 62 | } 63 | }, 64 | "toggleAction": { 65 | "type": "click", 66 | "target": { 67 | "selector": "#jam_consent_opt_2" 68 | } 69 | }, 70 | "type": "F" 71 | } 72 | ] 73 | }, 74 | "name": "DO_CONSENT" 75 | }, 76 | { 77 | "action": { 78 | "type": "click", 79 | "target": { 80 | "selector": "#cookiehintChangeSettings" 81 | } 82 | }, 83 | "name": "SAVE_CONSENT" 84 | }, 85 | { 86 | "name": "UTILITY" 87 | } 88 | ] 89 | } 90 | } -------------------------------------------------------------------------------- /Extension/Consent.js: -------------------------------------------------------------------------------- 1 | import ConsentEngine from "./ConsentEngine.js"; 2 | import Action from "./Action.js"; 3 | import {Matcher,OnOffMatcher} from "./Matcher.js"; 4 | 5 | export default class Consent { 6 | constructor(config, cmp) { 7 | this.config = config; 8 | this.cmp = cmp; 9 | 10 | if(this.config.toggleAction != null) { 11 | this.toggleAction = Action.createAction(this.config.toggleAction, cmp); 12 | } 13 | 14 | if(this.config.matcher != null) { 15 | this.enabledMatcher = Matcher.createMatcher(this.config.matcher); 16 | } 17 | 18 | if(this.config.falseAction != null) { 19 | this.falseAction = Action.createAction(this.config.falseAction, cmp); 20 | } 21 | 22 | if(this.config.trueAction != null) { 23 | this.trueAction = Action.createAction(this.config.trueAction, cmp); 24 | } 25 | } 26 | 27 | async toggle() { 28 | return await this.toggleAction.execute(); 29 | } 30 | 31 | isEnabled() { 32 | return this.enabledMatcher.matches(); 33 | } 34 | 35 | async setEnabled(enabled) { 36 | if(this.toggleAction != null) { 37 | if(this.enabledMatcher == null) { 38 | //Toggle is only supported with a matcher 39 | if (ConsentEngine.debugValues.debugLog) { 40 | throw new Error("Toggle consent action, without a matcher: "+JSON.stringify(this.config)); 41 | } 42 | return; 43 | } 44 | try { 45 | if(this.isEnabled() !== enabled) { 46 | await this.toggle(); 47 | } 48 | } catch(e) { 49 | if (ConsentEngine.debugValues.debugLog) { 50 | console.error("Error toggling:", e, this.config); 51 | } 52 | } 53 | } else { 54 | let handled = false; 55 | 56 | //If we have OnOffMatcher, we can reduce clicks to only happen when state is wrong 57 | if(this.enabledMatcher != null && this.enabledMatcher instanceof OnOffMatcher) { 58 | try { 59 | if(this.isEnabled() && !enabled) { 60 | await this.falseAction.execute(); 61 | } else if(!this.isEnabled() && enabled) { 62 | await this.trueAction.execute(); 63 | } 64 | handled = true; 65 | } catch(e) { 66 | if (ConsentEngine.debugValues.debugLog) { 67 | console.error("Error pushing on/off:", e, this.config); 68 | } 69 | } 70 | } 71 | 72 | if(!handled) { 73 | if(enabled) { 74 | await this.trueAction.execute(); 75 | } else { 76 | await this.falseAction.execute(); 77 | } 78 | } 79 | } 80 | 81 | if (ConsentEngine.debugValues.paintMatchers) { 82 | if(this.enabledMatcher != null) { 83 | //Debug if state is correct 84 | await this.enabledMatcher.debug(enabled); 85 | } 86 | } 87 | } 88 | 89 | get type() { 90 | return this.config.type; 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /rules/harvester.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules.schema.json", 3 | "harvester": { 4 | "detectors": [ 5 | { 6 | "presentMatcher": [ 7 | { 8 | "type": "css", 9 | "target": { 10 | "selector": ".cookie-manager.cookie-manager__modal" 11 | } 12 | } 13 | ], 14 | "showingMatcher": [ 15 | { 16 | "type": "css", 17 | "target": { 18 | "selector": ".cookie-manager.cookie-manager__modal", 19 | "displayFilter": true 20 | } 21 | } 22 | ] 23 | } 24 | ], 25 | "methods": [ 26 | { 27 | "action": { 28 | "type": "hide", 29 | "target": { 30 | "selector": ".cookie-manager.cookie-manager__modal" 31 | } 32 | }, 33 | "name": "HIDE_CMP" 34 | }, 35 | { 36 | "action": { 37 | "type": "click", 38 | "target": { 39 | "selector": ".cookie-manager__button--secondary", 40 | "textFilter": [ 41 | "Manage cookies" 42 | ] 43 | } 44 | }, 45 | "name": "OPEN_OPTIONS" 46 | }, 47 | { 48 | "action": { 49 | "type": "list", 50 | "actions": [ 51 | { 52 | "type": "consent", 53 | "consents": [ 54 | { 55 | "matcher": { 56 | "type": "checkbox", 57 | "target": { 58 | "selector": "#switch-toggle-2" 59 | } 60 | }, 61 | "toggleAction": { 62 | "type": "click", 63 | "target": { 64 | "selector": "#switch-toggle-2" 65 | } 66 | }, 67 | "type": "A" 68 | } 69 | ] 70 | } 71 | ] 72 | }, 73 | "name": "DO_CONSENT" 74 | }, 75 | { 76 | "action": { 77 | "type": "click", 78 | "target": { 79 | "selector": ".cookie-manager__button.cookie-manager__button--secondary[data-v-5cca015c=''][style='']" 80 | } 81 | }, 82 | "name": "SAVE_CONSENT" 83 | }, 84 | { 85 | "name": "UTILITY" 86 | } 87 | ] 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /rules/onetrust_banner.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules.schema.json", 3 | "onetrust_banner": { 4 | "detectors": [ 5 | { 6 | "presentMatcher": [ 7 | { 8 | "type": "css", 9 | "target": { 10 | "selector": "#onetrust-banner-sdk, #cookie-consent-wrapper" 11 | } 12 | } 13 | ], 14 | "showingMatcher": [ 15 | { 16 | "type": "css", 17 | "target": { 18 | "selector": "#onetrust-banner-sdk, #cookie-consent-preferences", 19 | "displayFilter": true 20 | } 21 | } 22 | ] 23 | } 24 | ], 25 | "methods": [ 26 | { 27 | "name": "HIDE_CMP" 28 | }, 29 | { 30 | "name": "OPEN_OPTIONS" 31 | }, 32 | { 33 | "name": "DO_CONSENT" 34 | }, 35 | { 36 | "name": "SAVE_CONSENT" 37 | }, 38 | { 39 | "action": { 40 | "type": "list", 41 | "actions": [ 42 | { 43 | "type": "hide", 44 | "target": { 45 | "selector": "#onetrust-banner-sdk" 46 | }, 47 | "hideFromDetection": true, 48 | "forceHide": true 49 | }, 50 | { 51 | "type": "hide", 52 | "target": { 53 | "childFilter": { 54 | "target": { 55 | "selector": "#cookie-consent-preferences" 56 | } 57 | }, 58 | "selector": "#cookie-consent-wrapper" 59 | }, 60 | "hideFromDetection": true, 61 | "forceHide": true 62 | }, 63 | { 64 | "type": "ifcss", 65 | "target": { 66 | "selector": "#onetrust-pc-btn-handler, #cookie-consent-preferences" 67 | }, 68 | "trueAction": { 69 | "type": "click", 70 | "target": { 71 | "selector": "#onetrust-pc-btn-handler, #cookie-consent-preferences" 72 | } 73 | }, 74 | "falseAction": { 75 | "type": "click", 76 | "target": { 77 | "selector": "#onetrust-accept-btn-handler" 78 | } 79 | } 80 | } 81 | ] 82 | }, 83 | "name": "UTILITY" 84 | } 85 | ] 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /rules/typo3cookieman.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules.schema.json", 3 | "typo3 cookieman": { 4 | "detectors": [ 5 | { 6 | "presentMatcher": [ 7 | { 8 | "type": "css", 9 | "target": { 10 | "selector": "#cookieman-modal" 11 | } 12 | } 13 | ], 14 | "showingMatcher": [ 15 | { 16 | "type": "css", 17 | "target": { 18 | "selector": "#cookieman-modal" 19 | } 20 | } 21 | ] 22 | } 23 | ], 24 | "methods": [ 25 | { 26 | "name": "HIDE_CMP" 27 | }, 28 | { 29 | "name": "OPEN_OPTIONS" 30 | }, 31 | { 32 | "action": { 33 | "type": "list", 34 | "actions": [ 35 | { 36 | "type": "consent", 37 | "consents": [ 38 | { 39 | "matcher": { 40 | "type": "checkbox", 41 | "target": { 42 | "selector": "input[name=\"marketing\"]" 43 | } 44 | }, 45 | "toggleAction": { 46 | "type": "click", 47 | "target": { 48 | "selector": "input[name=\"marketing\"]" 49 | } 50 | }, 51 | "type": "F" 52 | }, 53 | { 54 | "matcher": { 55 | "type": "checkbox", 56 | "target": { 57 | "selector": "input[name=\"videos\"]" 58 | } 59 | }, 60 | "toggleAction": { 61 | "type": "click", 62 | "target": { 63 | "selector": "input[name=\"videos\"]" 64 | } 65 | }, 66 | "type": "A" 67 | } 68 | ] 69 | } 70 | ] 71 | }, 72 | "name": "DO_CONSENT" 73 | }, 74 | { 75 | "action": { 76 | "type": "click", 77 | "target": { 78 | "selector": ".save-button" 79 | } 80 | }, 81 | "name": "SAVE_CONSENT" 82 | }, 83 | { 84 | "name": "UTILITY" 85 | } 86 | ] 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /rules/canalplus.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules.schema.json", 3 | "canalplus": { 4 | "detectors": [ 5 | { 6 | "presentMatcher": [ 7 | { 8 | "type": "css", 9 | "target": { 10 | "selector": "#privacy-manager-popin" 11 | } 12 | } 13 | ], 14 | "showingMatcher": [ 15 | { 16 | "type": "css", 17 | "target": { 18 | "selector": "#privacy-manager-popin", 19 | "displayFilter": true 20 | } 21 | } 22 | ] 23 | } 24 | ], 25 | "methods": [ 26 | { 27 | "action": { 28 | "type": "hide", 29 | "target": { 30 | "selector": "#privacy-manager-popin" 31 | } 32 | }, 33 | "name": "HIDE_CMP" 34 | }, 35 | { 36 | "action": { 37 | "type": "click", 38 | "target": { 39 | "selector": "#pm-optout-display" 40 | } 41 | }, 42 | "name": "OPEN_OPTIONS" 43 | }, 44 | { 45 | "action": { 46 | "type": "consent", 47 | "consents": [ 48 | { 49 | "matcher": { 50 | "type": "checkbox", 51 | "target": { 52 | "selector": "#cb-optout-stats" 53 | } 54 | }, 55 | "toggleAction": { 56 | "type": "click", 57 | "target": { 58 | "selector": "#cb-optout-stats" 59 | } 60 | }, 61 | "type": "B" 62 | }, 63 | { 64 | "matcher": { 65 | "type": "checkbox", 66 | "target": { 67 | "selector": "#cb-optout-ads" 68 | } 69 | }, 70 | "toggleAction": { 71 | "type": "click", 72 | "target": { 73 | "selector": "#cb-optout-ads" 74 | } 75 | }, 76 | "type": "F" 77 | } 78 | ] 79 | }, 80 | "name": "DO_CONSENT" 81 | }, 82 | { 83 | "action": { 84 | "type": "click", 85 | "target": { 86 | "selector": "#save-exit-btn" 87 | } 88 | }, 89 | "name": "SAVE_CONSENT" 90 | }, 91 | { 92 | "name": "UTILITY" 93 | } 94 | ] 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /rules/twitter.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules.schema.json", 3 | "Twitter": { 4 | "detectors": [ 5 | { 6 | "presentMatcher": [ 7 | { 8 | "type": "css", 9 | "target": { 10 | "selector": "div#layers span", 11 | "textFilter": [ 12 | "Did someone say … cookies?" 13 | ] 14 | } 15 | } 16 | ], 17 | "showingMatcher": [ 18 | { 19 | "type": "css", 20 | "target": { 21 | "selector": "div#layers span", 22 | "textFilter": [ 23 | "Did someone say … cookies?" 24 | ], 25 | "displayFilter": true 26 | } 27 | } 28 | ] 29 | } 30 | ], 31 | "methods": [ 32 | { 33 | "name": "HIDE_CMP" 34 | }, 35 | { 36 | "name": "OPEN_OPTIONS" 37 | }, 38 | { 39 | "action": { 40 | "type": "ifallowall", 41 | "trueAction": { 42 | "type": "click", 43 | "target": { 44 | "selector": "div[role=\"button\"]", 45 | "textFilter": [ 46 | "Accept all cookies" 47 | ] 48 | }, 49 | "parent": { 50 | "childFilter": { 51 | "target": { 52 | "selector": "div > div > span", 53 | "textFilter": [ 54 | "Did someone say … cookies?" 55 | ] 56 | } 57 | }, 58 | "selector": "div#layers" 59 | } 60 | }, 61 | "falseAction": { 62 | "type": "click", 63 | "target": { 64 | "selector": "div[role=\"button\"]", 65 | "textFilter": [ 66 | "Refuse non-essential cookies" 67 | ] 68 | }, 69 | "parent": { 70 | "childFilter": { 71 | "target": { 72 | "selector": "div > div > span", 73 | "textFilter": [ 74 | "Did someone say … cookies?" 75 | ] 76 | } 77 | }, 78 | "selector": "div#layers" 79 | } 80 | } 81 | }, 82 | "name": "DO_CONSENT" 83 | }, 84 | { 85 | "name": "SAVE_CONSENT" 86 | }, 87 | { 88 | "name": "UTILITY" 89 | } 90 | ] 91 | } 92 | } -------------------------------------------------------------------------------- /rules/check24.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules.schema.json", 3 | "check24": { 4 | "detectors": [ 5 | { 6 | "presentMatcher": [ 7 | { 8 | "type": "css", 9 | "target": { 10 | "selector": ".c24-cookie-consent-notice" 11 | } 12 | } 13 | ], 14 | "showingMatcher": [ 15 | { 16 | "type": "css", 17 | "target": { 18 | "selector": ".c24-cookie-consent-notice", 19 | "displayFilter": true 20 | } 21 | } 22 | ] 23 | } 24 | ], 25 | "methods": [ 26 | { 27 | "action": { 28 | "type": "hide", 29 | "target": { 30 | "selector": ".c24-cookie-consent-wrapper" 31 | }, 32 | "forceHide": true 33 | }, 34 | "name": "HIDE_CMP" 35 | }, 36 | { 37 | "action": { 38 | "type": "click", 39 | "target": { 40 | "selector": ".c24-cookie-consent-button-secondary" 41 | } 42 | }, 43 | "name": "OPEN_OPTIONS" 44 | }, 45 | { 46 | "action": { 47 | "type": "consent", 48 | "consents": [ 49 | { 50 | "matcher": { 51 | "type": "checkbox", 52 | "target": { 53 | "selector": "#check24-cookie-analytics" 54 | } 55 | }, 56 | "toggleAction": { 57 | "type": "click", 58 | "target": { 59 | "selector": "[onclick*='check24-cookie-analytics']" 60 | } 61 | }, 62 | "type": "B" 63 | }, 64 | { 65 | "matcher": { 66 | "type": "checkbox", 67 | "target": { 68 | "selector": "#check24-cookie-marketing" 69 | } 70 | }, 71 | "toggleAction": { 72 | "type": "click", 73 | "target": { 74 | "selector": "[onclick*='check24-cookie-marketing']" 75 | } 76 | }, 77 | "type": "F" 78 | } 79 | ] 80 | }, 81 | "name": "DO_CONSENT" 82 | }, 83 | { 84 | "action": { 85 | "type": "click", 86 | "target": { 87 | "selector": ".c24-cookie-consent-buttonlink" 88 | } 89 | }, 90 | "name": "SAVE_CONSENT" 91 | }, 92 | { 93 | "name": "UTILITY" 94 | } 95 | ] 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /rules/begadi.com.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules.schema.json", 3 | "begadi.com": { 4 | "detectors": [ 5 | { 6 | "presentMatcher": [ 7 | { 8 | "type": "css", 9 | "target": { 10 | "selector": ".amgdprcookie-bar-container" 11 | } 12 | } 13 | ], 14 | "showingMatcher": [ 15 | { 16 | "type": "css", 17 | "target": { 18 | "selector": ".amgdprcookie-bar-container", 19 | "displayFilter": true 20 | } 21 | } 22 | ] 23 | } 24 | ], 25 | "methods": [ 26 | { 27 | "name": "HIDE_CMP" 28 | }, 29 | { 30 | "name": "OPEN_OPTIONS" 31 | }, 32 | { 33 | "action": { 34 | "type": "list", 35 | "actions": [ 36 | { 37 | "type": "consent", 38 | "consents": [ 39 | { 40 | "matcher": { 41 | "type": "checkbox", 42 | "target": { 43 | "selector": "#switch-box-1" 44 | } 45 | }, 46 | "toggleAction": { 47 | "type": "click", 48 | "target": { 49 | "selector": "#switch-box-1" 50 | } 51 | }, 52 | "type": "F" 53 | } 54 | ] 55 | }, 56 | { 57 | "type": "consent", 58 | "consents": [ 59 | { 60 | "matcher": { 61 | "type": "checkbox", 62 | "target": { 63 | "selector": "#switch-box-2" 64 | } 65 | }, 66 | "toggleAction": { 67 | "type": "click", 68 | "target": { 69 | "selector": "#switch-box-2" 70 | } 71 | }, 72 | "type": "B" 73 | } 74 | ] 75 | } 76 | ] 77 | }, 78 | "name": "DO_CONSENT" 79 | }, 80 | { 81 | "action": { 82 | "type": "click", 83 | "target": { 84 | "selector": "#btn-cookie-allow" 85 | } 86 | }, 87 | "name": "SAVE_CONSENT" 88 | }, 89 | { 90 | "name": "UTILITY" 91 | } 92 | ] 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /rules/paypal_page.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules.schema.json", 3 | "paypal_page": { 4 | "detectors": [ 5 | { 6 | "presentMatcher": [ 7 | { 8 | "type": "css", 9 | "target": { 10 | "selector": "section.privacy-modal-content" 11 | } 12 | } 13 | ], 14 | "showingMatcher": [ 15 | { 16 | "type": "css", 17 | "target": { 18 | "selector": "section.privacy-modal-content p#cookieTitle" 19 | } 20 | } 21 | ] 22 | } 23 | ], 24 | "methods": [ 25 | { 26 | "name": "HIDE_CMP" 27 | }, 28 | { 29 | "name": "OPEN_OPTIONS" 30 | }, 31 | { 32 | "action": { 33 | "type": "consent", 34 | "consents": [ 35 | { 36 | "matcher": { 37 | "type": "checkbox", 38 | "target": { 39 | "selector": "input#marketing" 40 | } 41 | }, 42 | "toggleAction": { 43 | "type": "click", 44 | "target": { 45 | "selector": "input#marketing" 46 | } 47 | }, 48 | "type": "F" 49 | }, 50 | { 51 | "matcher": { 52 | "type": "checkbox", 53 | "target": { 54 | "selector": "input#functional" 55 | } 56 | }, 57 | "toggleAction": { 58 | "type": "click", 59 | "target": { 60 | "selector": "input#functional" 61 | } 62 | }, 63 | "type": "A" 64 | }, 65 | { 66 | "matcher": { 67 | "type": "checkbox", 68 | "target": { 69 | "selector": "input#performance" 70 | } 71 | }, 72 | "toggleAction": { 73 | "type": "click", 74 | "target": { 75 | "selector": "input#performance" 76 | } 77 | }, 78 | "type": "B" 79 | } 80 | ] 81 | }, 82 | "name": "DO_CONSENT" 83 | }, 84 | { 85 | "action": { 86 | "type": "click", 87 | "target": { 88 | "selector": "#submitCookiesBtn" 89 | } 90 | }, 91 | "name": "SAVE_CONSENT" 92 | }, 93 | { 94 | "name": "UTILITY" 95 | } 96 | ] 97 | } 98 | } -------------------------------------------------------------------------------- /rules/amazon.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules.schema.json", 3 | "amazon": { 4 | "detectors": [ 5 | { 6 | "presentMatcher": [ 7 | { 8 | "type": "css", 9 | "target": { 10 | "selector": "#sp-cc, [data-testid='consent-manager-main-content']" 11 | } 12 | } 13 | ], 14 | "showingMatcher": [ 15 | { 16 | "type": "css", 17 | "target": { 18 | "selector": "#sp-cc, [data-testid='consent-manager-main-content']", 19 | "displayFilter": true 20 | } 21 | } 22 | ] 23 | } 24 | ], 25 | "methods": [ 26 | { 27 | "name": "HIDE_CMP" 28 | }, 29 | { 30 | "name": "OPEN_OPTIONS" 31 | }, 32 | { 33 | "action": { 34 | "type": "ifcss", 35 | "target": { 36 | "selector": "#sp-cc-customize" 37 | }, 38 | "trueAction": { 39 | "type": "click", 40 | "target": { 41 | "selector": "#sp-cc-customize" 42 | } 43 | }, 44 | "falseAction": { 45 | "type": "list", 46 | "actions": [ 47 | { 48 | "type": "consent", 49 | "consents": [ 50 | { 51 | "matcher": { 52 | "type": "css", 53 | "target": { 54 | "selector": "[data-a-input-name='ADVERTISING'] [value='on'][checked='']" 55 | } 56 | }, 57 | "trueAction": { 58 | "type": "click", 59 | "target": { 60 | "selector": "[data-a-input-name='ADVERTISING'] [value='on']" 61 | } 62 | }, 63 | "falseAction": { 64 | "type": "click", 65 | "target": { 66 | "selector": "[data-a-input-name='ADVERTISING'] [value='off']" 67 | } 68 | }, 69 | "type": "A" 70 | } 71 | ] 72 | } 73 | ] 74 | } 75 | }, 76 | "name": "DO_CONSENT" 77 | }, 78 | { 79 | "action": { 80 | "type": "click", 81 | "target": { 82 | "selector": "#savePrefs .a-button-input" 83 | } 84 | }, 85 | "name": "SAVE_CONSENT" 86 | }, 87 | { 88 | "name": "UTILITY" 89 | } 90 | ] 91 | } 92 | } -------------------------------------------------------------------------------- /rules/sourcepoint_popup.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules.schema.json", 3 | "sourcepointpopup": { 4 | "detectors": [ 5 | { 6 | "presentMatcher": [ 7 | { 8 | "type": "css", 9 | "target": { 10 | "selector": ".message-container .message-button", 11 | "textFilter": [ 12 | "Ret indstillinger", 13 | "Cookie Settings", 14 | "Voir les paramètres", 15 | "Options", 16 | "Manage my cookies", 17 | "Settings", 18 | "Einstellungen", 19 | "Instellen", 20 | "Mijn instellingen beheren", 21 | "Hantera cookies", 22 | "Manage", 23 | "Configure Preferences" 24 | ], 25 | "displayFilter": true 26 | } 27 | } 28 | ] 29 | } 30 | ], 31 | "methods": [ 32 | { 33 | "name": "HIDE_CMP" 34 | }, 35 | { 36 | "name": "OPEN_OPTIONS" 37 | }, 38 | { 39 | "name": "DO_CONSENT" 40 | }, 41 | { 42 | "name": "SAVE_CONSENT" 43 | }, 44 | { 45 | "action": { 46 | "type": "list", 47 | "actions": [ 48 | { 49 | "type": "wait", 50 | "waitTime": 250 51 | }, 52 | { 53 | "type": "click", 54 | "target": { 55 | "selector": ".message-container .message-button.cmp-cta-manage" 56 | } 57 | }, 58 | { 59 | "type": "ifcss", 60 | "target": { 61 | "selector": ".sp_choice_type_SAVE_AND_EXIT", 62 | "iframeFilter": true, 63 | "displayFilter": true 64 | }, 65 | "falseAction": { 66 | "type": "click", 67 | "target": { 68 | "selector": ".message-container .message-button", 69 | "textFilter": [ 70 | "Ret indstillinger", 71 | "Cookie Settings", 72 | "Voir les paramètres", 73 | "Options", 74 | "Manage my cookies", 75 | "Settings", 76 | "Einstellungen", 77 | "Instellen", 78 | "Mijn instellingen beheren", 79 | "Hantera cookies", 80 | "Manage", 81 | "Configure Preferences" 82 | ] 83 | } 84 | } 85 | } 86 | ] 87 | }, 88 | "name": "UTILITY" 89 | } 90 | ] 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /rules/hl.co.uk.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules.schema.json", 3 | "hl.co.uk": { 4 | "detectors": [ 5 | { 6 | "presentMatcher": [ 7 | { 8 | "type": "css", 9 | "target": { 10 | "selector": ".cookieBanner" 11 | } 12 | } 13 | ], 14 | "showingMatcher": [ 15 | { 16 | "type": "css", 17 | "target": { 18 | "selector": "#cookieModalContent", 19 | "displayFilter": true 20 | } 21 | } 22 | ] 23 | } 24 | ], 25 | "methods": [ 26 | { 27 | "action": { 28 | "type": "list", 29 | "actions": [ 30 | { 31 | "type": "hide", 32 | "target": { 33 | "selector": "#cookie-banner-overlay" 34 | } 35 | }, 36 | { 37 | "type": "hide", 38 | "target": { 39 | "selector": ".cookieBanner__inner" 40 | } 41 | } 42 | ] 43 | }, 44 | "name": "HIDE_CMP" 45 | }, 46 | { 47 | "action": { 48 | "type": "click", 49 | "target": { 50 | "selector": "#manageCookie" 51 | } 52 | }, 53 | "name": "OPEN_OPTIONS" 54 | }, 55 | { 56 | "action": { 57 | "type": "consent", 58 | "consents": [ 59 | { 60 | "trueAction": { 61 | "type": "click", 62 | "target": { 63 | "selector": "#functionalCookiesOn" 64 | } 65 | }, 66 | "falseAction": { 67 | "type": "click", 68 | "target": { 69 | "selector": "#functionalCookiesOff" 70 | } 71 | }, 72 | "type": "A" 73 | }, 74 | { 75 | "trueAction": { 76 | "type": "click", 77 | "target": { 78 | "selector": "#marketingCookiesOn" 79 | } 80 | }, 81 | "falseAction": { 82 | "type": "click", 83 | "target": { 84 | "selector": "#marketingCookiesOff" 85 | } 86 | }, 87 | "type": "F" 88 | } 89 | ] 90 | }, 91 | "name": "DO_CONSENT" 92 | }, 93 | { 94 | "action": { 95 | "type": "click", 96 | "target": { 97 | "selector": "#updateCookieButton" 98 | } 99 | }, 100 | "name": "SAVE_CONSENT" 101 | }, 102 | { 103 | "name": "UTILITY" 104 | } 105 | ] 106 | } 107 | } -------------------------------------------------------------------------------- /rules/cookiewow.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules.schema.json", 3 | "cookiewow": { 4 | "detectors": [ 5 | { 6 | "presentMatcher": { 7 | "type": "css", 8 | "target": { 9 | "selector": ".cwc-banner-container" 10 | } 11 | }, 12 | "showingMatcher": { 13 | "type": "css", 14 | "target": { 15 | "selector": ".cwc-banner-container", 16 | "displayFilter": true 17 | } 18 | } 19 | } 20 | ], 21 | "methods": [ 22 | { 23 | "name": "OPEN_OPTIONS", 24 | "action": { 25 | "type": "click", 26 | "target": { 27 | "selector": ".cwc-setting-button" 28 | } 29 | } 30 | }, 31 | { 32 | "name": "DO_CONSENT", 33 | "action": { 34 | "type": "list", 35 | "actions": [ 36 | { 37 | "type": "consent", 38 | "consents": [ 39 | { 40 | "type": "B", 41 | "matcher": { 42 | "type": "checkbox", 43 | "target": { 44 | "selector": "input" 45 | }, 46 | "parent": { 47 | "selector": ".cwc-category-item", 48 | "childFilter": { 49 | "target": { 50 | "selector": ".cwc-category-item-title", 51 | "textFilter": [ 52 | "Analytics", 53 | "คุกกี้ในส่วนวิเคราะห์", 54 | "访问分析Cookie", 55 | "トラフィック分析Cookie" 56 | ] 57 | } 58 | } 59 | } 60 | }, 61 | "toggleAction": { 62 | "type": "click", 63 | "target": { 64 | "selector": ".cwc-switch" 65 | }, 66 | "parent": { 67 | "selector": ".cwc-category-item", 68 | "childFilter": { 69 | "target": { 70 | "selector": ".cwc-category-item-title", 71 | "textFilter": [ 72 | "Analytics", 73 | "คุกกี้ในส่วนวิเคราะห์", 74 | "访问分析Cookie", 75 | "トラフィック分析Cookie" 76 | ] 77 | } 78 | } 79 | } 80 | } 81 | }, 82 | { 83 | "type": "F", 84 | "matcher": { 85 | "type": "checkbox", 86 | "target": { 87 | "selector": "input" 88 | }, 89 | "parent": { 90 | "selector": ".cwc-category-item", 91 | "childFilter": { 92 | "target": { 93 | "selector": ".cwc-category-item-title", 94 | "textFilter": [ 95 | "Marketing", 96 | "คุกกี้ในส่วนการตลาด", 97 | "访问分析Cookie", 98 | "トラフィック分析Cookie" 99 | ] 100 | } 101 | } 102 | } 103 | }, 104 | "toggleAction": { 105 | "type": "click", 106 | "target": { 107 | "selector": ".cwc-switch" 108 | }, 109 | "parent": { 110 | "selector": ".cwc-category-item", 111 | "childFilter": { 112 | "target": { 113 | "selector": ".cwc-category-item-title", 114 | "textFilter": [ 115 | "Marketing", 116 | "คุกกี้ในส่วนการตลาด", 117 | "访问分析Cookie", 118 | "トラフィック分析Cookie" 119 | ] 120 | } 121 | } 122 | } 123 | } 124 | } 125 | ] 126 | }, 127 | { 128 | "type": "wait", 129 | "waitTime": 250 130 | } 131 | ] 132 | } 133 | }, 134 | { 135 | "name": "SAVE_CONSENT", 136 | "action": { 137 | "type": "click", 138 | "target": { 139 | "selector": ".cwc-save-setting-wrapper button" 140 | } 141 | } 142 | }, 143 | { 144 | "name": "HIDE_CMP", 145 | "action": { 146 | "type": "hide", 147 | "target": { 148 | "selector": ".cwc-sdk-container" 149 | } 150 | } 151 | } 152 | ] 153 | } 154 | } 155 | -------------------------------------------------------------------------------- /rules/rozhlas.cz.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules.schema.json", 3 | "rozhlas.cz": { 4 | "detectors": [ 5 | { 6 | "presentMatcher": [ 7 | { 8 | "type": "url", 9 | "url": [ 10 | "rozhlas.cz", "irozhlas.cz" 11 | ] 12 | } 13 | ], 14 | "showingMatcher": [ 15 | { 16 | "type": "css", 17 | "target": { 18 | "selector": ".cm--bar", 19 | "displayFilter": true 20 | } 21 | } 22 | ] 23 | } 24 | ], 25 | "methods": [ 26 | { 27 | "name": "HIDE_CMP" 28 | }, 29 | { 30 | "name": "OPEN_OPTIONS", 31 | "action": { 32 | "type": "click", 33 | "target": { 34 | "selector": ".cm__btn[data-role=show]" 35 | } 36 | } 37 | }, 38 | { 39 | "name": "DO_CONSENT", 40 | "action": { 41 | "type": "consent", 42 | "consents": [ 43 | { 44 | "type": "B", 45 | "matcher": { 46 | "type": "checkbox", 47 | "target": { 48 | "selector": ".section__toggle[value=analytics]" 49 | } 50 | }, 51 | "toggleAction": { 52 | "type": "click", 53 | "target": { 54 | "selector": ".section__toggle[value=analytics]" 55 | } 56 | } 57 | }, 58 | { 59 | "type": "E", 60 | "matcher": { 61 | "type": "checkbox", 62 | "target": { 63 | "selector": ".section__toggle[value=personal]" 64 | } 65 | }, 66 | "toggleAction": { 67 | "type": "click", 68 | "target": { 69 | "selector": ".section__toggle[value=personal]" 70 | } 71 | } 72 | }, 73 | { 74 | "type": "F", 75 | "matcher": { 76 | "type": "checkbox", 77 | "target": { 78 | "selector": ".section__toggle[value=marketing]" 79 | } 80 | }, 81 | "toggleAction": { 82 | "type": "click", 83 | "target": { 84 | "selector": ".section__toggle[value=marketing]" 85 | } 86 | } 87 | } 88 | ] 89 | } 90 | }, 91 | { 92 | "name": "SAVE_CONSENT", 93 | "action": { 94 | "type": "click", 95 | "target": { 96 | "selector": ".pm__btn[data-role=save]" 97 | } 98 | } 99 | } 100 | ] 101 | } 102 | } 103 | -------------------------------------------------------------------------------- /rules/autohero.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules.schema.json", 3 | "autohero": { 4 | "detectors": [ 5 | { 6 | "presentMatcher": [ 7 | { 8 | "type": "css", 9 | "target": { 10 | "selector": ".root___3ffa6" 11 | } 12 | } 13 | ], 14 | "showingMatcher": [ 15 | { 16 | "type": "css", 17 | "target": { 18 | "selector": ".root___3ffa6", 19 | "displayFilter": true 20 | } 21 | } 22 | ] 23 | } 24 | ], 25 | "methods": [ 26 | { 27 | "action": { 28 | "type": "list", 29 | "actions": [ 30 | { 31 | "type": "hide", 32 | "target": { 33 | "selector": ".backdrop___is1w-" 34 | } 35 | }, 36 | { 37 | "type": "hide", 38 | "target": { 39 | "selector": ".root___3ffa6" 40 | } 41 | } 42 | ] 43 | }, 44 | "name": "HIDE_CMP" 45 | }, 46 | { 47 | "action": { 48 | "type": "click", 49 | "target": { 50 | "selector": "[data-qa-selector='cookie-consent-configure']" 51 | } 52 | }, 53 | "name": "OPEN_OPTIONS" 54 | }, 55 | { 56 | "action": { 57 | "type": "consent", 58 | "consents": [ 59 | { 60 | "matcher": { 61 | "type": "checkbox", 62 | "target": { 63 | "selector": "[name='ANALYTICAL']" 64 | } 65 | }, 66 | "toggleAction": { 67 | "type": "click", 68 | "target": { 69 | "selector": "[name='ANALYTICAL']" 70 | } 71 | }, 72 | "type": "B" 73 | }, 74 | { 75 | "matcher": { 76 | "type": "checkbox", 77 | "target": { 78 | "selector": "[name='MARKETING']" 79 | } 80 | }, 81 | "toggleAction": { 82 | "type": "click", 83 | "target": { 84 | "selector": "[name='MARKETING']" 85 | } 86 | }, 87 | "type": "F" 88 | } 89 | ] 90 | }, 91 | "name": "DO_CONSENT" 92 | }, 93 | { 94 | "action": { 95 | "type": "click", 96 | "target": { 97 | "selector": "[data-qa-selector='cookie-consent-configure']" 98 | } 99 | }, 100 | "name": "SAVE_CONSENT" 101 | }, 102 | { 103 | "name": "UTILITY" 104 | } 105 | ] 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /rules/tournamentsoftware.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules.schema.json", 3 | "tournamentsoftware.com": { 4 | "detectors": [ 5 | { 6 | "presentMatcher": [ 7 | { 8 | "type": "css", 9 | "target": { 10 | "selector": ".message-page" 11 | } 12 | } 13 | ], 14 | "showingMatcher": [ 15 | { 16 | "type": "css", 17 | "target": { 18 | "selector": ".message-page [action=\"/cookiewall/Save\"]", 19 | "displayFilter": true 20 | } 21 | } 22 | ] 23 | } 24 | ], 25 | "methods": [ 26 | { 27 | "name": "HIDE_CMP" 28 | }, 29 | { 30 | "action": { 31 | "type": "click", 32 | "target": { 33 | "selector": ".js-show-purposes" 34 | } 35 | }, 36 | "name": "OPEN_OPTIONS" 37 | }, 38 | { 39 | "action": { 40 | "type": "consent", 41 | "consents": [ 42 | { 43 | "matcher": { 44 | "type": "checkbox", 45 | "target": { 46 | "selector": "#CookiePurposes_1_" 47 | } 48 | }, 49 | "toggleAction": { 50 | "type": "click", 51 | "target": { 52 | "selector": "[for=\"CookiePurposes_1_\"]" 53 | } 54 | }, 55 | "type": "B" 56 | }, 57 | { 58 | "matcher": { 59 | "type": "checkbox", 60 | "target": { 61 | "selector": "#CookiePurposes_2_" 62 | } 63 | }, 64 | "toggleAction": { 65 | "type": "click", 66 | "target": { 67 | "selector": "[for\"CookiePurposes_2_\"]" 68 | } 69 | }, 70 | "type": "F" 71 | }, 72 | { 73 | "matcher": { 74 | "type": "checkbox", 75 | "target": { 76 | "selector": "#CookiePurposes_3_" 77 | } 78 | }, 79 | "toggleAction": { 80 | "type": "click", 81 | "target": { 82 | "selector": "[for\"CookiePurposes_3_\"]" 83 | } 84 | }, 85 | "type": "E" 86 | } 87 | ] 88 | }, 89 | "name": "DO_CONSENT" 90 | }, 91 | { 92 | "action": { 93 | "type": "click", 94 | "target": { 95 | "selector": ".js-save" 96 | } 97 | }, 98 | "name": "SAVE_CONSENT" 99 | }, 100 | { 101 | "name": "UTILITY" 102 | } 103 | ] 104 | } 105 | } 106 | -------------------------------------------------------------------------------- /rules/lesatlantes.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules.schema.json", 3 | "lesatlantes": { 4 | "detectors": [ 5 | { 6 | "presentMatcher": [ 7 | { 8 | "type": "css", 9 | "target": { 10 | "selector": "#popin-cookies" 11 | } 12 | } 13 | ], 14 | "showingMatcher": [ 15 | { 16 | "type": "css", 17 | "target": { 18 | "selector": "#popin-cookies", 19 | "displayFilter": true 20 | } 21 | } 22 | ] 23 | } 24 | ], 25 | "methods": [ 26 | { 27 | "action": { 28 | "type": "hide", 29 | "target": { 30 | "selector": "#popin-cookies" 31 | } 32 | }, 33 | "name": "HIDE_CMP" 34 | }, 35 | { 36 | "action": { 37 | "type": "click", 38 | "target": { 39 | "selector": "#cookie-custom" 40 | } 41 | }, 42 | "name": "OPEN_OPTIONS" 43 | }, 44 | { 45 | "action": { 46 | "type": "list", 47 | "actions": [ 48 | { 49 | "type": "consent", 50 | "consents": [ 51 | { 52 | "matcher": { 53 | "type": "checkbox", 54 | "target": { 55 | "selector": "#radio-performance" 56 | } 57 | }, 58 | "toggleAction": { 59 | "type": "click", 60 | "target": { 61 | "selector": "#radio-performance" 62 | } 63 | }, 64 | "type": "B" 65 | } 66 | ] 67 | }, 68 | { 69 | "type": "consent", 70 | "consents": [ 71 | { 72 | "matcher": { 73 | "type": "checkbox", 74 | "target": { 75 | "selector": "#radio-rs" 76 | } 77 | }, 78 | "toggleAction": { 79 | "type": "click", 80 | "target": { 81 | "selector": "#radio-rs" 82 | } 83 | }, 84 | "type": "A" 85 | } 86 | ] 87 | } 88 | ] 89 | }, 90 | "name": "DO_CONSENT" 91 | }, 92 | { 93 | "action": { 94 | "type": "click", 95 | "target": { 96 | "selector": "#cookie-all" 97 | } 98 | }, 99 | "name": "SAVE_CONSENT" 100 | }, 101 | { 102 | "name": "UTILITY" 103 | } 104 | ] 105 | } 106 | } 107 | -------------------------------------------------------------------------------- /rules/setonosylius.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules.schema.json", 3 | "Setono Sylius": { 4 | "detectors": [ 5 | { 6 | "presentMatcher": [ 7 | { 8 | "type": "css", 9 | "target": { 10 | "selector": "form#ws-consent" 11 | } 12 | } 13 | ], 14 | "showingMatcher": [ 15 | { 16 | "type": "css", 17 | "target": { 18 | "selector": "form#ws-consent", 19 | "displayFilter": true 20 | } 21 | } 22 | ] 23 | } 24 | ], 25 | "methods": [ 26 | { 27 | "action": { 28 | "type": "hide", 29 | "target": { 30 | "selector": "form#ws-consent" 31 | } 32 | }, 33 | "name": "HIDE_CMP" 34 | }, 35 | { 36 | "name": "OPEN_OPTIONS" 37 | }, 38 | { 39 | "action": { 40 | "type": "consent", 41 | "consents": [ 42 | { 43 | "matcher": { 44 | "type": "checkbox", 45 | "target": { 46 | "selector": "#ws-consent-f-togglePreferences input" 47 | } 48 | }, 49 | "toggleAction": { 50 | "type": "click", 51 | "target": { 52 | "selector": "#ws-consent-f-togglePreferences input" 53 | } 54 | }, 55 | "type": "A" 56 | }, 57 | { 58 | "matcher": { 59 | "type": "checkbox", 60 | "target": { 61 | "selector": "#ws-consent-f-toggleStatistics input" 62 | } 63 | }, 64 | "toggleAction": { 65 | "type": "click", 66 | "target": { 67 | "selector": "#ws-consent-f-toggleStatistics input" 68 | } 69 | }, 70 | "type": "B" 71 | }, 72 | { 73 | "matcher": { 74 | "type": "checkbox", 75 | "target": { 76 | "selector": "#ws-consent-f-toggleMarketing input" 77 | } 78 | }, 79 | "toggleAction": { 80 | "type": "click", 81 | "target": { 82 | "selector": "#ws-consent-f-toggleMarketing input" 83 | } 84 | }, 85 | "type": "F" 86 | } 87 | ] 88 | }, 89 | "name": "DO_CONSENT" 90 | }, 91 | { 92 | "action": { 93 | "type": "click", 94 | "target": { 95 | "selector": "button#ws-consent-f-buttonUpdate" 96 | } 97 | }, 98 | "name": "SAVE_CONSENT" 99 | }, 100 | { 101 | "name": "UTILITY" 102 | } 103 | ] 104 | } 105 | } -------------------------------------------------------------------------------- /rules/volkswagen.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules.schema.json", 3 | "Volkswagen": { 4 | "detectors": [ 5 | { 6 | "presentMatcher": [ 7 | { 8 | "type": "css", 9 | "target": { 10 | "selector": "#cookiemgmt #ensModalWrapper" 11 | } 12 | } 13 | ], 14 | "showingMatcher": [ 15 | { 16 | "type": "css", 17 | "target": { 18 | "selector": "#cookiemgmt #ensModalWrapper", 19 | "displayFilter": true 20 | } 21 | } 22 | ] 23 | } 24 | ], 25 | "methods": [ 26 | { 27 | "action": { 28 | "type": "hide", 29 | "target": { 30 | "selector": "#cookiemgmt #ensModalWrapper" 31 | } 32 | }, 33 | "name": "HIDE_CMP" 34 | }, 35 | { 36 | "name": "OPEN_OPTIONS" 37 | }, 38 | { 39 | "action": { 40 | "type": "consent", 41 | "consents": [ 42 | { 43 | "matcher": { 44 | "type": "checkbox", 45 | "target": { 46 | "selector": "#cookiemgmt #FunctionalSlide" 47 | } 48 | }, 49 | "toggleAction": { 50 | "type": "click", 51 | "target": { 52 | "selector": "#cookiemgmt #FunctionalSlide" 53 | } 54 | }, 55 | "type": "A" 56 | }, 57 | { 58 | "matcher": { 59 | "type": "checkbox", 60 | "target": { 61 | "selector": "#cookiemgmt #StatisticsSlide" 62 | } 63 | }, 64 | "toggleAction": { 65 | "type": "click", 66 | "target": { 67 | "selector": "#cookiemgmt #StatisticsSlide" 68 | } 69 | }, 70 | "type": "B" 71 | }, 72 | { 73 | "matcher": { 74 | "type": "checkbox", 75 | "target": { 76 | "selector": "#cookiemgmt #MarketingSlide" 77 | } 78 | }, 79 | "toggleAction": { 80 | "type": "click", 81 | "target": { 82 | "selector": "#cookiemgmt #MarketingSlide" 83 | } 84 | }, 85 | "type": "F" 86 | } 87 | ] 88 | }, 89 | "name": "DO_CONSENT" 90 | }, 91 | { 92 | "action": { 93 | "type": "click", 94 | "target": { 95 | "selector": "#cookiemgmt #ensSave", 96 | "displayFilter": true 97 | } 98 | }, 99 | "name": "SAVE_CONSENT" 100 | }, 101 | { 102 | "name": "UTILITY" 103 | } 104 | ] 105 | } 106 | } -------------------------------------------------------------------------------- /rules/elektroniklavpris.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules.schema.json", 3 | "elektroniklavpris": { 4 | "detectors": [ 5 | { 6 | "presentMatcher": [ 7 | { 8 | "type": "css", 9 | "target": { 10 | "selector": "#cookieconsent-modal.modal.fade.in" 11 | } 12 | } 13 | ], 14 | "showingMatcher": [ 15 | { 16 | "type": "css", 17 | "target": { 18 | "selector": "#cookieconsent-modal.modal.fade.in", 19 | "displayFilter": true 20 | } 21 | } 22 | ] 23 | } 24 | ], 25 | "methods": [ 26 | { 27 | "action": { 28 | "type": "hide", 29 | "target": { 30 | "selector": "#cookieconsent-modal" 31 | } 32 | }, 33 | "name": "HIDE_CMP" 34 | }, 35 | { 36 | "action": { 37 | "type": "consent", 38 | "consents": [ 39 | { 40 | "matcher": { 41 | "type": "checkbox", 42 | "target": { 43 | "selector": "#cookieconsent_checkbox_functional" 44 | } 45 | }, 46 | "toggleAction": { 47 | "type": "click", 48 | "target": { 49 | "selector": "#cookieconsent_checkbox_functional" 50 | } 51 | }, 52 | "type": "A" 53 | }, 54 | { 55 | "matcher": { 56 | "type": "checkbox", 57 | "target": { 58 | "selector": "#cookieconsent_checkbox_statistically" 59 | } 60 | }, 61 | "toggleAction": { 62 | "type": "click", 63 | "target": { 64 | "selector": "#cookieconsent_checkbox_statistically" 65 | } 66 | }, 67 | "type": "B" 68 | }, 69 | { 70 | "matcher": { 71 | "type": "checkbox", 72 | "target": { 73 | "selector": "#cookieconsent_checkbox_marketing" 74 | } 75 | }, 76 | "toggleAction": { 77 | "type": "click", 78 | "target": { 79 | "selector": "#cookieconsent_checkbox_marketing" 80 | } 81 | }, 82 | "type": "F" 83 | } 84 | ] 85 | }, 86 | "name": "OPEN_OPTIONS" 87 | }, 88 | { 89 | "action": { 90 | "type": "click", 91 | "target": { 92 | "selector": "[onclick*='cookie'].btn-secondary" 93 | } 94 | }, 95 | "name": "DO_CONSENT" 96 | }, 97 | { 98 | "name": "SAVE_CONSENT" 99 | }, 100 | { 101 | "name": "UTILITY" 102 | } 103 | ] 104 | } 105 | } 106 | -------------------------------------------------------------------------------- /rules/google_consentdomain_2.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules.schema.json", 3 | "google_consentdomain_2": { 4 | "detectors": [ 5 | { 6 | "presentMatcher": [ 7 | { 8 | "type": "url", 9 | "url": [ 10 | "consent.google.com" 11 | ] 12 | } 13 | ], 14 | "showingMatcher": [ 15 | { 16 | "type": "css", 17 | "target": { 18 | "selector": ".detailspage", 19 | "textFilter": [ 20 | "cookies" 21 | ] 22 | } 23 | } 24 | ] 25 | } 26 | ], 27 | "methods": [ 28 | { 29 | "name": "HIDE_CMP" 30 | }, 31 | { 32 | "name": "OPEN_OPTIONS" 33 | }, 34 | { 35 | "action": { 36 | "type": "list", 37 | "actions": [ 38 | { 39 | "type": "consent", 40 | "consents": [ 41 | { 42 | "matcher": { 43 | "type": "css" 44 | }, 45 | "trueAction": { 46 | "type": "click", 47 | "target": { 48 | "selector": "input[name=\"set_sc\"][value=\"true\"]" 49 | } 50 | }, 51 | "falseAction": { 52 | "type": "click", 53 | "target": { 54 | "selector": "input[name=\"set_sc\"][value=\"false\"]" 55 | } 56 | }, 57 | "type": "E" 58 | } 59 | ] 60 | }, 61 | { 62 | "type": "consent", 63 | "consents": [ 64 | { 65 | "matcher": { 66 | "type": "css" 67 | }, 68 | "trueAction": { 69 | "type": "click", 70 | "target": { 71 | "selector": "input[name=\"set_aps\"][value=\"true\"]" 72 | } 73 | }, 74 | "falseAction": { 75 | "type": "click", 76 | "target": { 77 | "selector": "input[name=\"set_aps\"][value=\"false\"]" 78 | } 79 | }, 80 | "type": "F" 81 | } 82 | ] 83 | } 84 | ] 85 | }, 86 | "name": "DO_CONSENT" 87 | }, 88 | { 89 | "action": { 90 | "type": "click", 91 | "target": { 92 | "selector": "button[name=\"set_eom\"][value=\"false\"]" 93 | } 94 | }, 95 | "name": "SAVE_CONSENT" 96 | }, 97 | { 98 | "name": "UTILITY" 99 | } 100 | ] 101 | } 102 | } -------------------------------------------------------------------------------- /rules/benq.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/master/rules.schema.json", 3 | "benq": { 4 | "detectors": [ 5 | { 6 | "presentMatcher": [ 7 | { 8 | "type": "css", 9 | "target": { 10 | "selector": "#cookie-bar-eu" 11 | } 12 | } 13 | ], 14 | "showingMatcher": [ 15 | { 16 | "type": "css", 17 | "target": { 18 | "selector": ".cookie-bar-popup-container", 19 | "displayFilter": true 20 | } 21 | } 22 | ] 23 | } 24 | ], 25 | "methods": [ 26 | { 27 | "action": { 28 | "type": "hide", 29 | "target": { 30 | "selector": "#cookie-bar-eu" 31 | } 32 | }, 33 | "name": "HIDE_CMP" 34 | }, 35 | { 36 | "action": { 37 | "type": "click", 38 | "target": { 39 | "selector": ".cookiebar-setting-button" 40 | } 41 | }, 42 | "name": "OPEN_OPTIONS" 43 | }, 44 | { 45 | "action": { 46 | "type": "list", 47 | "actions": [ 48 | { 49 | "type": "consent", 50 | "consents": [ 51 | { 52 | "matcher": { 53 | "type": "css", 54 | "target": { 55 | "selector": ".functional-option .toggle-button.active" 56 | } 57 | }, 58 | "toggleAction": { 59 | "type": "click", 60 | "target": { 61 | "selector": ".functional-option .toggle-button" 62 | } 63 | }, 64 | "type": "A" 65 | } 66 | ] 67 | }, 68 | { 69 | "type": "consent", 70 | "consents": [ 71 | { 72 | "matcher": { 73 | "type": "css", 74 | "target": { 75 | "selector": ".performance-option .toggle-button.active" 76 | } 77 | }, 78 | "toggleAction": { 79 | "type": "click", 80 | "target": { 81 | "selector": ".performance-option .toggle-button" 82 | } 83 | }, 84 | "type": "B" 85 | } 86 | ] 87 | } 88 | ] 89 | }, 90 | "name": "DO_CONSENT" 91 | }, 92 | { 93 | "action": { 94 | "type": "click", 95 | "target": { 96 | "selector": ".trigger-agree-button" 97 | } 98 | }, 99 | "name": "SAVE_CONSENT" 100 | }, 101 | { 102 | "name": "UTILITY" 103 | } 104 | ] 105 | } 106 | } 107 | -------------------------------------------------------------------------------- /Extension/editor/js/domParser.js: -------------------------------------------------------------------------------- 1 | export class DomParser { 2 | static async parseDom(dom) { 3 | if(dom != null) { 4 | let result = {}; 5 | 6 | let variant = dom.getAttribute("data-variant"); 7 | let plugs = dom.querySelectorAll(":scope > [data-plug]"); 8 | let bindValues = dom.querySelectorAll(":scope > [data-bind]:not([data-plug])"); 9 | 10 | if(variant != null) { 11 | result.type = variant; 12 | } 13 | 14 | for(let plug of plugs) { 15 | await DomParser.parsePlug(plug, result); 16 | } 17 | 18 | for(let value of bindValues) { 19 | await DomParser.parseValue(value, result); 20 | } 21 | 22 | return result; 23 | } 24 | 25 | return null; 26 | } 27 | 28 | static async parsePlug(plugDom, json) { 29 | let plugType = plugDom.getAttribute("data-plug"); 30 | let bindName = plugDom.getAttribute("data-bind"); 31 | let multiple = !!plugDom.getAttribute("data-multiple"); 32 | 33 | let result; 34 | 35 | if(multiple) { 36 | result = []; 37 | for(let dom of Array.from(plugDom.querySelectorAll(":scope > [data-type='"+plugType+"']"))) { 38 | result.push(await DomParser.parseDom(dom)); 39 | } 40 | } else { 41 | let dom = plugDom.querySelector(":scope > [data-type='"+plugType+"']"); 42 | result = await DomParser.parseDom(dom); 43 | } 44 | 45 | if(!isEmpty(result)) { 46 | if(bindName != null) { 47 | json[bindName] = result; 48 | } else { 49 | Object.assign(json, result); 50 | } 51 | } 52 | } 53 | 54 | static async parseValue(valueDom, json) { 55 | if(valueDom != null) { 56 | let bindName = valueDom.getAttribute("data-bind"); 57 | let value; 58 | 59 | if(valueDom.querySelector("ul.list") != null) { 60 | console.log("LIST!"); 61 | value = ""; 62 | valueDom.querySelectorAll("ul.list input").forEach((input)=>{ 63 | let v = input.value.trim(); 64 | if(v.length > 0) { 65 | value = value + "|" + v; 66 | } 67 | }); 68 | } else if(valueDom.querySelector("input") != null) { 69 | let input = valueDom.querySelector("input"); 70 | switch(input.getAttribute("type")) { 71 | case "checkbox": 72 | value = input.checked; 73 | break; 74 | default: 75 | value = input.value.trim(); 76 | 77 | if(input.getAttribute("type") === "number") { 78 | value = +value; 79 | } 80 | 81 | break; 82 | } 83 | } else if(valueDom.querySelector("select") != null) { 84 | value = valueDom.querySelector("select").value; 85 | } else { 86 | console.log(valueDom); 87 | if(valueDom.getAttribute("data-bind-method-name")) { 88 | value = valueDom.getAttribute("data-bind-method-name"); 89 | } else { 90 | value = valueDom.textContent; 91 | } 92 | } 93 | 94 | if(value != null && value !== "" && value !== false) { 95 | if(typeof(value) === "string" && value.indexOf("|") !== -1) { 96 | value = value.split("|").map((arrayValue)=>{ 97 | return arrayValue.trim(); 98 | }).filter((arrayValue)=>{ 99 | return arrayValue.length > 0; 100 | }); 101 | } 102 | 103 | json[bindName] = value; 104 | } 105 | } 106 | } 107 | } 108 | 109 | function isEmpty(obj) { 110 | if(obj == null) { 111 | return true; 112 | } else if(obj instanceof Array) { 113 | return obj.length === 0; 114 | } else { 115 | return Object.keys(obj).length === 0 116 | } 117 | } --------------------------------------------------------------------------------