webpack-userscript
Version:
A Webpack plugin for userscript projects.
23 lines • 813 B
JavaScript
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
;