From a3f26d89b80f480f348d95f5c533dc004ea22120 Mon Sep 17 00:00:00 2001 From: eight Date: Tue, 12 Sep 2017 20:25:59 +0800 Subject: [PATCH] Fix: _parse -> parseRGB --- js/usercss.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/usercss.js b/js/usercss.js index 85803894..1cf53aa2 100644 --- a/js/usercss.js +++ b/js/usercss.js @@ -50,7 +50,7 @@ var usercss = (function () { // https://bugs.webkit.org/show_bug.cgi?id=14563 document.head.appendChild(el); - function _parse(color) { + function parseRGB(color) { const [r, g, b, a = 1] = color.match(/[.\d]+/g).map(Number); return {r, g, b, a}; } @@ -62,7 +62,7 @@ var usercss = (function () { } color = getComputedStyle(el).color; el.style.color = ''; - return _parse(color); + return parseRGB(color); } function format({r, g, b, a = 1}) {