├── .gitignore ├── Chrome ├── background.js ├── github.png ├── icon │ ├── icon.png │ ├── icon128.png │ ├── icon16.png │ └── icon48.png ├── manifest.json ├── menu.css ├── menu.html └── menu.js ├── README.md └── assets ├── chrome.png ├── firefox.png ├── github.png ├── icon.pdn ├── menu.png ├── screenshot.pdn └── screenshot.png /.gitignore: -------------------------------------------------------------------------------- 1 | _metadata 2 | *.pem 3 | releases -------------------------------------------------------------------------------- /Chrome/background.js: -------------------------------------------------------------------------------- 1 | // Disable filter 2 | function disable() 3 | { 4 | // Disable filter 5 | chrome.declarativeNetRequest.updateDynamicRules({ 6 | removeRuleIds: [1] 7 | }); 8 | 9 | // Store to settings 10 | chrome.storage.local.set({ enabled: false }); 11 | } 12 | 13 | // Enable filter 14 | function enable() 15 | { 16 | // Enable filter 17 | // Adds "sellerid=0" to requests to filter out resellers 18 | chrome.declarativeNetRequest.updateDynamicRules({ 19 | addRules:[ 20 | { 21 | "id" : 1, 22 | "priority": 1, 23 | "action" : { 24 | "type" : "redirect", 25 | "redirect": { 26 | "transform": { 27 | "queryTransform": { 28 | "addOrReplaceParams": [{ "key": "sellerId", "value": "0" }] 29 | } 30 | } 31 | } 32 | }, 33 | "condition" : { 34 | "urlFilter" : "searchtext=", 35 | "domains" : ["bol.com", "*.bol.com"], 36 | "resourceTypes" : ["main_frame", "sub_frame", "script", "xmlhttprequest", "object", "websocket", "other"] 37 | } 38 | } 39 | ], 40 | removeRuleIds: [1] 41 | }); 42 | 43 | // Store to settings 44 | chrome.storage.local.set({ enabled: true }); 45 | } 46 | 47 | // Handle messages from the front 48 | chrome.runtime.onMessage.addListener( 49 | function(request, sender, sendResponse) 50 | { 51 | if (request === "bf_enable") 52 | enable(); 53 | else if (request === "bf_disable") 54 | disable(); 55 | } 56 | ); 57 | 58 | // Enable on load 59 | enable(); 60 | -------------------------------------------------------------------------------- /Chrome/github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jkctech/BolFilter/556ac24975bd307793cfa6a7c9e0e52624a3bde8/Chrome/github.png -------------------------------------------------------------------------------- /Chrome/icon/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jkctech/BolFilter/556ac24975bd307793cfa6a7c9e0e52624a3bde8/Chrome/icon/icon.png -------------------------------------------------------------------------------- /Chrome/icon/icon128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jkctech/BolFilter/556ac24975bd307793cfa6a7c9e0e52624a3bde8/Chrome/icon/icon128.png -------------------------------------------------------------------------------- /Chrome/icon/icon16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jkctech/BolFilter/556ac24975bd307793cfa6a7c9e0e52624a3bde8/Chrome/icon/icon16.png -------------------------------------------------------------------------------- /Chrome/icon/icon48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jkctech/BolFilter/556ac24975bd307793cfa6a7c9e0e52624a3bde8/Chrome/icon/icon48.png -------------------------------------------------------------------------------- /Chrome/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "BolFilter", 3 | "version": "1.0.0", 4 | "description": "Filter onderverkopers uit de resultaten van Bol.com", 5 | "author": "JKCTech", 6 | "manifest_version": 3, 7 | "permissions": [ 8 | "declarativeNetRequest", 9 | "storage" 10 | ], 11 | "background": { 12 | "service_worker": "background.js" 13 | }, 14 | "host_permissions": [ 15 | "*://*.bol.com/*", 16 | "*://bol.com/*" 17 | ], 18 | "action": { 19 | "default_icon": "icon/icon.png", 20 | "default_title": "BolFilter", 21 | "default_popup": "menu.html" 22 | }, 23 | "icons": { 24 | "16": "icon/icon16.png", 25 | "48": "icon/icon48.png", 26 | "128": "icon/icon128.png" 27 | } 28 | } -------------------------------------------------------------------------------- /Chrome/menu.css: -------------------------------------------------------------------------------- 1 | html, body { 2 | padding: 0; 3 | margin: 0; 4 | } 5 | 6 | body { 7 | width: 300px; 8 | display: flex; 9 | justify-content: center; 10 | align-items: center; 11 | flex-wrap: wrap; 12 | font-size: 15px; 13 | } 14 | 15 | .icon { 16 | width: 12px; 17 | height: 12px; 18 | } 19 | 20 | hr { 21 | width: 100%; 22 | color: darkgrey; 23 | } 24 | 25 | a { 26 | text-decoration: none; 27 | color: black; 28 | } 29 | 30 | .footer { 31 | margin-bottom: 5px; 32 | } 33 | 34 | .title { 35 | width: 100%; 36 | text-align: center; 37 | font-size: 20px; 38 | margin: 5px 0; 39 | } 40 | 41 | /* Switch */ 42 | input[type=checkbox] { 43 | height: 0; 44 | width: 0; 45 | display: none; 46 | } 47 | 48 | .toggle { 49 | cursor: pointer; 50 | text-indent: -9999px; 51 | width: 50px; 52 | height: 25px; 53 | background: grey; 54 | display: block; 55 | border-radius: 25px; 56 | position: relative; 57 | margin-top: 5px; 58 | margin-bottom: 10px; 59 | } 60 | 61 | .toggle:after { 62 | content: ''; 63 | position: absolute; 64 | top: 1.25px; 65 | left: 1.25px; 66 | width: 22.5px; 67 | height: 22.5px; 68 | background: #fff; 69 | border-radius: 22.5px; 70 | transition: 0.3s; 71 | } 72 | 73 | input:checked + .toggle { 74 | background: #bada55; 75 | } 76 | 77 | input:checked + .toggle:after { 78 | left: calc(100% - 1.25px); 79 | transform: translateX(-100%); 80 | } 81 | /* End Switch */ -------------------------------------------------------------------------------- /Chrome/menu.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |