File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 22092209 if (!this.hpRules) this.hpRules = [];
22102210 let url = this.curSiteRule && this.curSiteRule.url, self = this;
22112211 let href = location.href.slice(0, 500);
2212+ if (instead) {
2213+ this.hpRules = this.hpRules.filter(item => {
2214+ return item && !(new RegExp(item.url, "i").test(href) && self.ruleMatch(item));
2215+ });
2216+ }
22122217 let matchedRules = this.hpRules.filter(rule => JSON.stringify(rule) != JSON.stringify(self.curSiteRule) && new RegExp(rule.url, "i").test(href) && self.ruleMatch(rule));
22132218 if (url) matchedRules.unshift(this.curSiteRule);
22142219 matchedRules.sort((a, b) => {
57425747 ruleParser.customRules.unshift(editTemp);
57435748 ruleParser.curSiteRule = editTemp;
57445749 } else {
5745- if (ruleParser.hpRules) {
5746- let href = location.href.slice(0, 500);
5747- ruleParser.hpRules = ruleParser.hpRules.filter(item => {
5748- return item && !(new RegExp(item.url, "i").test(href) && ruleParser.ruleMatch(item));
5749- });
5750- }
57515750 ruleParser.curSiteRule = {};
57525751 isPause = true;
57535752 }
You can’t perform that action at this time.
0 commit comments