fix: save new rule with hostname

This commit is contained in:
Gabe Yuan
2024-01-19 16:13:46 +08:00
parent d5fc69e210
commit 48b34bf95f

View File

@@ -84,7 +84,7 @@ export default function Popup({ setShowPopup, translator: tran }) {
const tab = await getTabInfo();
href = tab.url;
}
const newRule = { ...rule, pattern: href };
const newRule = { ...rule, pattern: href.split("/")[2] };
if (isExt && tran) {
sendBgMsg(MSG_SAVE_RULE, newRule);
} else {