diff --git a/Makefile b/Makefile index 01f95ce95b..6743f0fafb 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ version = $(shell node -p "JSON.parse(require('fs').readFileSync('version.json') source_directories := \ globals config css platform classes site \ - Archive Filtering General Images Linkification \ + Archive Filtering General Icons Images Linkification \ Menu Miscellaneous Monitoring Posting Quotelinks \ main @@ -51,8 +51,6 @@ uses_tests_enabled := \ imports_src/globals/globals.js := \ version.json -imports_src/css/CSS.js := \ - node_modules/font-awesome/fonts/fontawesome-webfont.woff imports_src/Monitoring/Favicon.coffee := \ src/meta/icon128.png diff --git a/package-lock.json b/package-lock.json index e6d121c4cc..e92924cfa5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3,16 +3,31 @@ "requires": true, "lockfileVersion": 1, "dependencies": { + "@types/q": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.2.tgz", + "integrity": "sha512-ce5d3q03Ex0sy4R14722Rmt6MT07Ua+k4FwDfdcToYJcMKNtRVQvJ6JCAPdAmAnbRb6CsX6aYb9m96NGod9uTw==", + "dev": true + }, "ajv": { - "version": "6.10.1", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.1.tgz", - "integrity": "sha512-w1YQaVGNC6t2UCPjEawK/vo/dG8OOrVtUmhBT1uJJYxbl5kU2Tj3v6LGqBcsysN1yhuCStJCCA3GqdvKY8sqXQ==", + "version": "6.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.0.tgz", + "integrity": "sha512-D6gFiFA0RRLyUbvijN74DWAjXSFxWKaWP7mldxkVhyhAV3+SWA9HEJPHQ2c9soIeTFJqcSdFDGFgdqs1iUU2Hw==", "dev": true, "requires": { - "fast-deep-equal": "2.0.1", - "fast-json-stable-stringify": "2.0.0", - "json-schema-traverse": "0.4.1", - "uri-js": "4.2.2" + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" } }, "argparse": { @@ -21,7 +36,7 @@ "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "dev": true, "requires": { - "sprintf-js": "1.0.3" + "sprintf-js": "~1.0.2" } }, "asn1": { @@ -30,7 +45,7 @@ "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", "dev": true, "requires": { - "safer-buffer": "2.1.2" + "safer-buffer": "~2.1.0" } }, "assert-plus": { @@ -52,9 +67,9 @@ "dev": true }, "aws4": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", - "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==", + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.9.1.tgz", + "integrity": "sha512-wMHVg2EOHaMRxbzgFJ9gtjOOCrI80OHLG14rxi28XwOW8ux6IiEbRCGGGqCtdAIg4FQCbW20k9RsT4y3gJlFug==", "dev": true }, "balanced-match": { @@ -69,16 +84,22 @@ "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", "dev": true, "requires": { - "tweetnacl": "0.14.5" + "tweetnacl": "^0.14.3" } }, + "boolbase": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=", + "dev": true + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "requires": { - "balanced-match": "1.0.0", + "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, @@ -94,13 +115,24 @@ "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", "dev": true }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, "chrome-webstore-upload": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/chrome-webstore-upload/-/chrome-webstore-upload-0.2.2.tgz", "integrity": "sha512-4lqjRnG9MbqWpWgaQDORUB8jcTwEpWGGFWwTiVy00MMrYshV085uwqtHDNNLtHrnnB5U+rwtVV/sHAocm+CVNQ==", "dev": true, "requires": { - "got": "6.7.1" + "got": "^6.3.0" } }, "cli": { @@ -110,7 +142,18 @@ "dev": true, "requires": { "exit": "0.1.2", - "glob": "7.1.4" + "glob": "^7.1.1" + } + }, + "coa": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/coa/-/coa-2.0.2.tgz", + "integrity": "sha512-q5/jG+YQnSy4nRTV4F7lPepBJZ8qBNJJDBuJdoejDyLXgmL7IEo+Le2JDZudFTFt7mrCqIRaSjws4ygRCTCAXA==", + "dev": true, + "requires": { + "@types/q": "^1.5.1", + "chalk": "^2.4.1", + "q": "^1.1.2" } }, "coffeescript": { @@ -119,13 +162,28 @@ "integrity": "sha512-pLXHFxQMPklVoEekowk8b3erNynC+DVJzChxS/LCBBgR6/8AJkHivkm//zbowcfc7BTCAjryuhx6gPqPRfsFoA==", "dev": true }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, "combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", "dev": true, "requires": { - "delayed-stream": "1.0.0" + "delayed-stream": "~1.0.0" } }, "concat-map": { @@ -140,7 +198,7 @@ "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", "dev": true, "requires": { - "date-now": "0.1.4" + "date-now": "^0.1.4" } }, "core-util-is": { @@ -155,7 +213,80 @@ "integrity": "sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y=", "dev": true, "requires": { - "capture-stack-trace": "1.0.1" + "capture-stack-trace": "^1.0.0" + } + }, + "css-select": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-2.1.0.tgz", + "integrity": "sha512-Dqk7LQKpwLoH3VovzZnkzegqNSuAziQyNZUcrdDM401iY+R5NkGBXGmtO05/yaXQziALuPogeG0b7UAgjnTJTQ==", + "dev": true, + "requires": { + "boolbase": "^1.0.0", + "css-what": "^3.2.1", + "domutils": "^1.7.0", + "nth-check": "^1.0.2" + }, + "dependencies": { + "domutils": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz", + "integrity": "sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==", + "dev": true, + "requires": { + "dom-serializer": "0", + "domelementtype": "1" + } + } + } + }, + "css-select-base-adapter": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/css-select-base-adapter/-/css-select-base-adapter-0.1.1.tgz", + "integrity": "sha512-jQVeeRG70QI08vSTwf1jHxp74JoZsr2XSgETae8/xC8ovSnL2WF87GTLO86Sbwdt2lK4Umg4HnnwMO4YF3Ce7w==", + "dev": true + }, + "css-tree": { + "version": "1.0.0-alpha.37", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.37.tgz", + "integrity": "sha512-DMxWJg0rnz7UgxKT0Q1HU/L9BeJI0M6ksor0OgqOnF+aRCDWg/N2641HmVyU9KVIu0OVVWOb2IpC9A+BJRnejg==", + "dev": true, + "requires": { + "mdn-data": "2.0.4", + "source-map": "^0.6.1" + } + }, + "css-what": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-3.2.1.tgz", + "integrity": "sha512-WwOrosiQTvyms+Ti5ZC5vGEK0Vod3FTt1ca+payZqvKuGJF+dq7bG63DstxtN0dpm6FxY27a/zS3Wten+gEtGw==", + "dev": true + }, + "csso": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/csso/-/csso-4.0.3.tgz", + "integrity": "sha512-NL3spysxUkcrOgnpsT4Xdl2aiEiBG6bXswAABQVHcMrfjjBisFOKwLDOmf4wf32aPdcJws1zds2B0Rg+jqMyHQ==", + "dev": true, + "requires": { + "css-tree": "1.0.0-alpha.39" + }, + "dependencies": { + "css-tree": { + "version": "1.0.0-alpha.39", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.39.tgz", + "integrity": "sha512-7UvkEYgBAHRG9Nt980lYxjsTrCyHFN53ky3wVsDkiMdVqylqRt+Zc+jm5qw7/qyOvN2dHSYtX0e4MbCCExSvnA==", + "dev": true, + "requires": { + "mdn-data": "2.0.6", + "source-map": "^0.6.1" + } + }, + "mdn-data": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.6.tgz", + "integrity": "sha512-rQvjv71olwNHgiTbfPZFkJtjNMciWgswYeciZhtvWLO8bmX3TnhyA62I6sTWOyZssWHJJjY6/KiWwqQsWWsqOA==", + "dev": true + } } }, "dashdash": { @@ -164,7 +295,7 @@ "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", "dev": true, "requires": { - "assert-plus": "1.0.0" + "assert-plus": "^1.0.0" } }, "date-now": { @@ -173,6 +304,15 @@ "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=", "dev": true }, + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "dev": true, + "requires": { + "object-keys": "^1.0.12" + } + }, "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -180,19 +320,25 @@ "dev": true }, "dom-serializer": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.1.tgz", - "integrity": "sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA==", + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz", + "integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==", "dev": true, "requires": { - "domelementtype": "1.3.1", - "entities": "1.1.2" + "domelementtype": "^2.0.1", + "entities": "^2.0.0" }, "dependencies": { + "domelementtype": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.0.1.tgz", + "integrity": "sha512-5HOHUDsYZWV8FGWN0Njbr/Rn7f/eWSQi1v7+HsUVwXgn8nWWlL64zKDkS0n8ZmQ3mlWOMuXOnR+7Nx/5tMO5AQ==", + "dev": true + }, "entities": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", - "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.0.0.tgz", + "integrity": "sha512-D9f7V0JSRwIxlRI2mjMqufDrRDnx8p+eEOz7aUM9SuvF8gsBzra0/6tbjl1m8eQHrZlYj6PxqE00hZ1SAIKPLw==", "dev": true } } @@ -209,7 +355,7 @@ "integrity": "sha1-LeWaCCLVAn+r/28DLCsloqir5zg=", "dev": true, "requires": { - "domelementtype": "1.3.1" + "domelementtype": "1" } }, "domutils": { @@ -218,8 +364,8 @@ "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", "dev": true, "requires": { - "dom-serializer": "0.1.1", - "domelementtype": "1.3.1" + "dom-serializer": "0", + "domelementtype": "1" } }, "duplexer3": { @@ -234,8 +380,8 @@ "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", "dev": true, "requires": { - "jsbn": "0.1.1", - "safer-buffer": "2.1.2" + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" } }, "entities": { @@ -244,6 +390,42 @@ "integrity": "sha1-sph6o4ITR/zeZCsk/fyeT7cSvyY=", "dev": true }, + "es-abstract": { + "version": "1.17.5", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.5.tgz", + "integrity": "sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg==", + "dev": true, + "requires": { + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1", + "is-callable": "^1.1.5", + "is-regex": "^1.0.5", + "object-inspect": "^1.7.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.0", + "string.prototype.trimleft": "^2.1.1", + "string.prototype.trimright": "^2.1.1" + } + }, + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, "esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", @@ -269,15 +451,15 @@ "dev": true }, "fast-deep-equal": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", - "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz", + "integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==", "dev": true }, "fast-json-stable-stringify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", - "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", "dev": true }, "font-awesome": { @@ -298,9 +480,9 @@ "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", "dev": true, "requires": { - "asynckit": "0.4.0", - "combined-stream": "1.0.8", - "mime-types": "2.1.24" + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" } }, "fs.realpath": { @@ -309,6 +491,12 @@ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, "get-stream": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", @@ -321,21 +509,21 @@ "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", "dev": true, "requires": { - "assert-plus": "1.0.0" + "assert-plus": "^1.0.0" } }, "glob": { - "version": "7.1.4", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", - "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", "dev": true, "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.4", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" } }, "got": { @@ -344,17 +532,17 @@ "integrity": "sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA=", "dev": true, "requires": { - "create-error-class": "3.0.2", - "duplexer3": "0.1.4", - "get-stream": "3.0.0", - "is-redirect": "1.0.0", - "is-retry-allowed": "1.1.0", - "is-stream": "1.1.0", - "lowercase-keys": "1.0.1", - "safe-buffer": "5.1.2", - "timed-out": "4.0.1", - "unzip-response": "2.0.1", - "url-parse-lax": "1.0.0" + "create-error-class": "^3.0.0", + "duplexer3": "^0.1.4", + "get-stream": "^3.0.0", + "is-redirect": "^1.0.0", + "is-retry-allowed": "^1.0.0", + "is-stream": "^1.0.0", + "lowercase-keys": "^1.0.0", + "safe-buffer": "^5.0.1", + "timed-out": "^4.0.0", + "unzip-response": "^2.0.1", + "url-parse-lax": "^1.0.0" } }, "har-schema": { @@ -369,21 +557,42 @@ "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", "dev": true, "requires": { - "ajv": "6.10.1", - "har-schema": "2.0.0" + "ajv": "^6.5.5", + "har-schema": "^2.0.0" } }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "has-symbols": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", + "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", + "dev": true + }, "htmlparser2": { "version": "3.8.3", "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.8.3.tgz", "integrity": "sha1-mWwosZFRaovoZQGn15dX5ccMEGg=", "dev": true, "requires": { - "domelementtype": "1.3.1", - "domhandler": "2.3.0", - "domutils": "1.5.1", - "entities": "1.0.0", - "readable-stream": "1.1.14" + "domelementtype": "1", + "domhandler": "2.3", + "domutils": "1.5", + "entities": "1.0", + "readable-stream": "1.1" } }, "http-signature": { @@ -392,9 +601,9 @@ "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", "dev": true, "requires": { - "assert-plus": "1.0.0", - "jsprim": "1.4.1", - "sshpk": "1.16.1" + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" } }, "immediate": { @@ -409,8 +618,8 @@ "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "dev": true, "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" + "once": "^1.3.0", + "wrappy": "1" } }, "inherits": { @@ -419,16 +628,37 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, + "is-callable": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz", + "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==", + "dev": true + }, + "is-date-object": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", + "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==", + "dev": true + }, "is-redirect": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-redirect/-/is-redirect-1.0.0.tgz", "integrity": "sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ=", "dev": true }, + "is-regex": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz", + "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==", + "dev": true, + "requires": { + "has": "^1.0.3" + } + }, "is-retry-allowed": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz", - "integrity": "sha1-EaBgVotnM5REAz0BJaYaINVk+zQ=", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz", + "integrity": "sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==", "dev": true }, "is-stream": { @@ -437,6 +667,15 @@ "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", "dev": true }, + "is-symbol": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", + "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", + "dev": true, + "requires": { + "has-symbols": "^1.0.1" + } + }, "is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", @@ -455,6 +694,16 @@ "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", "dev": true }, + "js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, "jsbn": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", @@ -462,19 +711,19 @@ "dev": true }, "jshint": { - "version": "2.10.2", - "resolved": "https://registry.npmjs.org/jshint/-/jshint-2.10.2.tgz", - "integrity": "sha512-e7KZgCSXMJxznE/4WULzybCMNXNAd/bf5TSrvVEq78Q/K8ZwFpmBqQeDtNiHc3l49nV4E/+YeHU/JZjSUIrLAA==", + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/jshint/-/jshint-2.11.0.tgz", + "integrity": "sha512-ooaD/hrBPhu35xXW4gn+o3SOuzht73gdBuffgJzrZBJZPGgGiiTvJEgTyxFvBO2nz0+X1G6etF8SzUODTlLY6Q==", "dev": true, "requires": { - "cli": "1.0.1", - "console-browserify": "1.1.0", - "exit": "0.1.2", - "htmlparser2": "3.8.3", - "lodash": "4.17.14", - "minimatch": "3.0.4", - "shelljs": "0.3.0", - "strip-json-comments": "1.0.4" + "cli": "~1.0.0", + "console-browserify": "1.1.x", + "exit": "0.1.x", + "htmlparser2": "3.8.x", + "lodash": "~4.17.11", + "minimatch": "~3.0.2", + "shelljs": "0.3.x", + "strip-json-comments": "1.0.x" } }, "json-schema": { @@ -508,15 +757,15 @@ } }, "jszip": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.2.2.tgz", - "integrity": "sha512-NmKajvAFQpbg3taXQXr/ccS2wcucR1AZ+NtyWp2Nq7HHVsXhcJFR8p0Baf32C2yVvBylFWVeKf+WI2AnvlPhpA==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.3.0.tgz", + "integrity": "sha512-EJ9k766htB1ZWnsV5ZMDkKLgA+201r/ouFF8R2OigVjVdcm2rurcBrrdXaeqBJbqnUVMko512PYmlncBKE1Huw==", "dev": true, "requires": { - "lie": "3.3.0", - "pako": "1.0.10", - "readable-stream": "2.3.6", - "set-immediate-shim": "1.0.1" + "lie": "~3.3.0", + "pako": "~1.0.2", + "readable-stream": "~2.3.6", + "set-immediate-shim": "~1.0.1" }, "dependencies": { "isarray": { @@ -526,27 +775,33 @@ "dev": true }, "readable-stream": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", "dev": true, "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.4", - "isarray": "1.0.0", - "process-nextick-args": "2.0.1", - "safe-buffer": "5.1.2", - "string_decoder": "1.1.1", - "util-deprecate": "1.0.2" + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" } }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, "string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "requires": { - "safe-buffer": "5.1.2" + "safe-buffer": "~5.1.0" } } } @@ -557,22 +812,22 @@ "integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==", "dev": true, "requires": { - "immediate": "3.0.6" + "immediate": "~3.0.5" } }, "linkify-it": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-2.1.0.tgz", - "integrity": "sha512-4REs8/062kV2DSHxNfq5183zrqXMl7WP0WzABH9IeJI+NLm429FgE1PDecltYfnOoFDFlZGh2T8PfZn0r+GTRg==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-2.2.0.tgz", + "integrity": "sha512-GnAl/knGn+i1U/wjBz3akz2stz+HrHLsxMwHQGofCDfPvlf+gDKN58UtfmUquTY4/MXeE2x7k19KQmeoZi94Iw==", "dev": true, "requires": { - "uc.micro": "1.0.6" + "uc.micro": "^1.0.1" } }, "lodash": { - "version": "4.17.14", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.14.tgz", - "integrity": "sha512-mmKYbW3GLuJeX+iGP+Y7Gp1AiGHGbXHCOh/jZmrawMmsE7MS4znI3RL2FsjbqOyMayHInjOeykW7PEajUk1/xw==", + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", "dev": true }, "lodash._reinterpolate": { @@ -587,8 +842,8 @@ "integrity": "sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A==", "dev": true, "requires": { - "lodash._reinterpolate": "3.0.0", - "lodash.templatesettings": "4.2.0" + "lodash._reinterpolate": "^3.0.0", + "lodash.templatesettings": "^4.0.0" } }, "lodash.templatesettings": { @@ -597,7 +852,7 @@ "integrity": "sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ==", "dev": true, "requires": { - "lodash._reinterpolate": "3.0.0" + "lodash._reinterpolate": "^3.0.0" } }, "lowercase-keys": { @@ -607,30 +862,36 @@ "dev": true }, "markdown-it": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-9.0.0.tgz", - "integrity": "sha512-bUVTYGt/K/mYr3HlE+PBe6TOTyWghcpSZqOD9t+NFRlwJMhp9Kp6WQ8fJ26I6v1Xo71UmPYt1S4Hc9Lq8GZx2Q==", + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-10.0.0.tgz", + "integrity": "sha512-YWOP1j7UbDNz+TumYP1kpwnP0aEa711cJjrAQrzd0UXlbJfc5aAq0F/PZHjiioqDC1NKgvIMX+o+9Bk7yuM2dg==", "dev": true, "requires": { - "argparse": "1.0.10", - "entities": "1.1.2", - "linkify-it": "2.1.0", - "mdurl": "1.0.1", - "uc.micro": "1.0.6" + "argparse": "^1.0.7", + "entities": "~2.0.0", + "linkify-it": "^2.0.0", + "mdurl": "^1.0.1", + "uc.micro": "^1.0.5" }, "dependencies": { "entities": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", - "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.0.0.tgz", + "integrity": "sha512-D9f7V0JSRwIxlRI2mjMqufDrRDnx8p+eEOz7aUM9SuvF8gsBzra0/6tbjl1m8eQHrZlYj6PxqE00hZ1SAIKPLw==", "dev": true } } }, "markdown-it-anchor": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/markdown-it-anchor/-/markdown-it-anchor-5.2.4.tgz", - "integrity": "sha512-n8zCGjxA3T+Mx1pG8HEgbJbkB8JFUuRkeTZQuIM8iPY6oQ8sWOPRZJDFC9a/pNg2QkHEjjGkhBEl/RSyzaDZ3A==", + "version": "5.2.7", + "resolved": "https://registry.npmjs.org/markdown-it-anchor/-/markdown-it-anchor-5.2.7.tgz", + "integrity": "sha512-REFmIaSS6szaD1bye80DMbp7ePwsPNvLTR5HunsUcZ0SG0rWJQ+Pz24R4UlTKtjKBPhxo0v0tOBDYjZQQknW8Q==", + "dev": true + }, + "mdn-data": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.4.tgz", + "integrity": "sha512-iV3XNKw06j5Q7mi6h+9vbx23Tv7JkjEVgKHW4pimwyDGWm0OIQntJJ+u1C6mg6mK1EaTv42XQ7w76yuzH7M2cA==", "dev": true }, "mdurl": { @@ -640,18 +901,18 @@ "dev": true }, "mime-db": { - "version": "1.40.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz", - "integrity": "sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA==", + "version": "1.43.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.43.0.tgz", + "integrity": "sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ==", "dev": true }, "mime-types": { - "version": "2.1.24", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.24.tgz", - "integrity": "sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ==", + "version": "2.1.26", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.26.tgz", + "integrity": "sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ==", "dev": true, "requires": { - "mime-db": "1.40.0" + "mime-db": "1.43.0" } }, "minimatch": { @@ -660,7 +921,31 @@ "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, "requires": { - "brace-expansion": "1.1.11" + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true + }, + "mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "nth-check": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz", + "integrity": "sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg==", + "dev": true, + "requires": { + "boolbase": "~1.0.0" } }, "oauth-sign": { @@ -669,19 +954,65 @@ "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", "dev": true }, + "object-inspect": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz", + "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==", + "dev": true + }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true + }, + "object.assign": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", + "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.0", + "object-keys": "^1.0.11" + } + }, + "object.getownpropertydescriptors": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz", + "integrity": "sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1" + } + }, + "object.values": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.1.tgz", + "integrity": "sha512-WTa54g2K8iu0kmS/us18jEmdv1a4Wi//BZ/DTVYEcH0XhLM5NYdpDHja3gt57VrZLcNAO2WGA+KpWsDBaHt6eA==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1", + "function-bind": "^1.1.1", + "has": "^1.0.3" + } + }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, "requires": { - "wrappy": "1.0.2" + "wrappy": "1" } }, "pako": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.10.tgz", - "integrity": "sha512-0DTvPVU3ed8+HNXOu5Bs+o//Mbdj9VNQMUOe9oKCwh8l0GNwpTDMKCWbRjgtD291AWnkAgkqA/LOnQS8AmS1tw==", + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", "dev": true }, "path-is-absolute": { @@ -709,9 +1040,9 @@ "dev": true }, "psl": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.2.0.tgz", - "integrity": "sha512-GEn74ZffufCmkDDLNcl3uuyF/aSD6exEyh1v/ZSdAomB82t6G9hzJVRx0jBmLDW+VfZqks3aScmMw9DszwUalA==", + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", "dev": true }, "punycode": { @@ -720,6 +1051,12 @@ "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "dev": true }, + "q": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", + "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=", + "dev": true + }, "qs": { "version": "6.5.2", "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", @@ -732,44 +1069,44 @@ "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", "dev": true, "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.4", + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", "isarray": "0.0.1", - "string_decoder": "0.10.31" + "string_decoder": "~0.10.x" } }, "request": { - "version": "2.88.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", - "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", - "dev": true, - "requires": { - "aws-sign2": "0.7.0", - "aws4": "1.8.0", - "caseless": "0.12.0", - "combined-stream": "1.0.8", - "extend": "3.0.2", - "forever-agent": "0.6.1", - "form-data": "2.3.3", - "har-validator": "5.1.3", - "http-signature": "1.2.0", - "is-typedarray": "1.0.0", - "isstream": "0.1.2", - "json-stringify-safe": "5.0.1", - "mime-types": "2.1.24", - "oauth-sign": "0.9.0", - "performance-now": "2.1.0", - "qs": "6.5.2", - "safe-buffer": "5.1.2", - "tough-cookie": "2.4.3", - "tunnel-agent": "0.6.0", - "uuid": "3.3.2" + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "dev": true, + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" } }, "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz", + "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==", "dev": true }, "safer-buffer": { @@ -778,6 +1115,12 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "dev": true }, + "sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", + "dev": true + }, "set-immediate-shim": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", @@ -790,6 +1133,12 @@ "integrity": "sha1-NZbmMHp4FUT1kfN9phg2DzHbV7E=", "dev": true }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", @@ -802,15 +1151,63 @@ "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", "dev": true, "requires": { - "asn1": "0.2.4", - "assert-plus": "1.0.0", - "bcrypt-pbkdf": "1.0.2", - "dashdash": "1.14.1", - "ecc-jsbn": "0.1.2", - "getpass": "0.1.7", - "jsbn": "0.1.1", - "safer-buffer": "2.1.2", - "tweetnacl": "0.14.5" + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + } + }, + "stable": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/stable/-/stable-0.1.8.tgz", + "integrity": "sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==", + "dev": true + }, + "string.prototype.trimend": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz", + "integrity": "sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5" + } + }, + "string.prototype.trimleft": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.2.tgz", + "integrity": "sha512-gCA0tza1JBvqr3bfAIFJGqfdRTyPae82+KTnm3coDXkZN9wnuW3HjGgN386D7hfv5CHQYCI022/rJPVlqXyHSw==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5", + "string.prototype.trimstart": "^1.0.0" + } + }, + "string.prototype.trimright": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.2.tgz", + "integrity": "sha512-ZNRQ7sY3KroTaYjRS6EbNiiHrOkjihL9aQE/8gfQ4DtAC/aEBRHFJa44OmoWxGGqXuJlfKkZW4WcXErGr+9ZFg==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5", + "string.prototype.trimend": "^1.0.0" + } + }, + "string.prototype.trimstart": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz", + "integrity": "sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5" } }, "string_decoder": { @@ -825,6 +1222,42 @@ "integrity": "sha1-HhX7ysl9Pumb8tc7TGVrCCu6+5E=", "dev": true }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "svg-boundings": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/svg-boundings/-/svg-boundings-2.0.6.tgz", + "integrity": "sha512-Rg35dZ0q59m8WoFhMItK8oqZuOSwuVM0h+ykza0P8RZh48RGHQ/8n9icYSfV6bac5OIxpCKSi8bpjlhXIjA/oA==", + "dev": true + }, + "svgo": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/svgo/-/svgo-1.3.2.tgz", + "integrity": "sha512-yhy/sQYxR5BkC98CY7o31VGsg014AKLEPxdfhora76l36hD9Rdy5NZA/Ocn6yayNPgSamYdtX2rFJdcv07AYVw==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "coa": "^2.0.2", + "css-select": "^2.0.0", + "css-select-base-adapter": "^0.1.1", + "css-tree": "1.0.0-alpha.37", + "csso": "^4.0.2", + "js-yaml": "^3.13.1", + "mkdirp": "~0.5.1", + "object.values": "^1.1.0", + "sax": "~1.2.4", + "stable": "^0.1.8", + "unquote": "~1.1.1", + "util.promisify": "~1.0.0" + } + }, "timed-out": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", @@ -832,21 +1265,13 @@ "dev": true }, "tough-cookie": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", - "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", "dev": true, "requires": { - "psl": "1.2.0", - "punycode": "1.4.1" - }, - "dependencies": { - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "dev": true - } + "psl": "^1.1.28", + "punycode": "^2.1.1" } }, "tunnel-agent": { @@ -855,7 +1280,7 @@ "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", "dev": true, "requires": { - "safe-buffer": "5.1.2" + "safe-buffer": "^5.0.1" } }, "tweetnacl": { @@ -870,6 +1295,12 @@ "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==", "dev": true }, + "unquote": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/unquote/-/unquote-1.1.1.tgz", + "integrity": "sha1-j97XMk7G6IoP+LkF58CYzcCG1UQ=", + "dev": true + }, "unzip-response": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/unzip-response/-/unzip-response-2.0.1.tgz", @@ -882,7 +1313,7 @@ "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", "dev": true, "requires": { - "punycode": "2.1.1" + "punycode": "^2.1.0" } }, "url-parse-lax": { @@ -891,7 +1322,7 @@ "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", "dev": true, "requires": { - "prepend-http": "1.0.4" + "prepend-http": "^1.0.1" } }, "util-deprecate": { @@ -900,10 +1331,22 @@ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", "dev": true }, + "util.promisify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.1.tgz", + "integrity": "sha512-g9JpC/3He3bm38zsLupWryXHoEcS22YHthuPQSJdMy6KNrzIRzWqcsHzD/WUnqe45whVou4VIsPew37DoXWNrA==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.2", + "has-symbols": "^1.0.1", + "object.getownpropertydescriptors": "^2.1.0" + } + }, "uuid": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", - "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", "dev": true }, "verror": { @@ -912,9 +1355,9 @@ "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", "dev": true, "requires": { - "assert-plus": "1.0.0", + "assert-plus": "^1.0.0", "core-util-is": "1.0.2", - "extsprintf": "1.3.0" + "extsprintf": "^1.2.0" } }, "wrappy": { diff --git a/package.json b/package.json index ea35267fda..f9cb2cb2dc 100644 --- a/package.json +++ b/package.json @@ -120,12 +120,15 @@ "coffeescript": "=1.12.7", "esprima": "^4.0.1", "font-awesome": "=4.7.0", - "jshint": "^2.10.2", - "jszip": "^3.2.2", + "jshint": "^2.11.0", + "jszip": "^3.3.0", "lodash.template": "^4.5.0", - "markdown-it": "^9.0.0", - "markdown-it-anchor": "^5.2.4", - "request": "^2.88.0" + "markdown-it": "^10.0.0", + "markdown-it-anchor": "^5.2.7", + "request": "^2.88.2", + "sax": "^1.2.4", + "svg-boundings": "^2.0.6", + "svgo": "^1.3.2" }, "repository": { "type": "git", diff --git a/src/Filtering/PostHiding.coffee b/src/Filtering/PostHiding.coffee index fd132f499e..1aad2bce51 100644 --- a/src/Filtering/PostHiding.coffee +++ b/src/Filtering/PostHiding.coffee @@ -158,8 +158,9 @@ PostHiding = makeButton: (post, type) -> span = $.el 'span', - className: "fa fa-#{if type is 'hide' then 'minus' else 'plus'}-square-o" - textContent: "" + className: 'fourchan-x--icon icon--small' + icon = (if type is 'hide' then 'minus_square_o' else 'plus_square_o') + Icon.set span, icon a = $.el 'a', className: "#{type}-reply-button" href: 'javascript:;' @@ -183,7 +184,7 @@ PostHiding = toggle: -> post = Get.postFromNode @ - PostHiding[(if post.isHidden then 'show' else 'hide')] post + PostHiding[(if post.isHidden then 'show' else 'hide')] post PostHiding.saveHiddenState post, post.isHidden hide: (post, makeStub=Conf['Stubs'], hideRecursively=Conf['Recursive Hiding']) -> diff --git a/src/Filtering/ThreadHiding.coffee b/src/Filtering/ThreadHiding.coffee index bee113adff..a2e1d52a16 100644 --- a/src/Filtering/ThreadHiding.coffee +++ b/src/Filtering/ThreadHiding.coffee @@ -90,7 +90,7 @@ ThreadHiding = className: 'show-thread-link' textContent: 'Show' href: 'javascript:;' - $.on div, 'click', ThreadHiding.menu.show + $.on div, 'click', ThreadHiding.menu.show Menu.menu.addEntry el: div @@ -139,7 +139,8 @@ ThreadHiding = a = $.el 'a', className: "#{type}-thread-button" href: 'javascript:;' - $.extend a, `<%= html('') %>` + icon = (if type is 'hide' then 'minus_square' else 'plus_square') + $.extend a, `<%= html('&{$.getOwn(Icons, icon)}') %>` a.dataset.fullID = thread.fullID $.on a, 'click', ThreadHiding.toggle a diff --git a/src/General/Header.coffee b/src/General/Header.coffee index be9f7b8046..df8835a24c 100644 --- a/src/General/Header.coffee +++ b/src/General/Header.coffee @@ -113,8 +113,9 @@ Header = if g.SITE.software is 'yotsuba' and (g.VIEW is 'catalog' or !Conf['Disable Native Extension']) cs = $.el 'a', href: 'javascript:;' if g.VIEW is 'catalog' - cs.title = cs.textContent = 'Catalog Settings' - cs.className = 'fa fa-book' + cs.title = 'Catalog Settings' + cs.className = 'fourchan-x--icon icon--large' + Icon.set cs, 'book', 'Catalog Settings' else cs.title = cs.textContent = '4chan Settings' cs.className = 'native-settings' diff --git a/src/General/Index.coffee b/src/General/Index.coffee index 4830517c5f..7779491c56 100644 --- a/src/General/Index.coffee +++ b/src/General/Index.coffee @@ -43,10 +43,10 @@ Index = # Header refresh button @button = $.el 'a', - className: 'fa fa-refresh' + className: 'fourchan-x--icon icon--large' title: 'Refresh' href: 'javascript:;' - textContent: 'Refresh Index' + Icon.set @button, 'refresh', 'Refresh Index' $.on @button, 'click', -> Index.update() Header.addShortcut 'index-refresh', @button, 590 @@ -188,7 +188,7 @@ Index = threadIDs = Index.threadsOnPage pageNum Index.buildStructure threadIDs - + endNotice: do -> notify = false reset = -> notify = false diff --git a/src/General/Settings.coffee b/src/General/Settings.coffee index db469443dd..a340e22f52 100644 --- a/src/General/Settings.coffee +++ b/src/General/Settings.coffee @@ -2,10 +2,10 @@ Settings = init: -> # 4chan X settings link link = $.el 'a', - className: 'settings-link fa fa-wrench' - textContent: 'Settings' + className: 'settings-link fourchan-x--icon icon--large' title: '<%= meta.name %> Settings' href: 'javascript:;' + Icon.set link, 'wrench', 'Settings' $.on link, 'click', Settings.open Header.addShortcut 'settings', link, 820 diff --git a/src/General/Settings/Settings.html b/src/General/Settings/Settings.html index 79d337643f..577e47df5d 100644 --- a/src/General/Settings/Settings.html +++ b/src/General/Settings/Settings.html @@ -10,7 +10,7 @@ <%= meta.name %> |  ${g.VERSION} |  Issues |  - + &{Icons.close}
diff --git a/src/Icons/Icon.coffee b/src/Icons/Icon.coffee new file mode 100644 index 0000000000..1de371d91b --- /dev/null +++ b/src/Icons/Icon.coffee @@ -0,0 +1,8 @@ +Icon = + set: (node, name, altText) -> + node.dataset.icon = name + html = $.getOwn(Icons, name) + if altText + $.extend node, `<%= html('${altText}&{html}') %>` + else + $.extend node, html diff --git a/src/Icons/Icons.coffee b/src/Icons/Icons.coffee new file mode 100644 index 0000000000..b31dd38605 --- /dev/null +++ b/src/Icons/Icons.coffee @@ -0,0 +1,27 @@ +### +Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome +License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) +### +Icons = + angle_down: `<%= readHTML('angle_down.svg') %>`, + bolt: `<%= readHTML('bolt.svg') %>`, + book: `<%= readHTML('book.svg') %>`, + clipboard: `<%= readHTML('clipboard.svg') %>`, + clock_o: `<%= readHTML('clock_o.svg') %>`, + close: `<%= readHTML('close.svg') %>`, + comment_o: `<%= readHTML('comment_o.svg') %>`, + compress: `<%= readHTML('compress.svg') %>`, + download: `<%= readHTML('download.svg') %>`, + edit: `<%= readHTML('edit.svg') %>`, + expand: `<%= readHTML('expand.svg') %>`, + eye: `<%= readHTML('eye.svg') %>`, + heart: `<%= readHTML('heart.svg') %>`, + link: `<%= readHTML('link.svg') %>`, + minus_square: `<%= readHTML('minus_square.svg') %>`, + minus_square_o: `<%= readHTML('minus_square_o.svg') %>`, + picture_o: `<%= readHTML('picture_o.svg') %>`, + plus_square: `<%= readHTML('plus_square.svg') %>`, + plus_square_o: `<%= readHTML('plus_square_o.svg') %>`, + refresh: `<%= readHTML('refresh.svg') %>`, + times_circle: `<%= readHTML('times_circle.svg') %>`, + wrench: `<%= readHTML('wrench.svg') %>` diff --git a/src/Icons/angle_down.svg b/src/Icons/angle_down.svg new file mode 100644 index 0000000000..6e95549bd7 --- /dev/null +++ b/src/Icons/angle_down.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/Icons/bolt.svg b/src/Icons/bolt.svg new file mode 100644 index 0000000000..7b49e42fd1 --- /dev/null +++ b/src/Icons/bolt.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/Icons/book.svg b/src/Icons/book.svg new file mode 100644 index 0000000000..e0770f8a87 --- /dev/null +++ b/src/Icons/book.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/Icons/clipboard.svg b/src/Icons/clipboard.svg new file mode 100644 index 0000000000..4ec87a3650 --- /dev/null +++ b/src/Icons/clipboard.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/Icons/clock_o.svg b/src/Icons/clock_o.svg new file mode 100644 index 0000000000..071d71a6a9 --- /dev/null +++ b/src/Icons/clock_o.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/Icons/close.svg b/src/Icons/close.svg new file mode 100644 index 0000000000..f836affed8 --- /dev/null +++ b/src/Icons/close.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/Icons/comment_o.svg b/src/Icons/comment_o.svg new file mode 100644 index 0000000000..865fea73a3 --- /dev/null +++ b/src/Icons/comment_o.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/Icons/compress.svg b/src/Icons/compress.svg new file mode 100644 index 0000000000..3f42d66543 --- /dev/null +++ b/src/Icons/compress.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/Icons/download.svg b/src/Icons/download.svg new file mode 100644 index 0000000000..09314514a3 --- /dev/null +++ b/src/Icons/download.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/Icons/edit.svg b/src/Icons/edit.svg new file mode 100644 index 0000000000..f4300556dc --- /dev/null +++ b/src/Icons/edit.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/Icons/expand.svg b/src/Icons/expand.svg new file mode 100644 index 0000000000..5e75b083d1 --- /dev/null +++ b/src/Icons/expand.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/Icons/eye.svg b/src/Icons/eye.svg new file mode 100644 index 0000000000..68314a8c9a --- /dev/null +++ b/src/Icons/eye.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/Icons/heart.svg b/src/Icons/heart.svg new file mode 100644 index 0000000000..389141807f --- /dev/null +++ b/src/Icons/heart.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/Icons/link.svg b/src/Icons/link.svg new file mode 100644 index 0000000000..fa0d6c0edf --- /dev/null +++ b/src/Icons/link.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/Icons/minus_square.svg b/src/Icons/minus_square.svg new file mode 100644 index 0000000000..f398964242 --- /dev/null +++ b/src/Icons/minus_square.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/Icons/minus_square_o.svg b/src/Icons/minus_square_o.svg new file mode 100644 index 0000000000..08219d3a4d --- /dev/null +++ b/src/Icons/minus_square_o.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/Icons/picture_o.svg b/src/Icons/picture_o.svg new file mode 100644 index 0000000000..c9ceb4ddf7 --- /dev/null +++ b/src/Icons/picture_o.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/Icons/plus_square.svg b/src/Icons/plus_square.svg new file mode 100644 index 0000000000..9d0e168949 --- /dev/null +++ b/src/Icons/plus_square.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/Icons/plus_square_o.svg b/src/Icons/plus_square_o.svg new file mode 100644 index 0000000000..01fab9a032 --- /dev/null +++ b/src/Icons/plus_square_o.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/Icons/refresh.svg b/src/Icons/refresh.svg new file mode 100644 index 0000000000..32cc00850a --- /dev/null +++ b/src/Icons/refresh.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/Icons/times_circle.svg b/src/Icons/times_circle.svg new file mode 100644 index 0000000000..4df76e7189 --- /dev/null +++ b/src/Icons/times_circle.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/Icons/wrench.svg b/src/Icons/wrench.svg new file mode 100644 index 0000000000..9a3ab2042e --- /dev/null +++ b/src/Icons/wrench.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/Images/Gallery.coffee b/src/Images/Gallery.coffee index a05fe64d88..bbe2c08cdb 100644 --- a/src/Images/Gallery.coffee +++ b/src/Images/Gallery.coffee @@ -7,8 +7,8 @@ Gallery = el = $.el 'a', href: 'javascript:;' title: 'Gallery' - className: 'fa fa-picture-o' - textContent: 'Gallery' + className: 'fourchan-x--icon icon--large' + Icon.set el, 'picture_o', 'Gallery' $.on el, 'click', @cb.toggle diff --git a/src/Images/ImageExpand.coffee b/src/Images/ImageExpand.coffee index d73846b29b..14b07a847f 100644 --- a/src/Images/ImageExpand.coffee +++ b/src/Images/ImageExpand.coffee @@ -3,10 +3,10 @@ ImageExpand = return if not (@enabled = Conf['Image Expansion'] and g.VIEW in ['index', 'thread']) @EAI = $.el 'a', - className: 'expand-all-shortcut fa fa-expand' - textContent: 'EAI' + className: 'expand-all-shortcut fourchan-x--icon icon--large' title: 'Expand All Images' href: 'javascript:;' + Icon.set @EAI, 'expand', 'EAI' $.on @EAI, 'click', @cb.toggleAll Header.addShortcut 'expand-all', @EAI, 520 @@ -22,7 +22,7 @@ ImageExpand = return unless @file and (@file.isImage or @file.isVideo) $.on @file.thumbLink, 'click', ImageExpand.cb.toggle - if @isClone + if @isClone if @file.isExpanding # If we clone a post where the image is still loading, # make it loading in the clone too. @@ -66,12 +66,14 @@ ImageExpand = $.queueTask func, post if ImageExpand.on = $.hasClass ImageExpand.EAI, 'expand-all-shortcut' - ImageExpand.EAI.className = 'contract-all-shortcut fa fa-compress' + ImageExpand.EAI.className = 'contract-all-shortcut fourchan-x--icon icon--large' ImageExpand.EAI.title = 'Contract All Images' + Icon.set ImageExpand.EAI, 'compress', 'CAI' func = ImageExpand.expand else - ImageExpand.EAI.className = 'expand-all-shortcut fa fa-expand' + ImageExpand.EAI.className = 'expand-all-shortcut fourchan-x--icon icon--large' ImageExpand.EAI.title = 'Expand All Images' + Icon.set ImageExpand.EAI, 'expand', 'EAI' func = ImageExpand.contract g.posts.forEach (post) -> diff --git a/src/Images/ImageLoader.coffee b/src/Images/ImageLoader.coffee index 5458871f58..c40587b5b4 100644 --- a/src/Images/ImageLoader.coffee +++ b/src/Images/ImageLoader.coffee @@ -20,8 +20,8 @@ ImageLoader = el = $.el 'a', href: 'javascript:;' title: 'Prefetch Images' - className: 'fa fa-bolt disabled' - textContent: 'Prefetch' + className: 'fourchan-x--icon icon--large disabled' + Icon.set el, 'bolt', 'Prefetch' $.on el, 'click', @toggle diff --git a/src/Menu/Menu.coffee b/src/Menu/Menu.coffee index b503fd90da..bc20702526 100644 --- a/src/Menu/Menu.coffee +++ b/src/Menu/Menu.coffee @@ -3,10 +3,10 @@ Menu = return unless g.VIEW in ['index', 'thread'] and Conf['Menu'] @button = $.el 'a', - className: 'menu-button' + className: 'menu-button fourchan-x--icon icon--small' href: 'javascript:;' - $.extend @button, `<%= html('') %>` + Icon.set @button, 'angle_down' @menu = new UI.Menu 'post' Callbacks.Post.push diff --git a/src/Miscellaneous/FileInfo.coffee b/src/Miscellaneous/FileInfo.coffee index a7f6137853..5dfe4e693c 100644 --- a/src/Miscellaneous/FileInfo.coffee +++ b/src/Miscellaneous/FileInfo.coffee @@ -51,8 +51,8 @@ FileInfo = else `<%= html('${shortname}${fullname}') %>` N: -> `<%= html('${this.file.name}') %>` - d: -> `<%= html('') %>` - f: -> `<%= html('') %>` + d: -> `<%= html('&{Icons.download}') %>` + f: -> `<%= html('&{Icons.close}') %>` p: -> `<%= html('?{this.file.isSpoiler}{Spoiler, }') %>` s: -> `<%= html('${this.file.size}') %>` B: -> `<%= html('${Math.round(this.file.sizeInBytes)} Bytes') %>` diff --git a/src/Miscellaneous/PSAHiding.coffee b/src/Miscellaneous/PSAHiding.coffee index b04058b404..34710f0da7 100644 --- a/src/Miscellaneous/PSAHiding.coffee +++ b/src/Miscellaneous/PSAHiding.coffee @@ -25,8 +25,9 @@ PSAHiding = PSAHiding.btn = btn = $.el 'a', title: 'Mark announcement as read and hide.' - className: 'hide-announcement-button fa fa-minus-square' + className: 'hide-announcement-button fourchan-x--icon' href: 'javascript:;' + Icon.set btn, 'minus_square' $.on btn, 'click', PSAHiding.toggle if psa.firstChild?.tagName is 'HR' $.after psa.firstChild, btn diff --git a/src/Monitoring/ThreadWatcher.coffee b/src/Monitoring/ThreadWatcher.coffee index 187f15dfb9..e5822e7216 100644 --- a/src/Monitoring/ThreadWatcher.coffee +++ b/src/Monitoring/ThreadWatcher.coffee @@ -4,10 +4,10 @@ ThreadWatcher = @shortcut = sc = $.el 'a', id: 'watcher-link' - textContent: 'Watcher' title: 'Thread Watcher' href: 'javascript:;' - className: 'fa fa-eye' + className: 'fourchan-x--icon icon--large ' + Icon.set sc, 'eye', 'Watcher' @db = new DataBoard 'watchedThreads', @refresh, true @dbLM = new DataBoard 'watcherLastModified', null, true @@ -91,7 +91,8 @@ ThreadWatcher = else toggler = $.el 'a', href: 'javascript:;' - className: 'watch-thread-link' + className: 'watch-thread-link fourchan-x--icon icon--large' + Icon.set toggler, 'heart' $.before $('input', @nodes.info), toggler siteID = g.SITE.ID boardID = @board.ID @@ -400,8 +401,9 @@ ThreadWatcher = makeLine: (siteID, boardID, threadID, data) -> x = $.el 'a', - className: 'fa fa-times' + className: 'fourchan-x--icon' href: 'javascript:;' + Icon.set x, 'close' $.on x, 'click', ThreadWatcher.cb.rm {excerpt, isArchived} = data diff --git a/src/Monitoring/ThreadWatcher/ThreadWatcher.html b/src/Monitoring/ThreadWatcher/ThreadWatcher.html index 373709e72e..5d1c33f4a7 100644 --- a/src/Monitoring/ThreadWatcher/ThreadWatcher.html +++ b/src/Monitoring/ThreadWatcher/ThreadWatcher.html @@ -1,7 +1,7 @@
- Thread Watcher + Thread Watcher &{Icons.refresh} - + &{Icons.angle_down} ×
diff --git a/src/Posting/QR.coffee b/src/Posting/QR.coffee index 1a1562857f..dbda37e7b7 100644 --- a/src/Posting/QR.coffee +++ b/src/Posting/QR.coffee @@ -35,10 +35,10 @@ QR = cb: @node @shortcut = sc = $.el 'a', - className: 'fa fa-comment-o disabled' - textContent: 'QR' + className: 'fourchan-x--icon icon--large disabled' title: 'Quick Reply' href: 'javascript:;' + Icon.set sc, 'comment_o', 'QR' $.on sc, 'click', -> return unless QR.postingIsEnabled if Conf['Persistent QR'] or !QR.nodes or QR.nodes.el.hidden diff --git a/src/Posting/QR.post.coffee b/src/Posting/QR.post.coffee index 8eab7d5e28..a8db37998c 100644 --- a/src/Posting/QR.post.coffee +++ b/src/Posting/QR.post.coffee @@ -4,7 +4,7 @@ QR.post = class className: 'qr-preview' draggable: true href: 'javascript:;' - $.extend el, `<%= html('') %>` + $.extend el, `<%= html('&{Icons.times_circle}') %>` @nodes = el: el diff --git a/src/Posting/QR/QuickReply.html b/src/Posting/QR/QuickReply.html index 51a58f961f..c8367b0a45 100644 --- a/src/Posting/QR/QuickReply.html +++ b/src/Posting/QR/QuickReply.html @@ -40,12 +40,12 @@ S - - - - - - + &{Icons.edit} + &{Icons.times_circle} + &{Icons.link} + + &{Icons.clock_o} + &{Icons.plus_square} @@ -62,4 +62,4 @@ - + diff --git a/src/classes/Notice.coffee b/src/classes/Notice.coffee index bbebab5f6c..7780349311 100644 --- a/src/classes/Notice.coffee +++ b/src/classes/Notice.coffee @@ -1,7 +1,7 @@ class Notice constructor: (type, content, @timeout, @onclose) -> @el = $.el 'div', - `<%= html('
') %>` + `<%= html('&{Icons.close}
') %>` @el.style.opacity = 0 @setType type $.on @el.firstElementChild, 'click', @close diff --git a/src/css/CSS.js b/src/css/CSS.js index 8d106a0892..360919c441 100644 --- a/src/css/CSS.js +++ b/src/css/CSS.js @@ -1,15 +1,13 @@ <% var inc = require['style']; - var faCSS = read('/node_modules/font-awesome/css/font-awesome.css'); - var faWebFont = readBase64('/node_modules/font-awesome/fonts/fontawesome-webfont.woff'); - var mainCSS = ['font-awesome', 'style', 'yotsuba', 'yotsuba-b', 'futaba', 'burichan', 'tomorrow', 'photon', 'spooky'].map(x => read(`${x}.css`)).join(''); + var mainCSS = ['style', 'yotsuba', 'yotsuba-b', 'futaba', 'burichan', 'tomorrow', 'photon', 'spooky'].map(x => read(`${x}.css`)).join(''); var iconNames = files.filter(f => /^linkify\.[^.]+\.png$/.test(f)); var icons = iconNames.map(readBase64); %>CSS = { boards: <%= multiline( - inc.fa(faCSS, faWebFont) + mainCSS + inc.icons(iconNames, icons) + read('supports.css') + mainCSS + inc.icons(iconNames, icons) + read('supports.css') ) %>, report: diff --git a/src/css/burichan.css b/src/css/burichan.css index 065b0f92a3..ef9c6da136 100644 --- a/src/css/burichan.css +++ b/src/css/burichan.css @@ -96,9 +96,3 @@ :root.burichan .replies-quoting-you > a, :root.burichan #watcher-link.replies-quoting-you, :root.burichan .last-page > a > .watcher-page { color: #F00; } - -/* Watcher Favicon */ -:root.burichan .watch-thread-link -{ - background-image: url("data:image/svg+xml,"); -} diff --git a/src/css/font-awesome.css b/src/css/font-awesome.css deleted file mode 100644 index fe6e559244..0000000000 --- a/src/css/font-awesome.css +++ /dev/null @@ -1,54 +0,0 @@ -.fa::before { - font-family: FontAwesome; - font-weight: 400; - font-style: normal; - -webkit-font-smoothing: antialiased; - text-decoration: inherit; - speak: none; - display: inline-block; - font-size: 13px; - visibility: visible; -} - -:root:not(.shortcut-icons) #shortcuts .fa::before { - display: none; -} -:root.shortcut-icons #shortcuts .fa::before { - font-size: 15px !important; - margin-top: -3px !important; - position: relative; - top: 1px; -} -:root.shortcut-icons #shortcuts .fa, .menu-button .fa { - font-size: 0; - visibility: hidden; -} -:root.shortcut-icons .shortcut.brackets-wrap::after, -:root.shortcut-icons .shortcut.brackets-wrap::before { - display: none; -} -:root.shortcut-icons #shortcuts a .fa, -.menu-button .fa, -.hide-reply-button .fa, -.hide-thread-button .fa { - display: inline; -} - -.fa-spin::before { - -webkit-animation:spin 2s infinite linear; - -moz-animation:spin 2s infinite linear; - -o-animation:spin 2s infinite linear; - animation:spin 2s infinite linear; -} -@-moz-keyframes spin { - 0% {-moz-transform:rotate(0deg);} - 100% {-moz-transform:rotate(359deg);} -} -@-webkit-keyframes spin { - 0% {-webkit-transform:rotate(0deg);} - 100% {-webkit-transform:rotate(359deg);} -} -@keyframes spin { - 0% {transform:rotate(0deg);} - 100% {transform:rotate(359deg);} -} diff --git a/src/css/futaba.css b/src/css/futaba.css index 5fbe337c14..e18d751e34 100644 --- a/src/css/futaba.css +++ b/src/css/futaba.css @@ -96,9 +96,3 @@ :root.futaba .replies-quoting-you > a, :root.futaba #watcher-link.replies-quoting-you, :root.futaba .last-page > a > .watcher-page { color: #F00; } - -/* Watcher Favicon */ -:root.futaba .watch-thread-link -{ - background-image: url("data:image/svg+xml,"); -} diff --git a/src/css/photon.css b/src/css/photon.css index 4cb64bc663..24400ee50b 100644 --- a/src/css/photon.css +++ b/src/css/photon.css @@ -102,9 +102,3 @@ :root.photon .replies-quoting-you > a, :root.photon #watcher-link.replies-quoting-you, :root.photon .last-page > a > .watcher-page { color: #00F !important; } - -/* Watcher Favicon */ -:root.photon .watch-thread-link -{ - background-image: url("data:image/svg+xml,"); -} diff --git a/src/css/spooky.css b/src/css/spooky.css index 7211d6a520..6970fce0a0 100644 --- a/src/css/spooky.css +++ b/src/css/spooky.css @@ -168,9 +168,3 @@ :root.spooky .replies-quoting-you > a, :root.spooky #watcher-link.replies-quoting-you, :root.spooky .last-page > a > .watcher-page { color: #F00 !important; } - -/* Watcher Favicon */ -:root.spooky .watch-thread-link -{ - background-image: url("data:image/svg+xml,"); -} diff --git a/src/css/style.css b/src/css/style.css index 72e394520d..961471721e 100644 --- a/src/css/style.css +++ b/src/css/style.css @@ -74,6 +74,38 @@ body.hasDropDownNav{ display: none !important; } +/* Icons */ +.fourchan-x--icon > .inline-svg--fa { + height: 14px; + margin: -11px 0 -3px; +} +:root.shortcut-icons #shortcuts .icon--alt-text, +:root:not(.shortcut-icons) #shortcuts .fourchan-x--icon > .inline-svg--fa { + display: none; +} +:root.shortcut-icons .shortcut.brackets-wrap::before, +:root.shortcut-icons .shortcut.brackets-wrap::after { + display: none; +} +.fa-spin > .inline-svg--fa { + -webkit-animation: spin 2s infinite linear; + -moz-animation: spin 2s infinite linear; + -o-animation: spin 2s infinite linear; + animation: spin 2s infinite linear; +} +@-webkit-keyframes spin { + 0% {-webkit-transform:rotate(0deg);} + 100% {-webkit-transform:rotate(359deg);} +} +@-moz-keyframes spin { + 0% {-moz-transform:rotate(0deg);} + 100% {-moz-transform:rotate(359deg);} +} +@keyframes spin { + 0% {transform:rotate(0deg);} + 100% {transform:rotate(359deg);} +} + /* 4chan style fixes */ /* overrides 4chan CSS on div.opContainer, div.op */ :root.sw-yotsuba .opContainer, :root.sw-yotsuba .op { @@ -910,12 +942,6 @@ div[data-checked="false"] > .suboption-list { vertical-align: text-top; padding-left: 2px; } -.catalog-stats > .menu-button { - font-weight: normal; -} -.catalog-stats > .menu-button > i::before { - line-height: 11px; -} .catalog-stats { font-size: 10px; font-weight: 700; @@ -1218,15 +1244,9 @@ textarea.copy-text-element { padding: 0px 4px; } .watch-thread-link { - padding-top: 18px; - width: 18px; - height: 0px; - display: inline-block; - background-repeat: no-repeat; opacity: 0.2; position: relative; - top: 1px; - background-image: url("data:image/svg+xml,"); + top: -2px; } .watch-thread-link.watched { opacity: 1; @@ -1620,7 +1640,7 @@ $site$thread[hidden] + hr { } #qr .close { float: right; - padding: 0 3px; + margin: 2px 0 1px 2px; } .qr-link-container { text-align: center; @@ -2022,6 +2042,10 @@ input[type="checkbox"]:checked ~ .checkbox-letter { color: #e00; padding: 1px; } +.remove > .fourchan-x--icon > .inline-svg--fa { + -webkit-filter: drop-shadow(0 0 2px #000); + filter: drop-shadow(0 0 2px #000); +} a:only-of-type > .remove { display: none; } @@ -2071,8 +2095,7 @@ a:only-of-type > .remove { } /* Menu */ -.menu-button:not(.fa-bars) { - display: inline-block; +.menu-button { position: relative; cursor: pointer; } @@ -2085,10 +2108,9 @@ a:only-of-type > .remove { vertical-align: middle; } .postInfo > .menu-button, -#thread-watcher .menu-button { - width: 18px; - height: 15px; - text-align: center; +#thread-watcher .menu-button, +.stub > .menu-button { + margin: 0 3px; } #menu { position: fixed; @@ -2198,8 +2220,7 @@ a:only-of-type > .remove { flex: 1; } #embedding .jump { - margin: -1px 4px; - text-decoration: none; + margin: 0 4px; } /* Gallery */ diff --git a/src/css/style.inc b/src/css/style.inc index 8eb7dae906..18f9da441e 100644 --- a/src/css/style.inc +++ b/src/css/style.inc @@ -1,28 +1,5 @@ /* jshint esnext: true */ -// == Reprocess Font Awesome CSS == // -var fa = (css, font) => ( - -// Font Awesome CSS attribution and license -css.match(/\/\*\![^]*?\*\//)[0] + '\n' + - -// Font Awesome web font -`@font-face { - font-family: FontAwesome; - src: url('data:application/font-woff;base64,${font}') format('woff'); - font-weight: 400; - font-style: normal; -} -` + - -// fa-[icon name] classes -css - .match(/(\.fa-[^{]*{\s*content:[^}]*}\s*)+/)[0] - .replace(/([,{;])\s+/g, '$1') - .replace(/,/g, ', ') - -); - // == Create CSS for Link Title Favicons == // var icons = (names, data) => ( @@ -38,4 +15,4 @@ names.map((file, i) => ); -return {fa, icons}; +return {icons}; diff --git a/src/css/tomorrow.css b/src/css/tomorrow.css index e3ce82ddd5..d4b3044aa9 100644 --- a/src/css/tomorrow.css +++ b/src/css/tomorrow.css @@ -173,9 +173,3 @@ :root.tomorrow .replies-quoting-you > a, :root.tomorrow #watcher-link.replies-quoting-you, :root.tomorrow .last-page > a > .watcher-page { color: #F00 !important; } - -/* Watcher Favicon */ -:root.tomorrow .watch-thread-link -{ - background-image: url("data:image/svg+xml,"); -} diff --git a/src/css/yotsuba-b.css b/src/css/yotsuba-b.css index b04f9246cd..e67c59f303 100644 --- a/src/css/yotsuba-b.css +++ b/src/css/yotsuba-b.css @@ -100,9 +100,3 @@ :root.yotsuba-b .replies-quoting-you > a, :root.yotsuba-b #watcher-link.replies-quoting-you { color: #F00; } - -/* Watcher Favicon */ -:root.yotsuba-b .watch-thread-link -{ - background-image: url("data:image/svg+xml,"); -} diff --git a/src/css/yotsuba.css b/src/css/yotsuba.css index ea8b8d799c..faf027416a 100644 --- a/src/css/yotsuba.css +++ b/src/css/yotsuba.css @@ -99,9 +99,3 @@ :root.yotsuba .replies-quoting-you > a, :root.yotsuba #watcher-link.replies-quoting-you, :root.yotsuba .last-page > a > .watcher-page { color: #F00; } - -/* Watcher Favicon */ -:root.yotsuba .watch-thread-link -{ - background-image: url("data:image/svg+xml,"); -} diff --git a/src/main/Main.coffee b/src/main/Main.coffee index 0e79a5d736..093750cdf3 100644 --- a/src/main/Main.coffee +++ b/src/main/Main.coffee @@ -294,12 +294,6 @@ Main = background-color: rgba(#{rgb[...3].join(', ')}, #{0.5*(rgb[3] || 1)}); } """ - if $.luma(rgb) < 100 - css += """ - .watch-thread-link { - background-image: url("data:image/svg+xml,"); - } - """ Main.bgColorStyle.textContent = css $.after $.id('fourchanx-css'), Main.bgColorStyle @@ -521,7 +515,7 @@ Main = unless nodes[i] (cb() if cb) return - setTimeout softTask, 0 + setTimeout softTask, 0 softTask() diff --git a/tools/.jshintrc b/tools/.jshintrc index 0c96136129..a6b224cef6 100644 --- a/tools/.jshintrc +++ b/tools/.jshintrc @@ -1,5 +1,5 @@ { - "esnext": true, + "esversion": 8, "undef": true, "unused": true, "node": true diff --git a/tools/icons.js b/tools/icons.js new file mode 100644 index 0000000000..43565b4baa --- /dev/null +++ b/tools/icons.js @@ -0,0 +1,49 @@ +var fs = require('fs'); +var path = require('path'); +var parser = require('sax').parser(true); +var svgo = new (require('svgo'))(); + +var variables = require.resolve('font-awesome/less/variables.less'); +var font = require.resolve('font-awesome/fonts/fontawesome-webfont.svg'); + +var characters = new Map(); +var lines = fs.readFileSync(variables, {encoding: 'utf-8'}).split('\n'); +for (var line of lines) { + var match = line.match(/^@fa-var-([\w-]+):\s*"\\([0-9a-z]{4})"/); + if (match) { + var character = String.fromCharCode(parseInt(match[2], 16)); + characters.set(match[1], character); + } +} + +var glyphs = new Map(); +var parser = require('sax').parser(true); +parser.onopentag = function(x) { + var a = x.attributes; + if (x.name == 'glyph' && a.unicode && a.d) { + glyphs.set(a.unicode, a); + } +}; +parser.write(fs.readFileSync(font)).close(); + +async function generate(name) { + var glyph = glyphs.get(characters.get(name)); + if (!glyph) { + throw new Error('Icon not found'); + } + var svg = ``; + svg = (await svgo.optimize(svg)).data; + return svg; +} + +async function save(name) { + try { + var svg = await generate(name.replace(/_/g, '-')); + var dest = path.resolve(__dirname, '..', 'src', 'Icons', `${name}.svg`); + return fs.promises.writeFile(dest, svg); + } catch(err) { + console.error(`Error generating icon ${name}:`, err); + } +} + +Promise.all(process.argv.slice(2).map(save));