Skip to content
This repository was archived by the owner on Nov 6, 2023. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix regression caused by previous commit and update comments
  • Loading branch information
Chan Chak Shing committed Apr 12, 2019
commit 0184e8abd5fbd0d2e9d08ce13efc39b0194e4e12
6 changes: 3 additions & 3 deletions chromium/background-scripts/rules.js
Original file line number Diff line number Diff line change
Expand Up @@ -562,10 +562,10 @@ RuleSets.prototype = {
return nullIterable;
}

// Replace www.example.com with *.example.com, however, this
// SHOULD NOT replace example.com with *.com
// Replace www.example.com with www.example.*
// eat away from the right for once and only once
let segmented = host.split(".");
if (segmented.length > 2) {
if (segmented.length > 1) {
let tmp = segmented[segmented.length - 1];

results = (this.targets.has(segmented.join(".")) ?
Expand Down