Skip to content

Commit

Permalink
Update function.js
Browse files Browse the repository at this point in the history
  • Loading branch information
xifangczy committed Oct 2, 2024
1 parent 637ab74 commit c77fd4f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions js/function.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ function isEmpty(obj) {

// 修改请求头
function setRequestHeaders(data = {}, callback = undefined) {
chrome.declarativeNetRequest.updateSessionRules({ removeRuleIds: [1] });
chrome.tabs.getCurrent(function (tabs) {
const rules = { removeRuleIds: [tabs ? tabs.id : 1] };
if (Object.keys(data).length) {
Expand Down

0 comments on commit c77fd4f

Please sign in to comment.