Skip minification for userscript

This commit is contained in:
Calvin Montgomery 2016-08-30 21:20:42 -07:00
parent d821fc6ccd
commit 84fa7972e3
2 changed files with 8 additions and 1 deletions

View File

@ -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"
}, },

View File

@ -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
})); }));