diff --git a/js/usercss.js b/js/usercss.js index b6ab0872..1f4d88ce 100644 --- a/js/usercss.js +++ b/js/usercss.js @@ -110,12 +110,6 @@ var usercss = (() => { } } - function buildMeta(source) { - const style = _buildMeta(source); - validate(style); - return style; - } - function parseWord(state, error = 'invalid word') { const match = state.text.slice(state.re.lastIndex).match(/^([\w-]+)\s*/); if (!match) { @@ -344,7 +338,7 @@ var usercss = (() => { return s; } - function _buildMeta(sourceCode) { + function buildMeta(sourceCode) { sourceCode = sourceCode.replace(/\r\n?/g, '\n'); const usercssData = { @@ -391,6 +385,8 @@ var usercss = (() => { style.url = usercssData.homepageURL; } + validate(style); + return style; }