UNPKG

webpack-userscript

Version:
23 lines 813 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SetDefaultTags = void 0; const const_1 = require("..//const"); const feature_1 = require("./feature"); class SetDefaultTags extends feature_1.Feature { constructor() { super(...arguments); this.name = 'SetDefaultTags'; } apply({ hooks }) { hooks.headers.tap(this.constructor.name, (headers, { locale }) => { if (locale === const_1.DEFAULT_LOCALE_KEY && headers.include === undefined && headers.match === undefined) { return Object.assign(Object.assign({}, headers), { match: '*://*/*' }); } return headers; }); } } exports.SetDefaultTags = SetDefaultTags; //# sourceMappingURL=default-tags.js.map