├── .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 | BolFilter 6 | 7 | 8 | 9 | 10 | Onderverkopers Verbergen 11 | 12 |
13 | Github 14 | 15 | 16 | -------------------------------------------------------------------------------- /Chrome/menu.js: -------------------------------------------------------------------------------- 1 | const cb = document.getElementById('switch'); 2 | 3 | // Communicate with background worker to enable / disable filter 4 | cb.addEventListener('change', (event) => { 5 | if (event.currentTarget.checked) { 6 | chrome.runtime.sendMessage("bf_enable"); 7 | } else { 8 | chrome.runtime.sendMessage("bf_disable"); 9 | } 10 | }); 11 | 12 | window.onload = function() 13 | { 14 | // Preload settings 15 | chrome.storage.local.get('enabled', function (result) { 16 | cb.checked = result.enabled; 17 | }); 18 | 19 | // Handle hrefs 20 | const links = document.getElementsByTagName("a"); 21 | for(let i = 0; i < links.length; i++) 22 | { 23 | links[i].addEventListener("click", function(e){ 24 | chrome.tabs.create({url: e.target.getAttribute('href')}); 25 | return false; 26 | }); 27 | } 28 | }; 29 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # BolFilter 2 | 3 | Filter onderverkopers automatisch uit de zoekresultaten van Bol.com 4 | 5 | Door een verborgen zoekfilter automatisch toe te passen, worden alle artikelen van onderverkopers automatisch verborgen in je zoekresultaten. 6 | 7 | ## Installatie via de webstore (Aanbevolen!) 8 | 9 | Download met een paar klikken de extensie via de officiële kanalen van je browser en krijg automatisch updates wanneer deze uitkomen. 10 | 11 | **BolFilter voor Google Chrome**\ 12 | **BolFilter voor Mozilla Firefox** (Binnenkort beschikbaar!) 13 | 14 | ## Installatie via source 15 | 16 | Mocht je liever de touwtjes zelf in handen hebben, kun je de extensie ook via de sourcecode installeren.\ 17 | **Let op:** Op deze manier wordt de extensie niet automatisch geüpdate wanneer er nieuwe versies uitkomen. 18 | 19 | ### Chrome 20 | 1. Download de laatste versie van de BolFilter Extension voor Chrome via de Releases tab. 21 | 1. Pak de bestanden uit in een map op je computer. 22 | 1. Volg de "Loading an unpacked extension" instructies van Google 23 | 24 | ### Mozilla Firefox 25 | De Firefox versie is nog in ontwikkeling. Houdt deze repository in de gaten voor updates. 26 | 27 | ## Voorbeeld 28 | 29 | 30 | -------------------------------------------------------------------------------- /assets/chrome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jkctech/BolFilter/556ac24975bd307793cfa6a7c9e0e52624a3bde8/assets/chrome.png -------------------------------------------------------------------------------- /assets/firefox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jkctech/BolFilter/556ac24975bd307793cfa6a7c9e0e52624a3bde8/assets/firefox.png -------------------------------------------------------------------------------- /assets/github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jkctech/BolFilter/556ac24975bd307793cfa6a7c9e0e52624a3bde8/assets/github.png -------------------------------------------------------------------------------- /assets/icon.pdn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jkctech/BolFilter/556ac24975bd307793cfa6a7c9e0e52624a3bde8/assets/icon.pdn -------------------------------------------------------------------------------- /assets/menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jkctech/BolFilter/556ac24975bd307793cfa6a7c9e0e52624a3bde8/assets/menu.png -------------------------------------------------------------------------------- /assets/screenshot.pdn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jkctech/BolFilter/556ac24975bd307793cfa6a7c9e0e52624a3bde8/assets/screenshot.pdn -------------------------------------------------------------------------------- /assets/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jkctech/BolFilter/556ac24975bd307793cfa6a7c9e0e52624a3bde8/assets/screenshot.png --------------------------------------------------------------------------------