mirror of https://github.com/calzoneman/sync.git
Skip minification for userscript
This commit is contained in:
parent
d821fc6ccd
commit
84fa7972e3
|
@ -2,7 +2,7 @@
|
||||||
"author": "Calvin Montgomery",
|
"author": "Calvin Montgomery",
|
||||||
"name": "CyTube",
|
"name": "CyTube",
|
||||||
"description": "Online media synchronizer and chat",
|
"description": "Online media synchronizer and chat",
|
||||||
"version": "3.21.0",
|
"version": "3.21.1",
|
||||||
"repository": {
|
"repository": {
|
||||||
"url": "http://github.com/calzoneman/sync"
|
"url": "http://github.com/calzoneman/sync"
|
||||||
},
|
},
|
||||||
|
|
|
@ -162,6 +162,13 @@ module.exports = {
|
||||||
if (!fs.existsSync(cacheDir)) {
|
if (!fs.existsSync(cacheDir)) {
|
||||||
fs.mkdirSync(cacheDir);
|
fs.mkdirSync(cacheDir);
|
||||||
}
|
}
|
||||||
|
app.use((req, res, next) => {
|
||||||
|
if (/\.user\.js/.test(req.url)) {
|
||||||
|
res._no_minify = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
next();
|
||||||
|
});
|
||||||
app.use(require('express-minify')({
|
app.use(require('express-minify')({
|
||||||
cache: cacheDir
|
cache: cacheDir
|
||||||
}));
|
}));
|
||||||
|
|
Loading…
Reference in New Issue