diff --git a/README.md b/README.md index 5ce483d8..5dac4140 100644 --- a/README.md +++ b/README.md @@ -277,9 +277,9 @@ const config = await loadConfig(configFile, cwd) ## Backers -| [](https://sheetjs.com/) | [](http://fontello.com/) | +| [](https://sheetjs.com/) | [](https://fontello.com/) | |:-:|:-:| -| [SheetJS LLC](https://sheetjs.com/) | [Fontello](http://fontello.com/) | +| [SheetJS LLC](https://sheetjs.com/) | [Fontello](https://fontello.com/) | ## Donations diff --git a/package.json b/package.json index 4d846595..c0c0cff0 100644 --- a/package.json +++ b/package.json @@ -21,17 +21,17 @@ { "name": "Sergey Belov", "email": "peimei@ya.ru", - "url": "http://github.com/arikon" + "url": "https://github.com/arikon" }, { "name": "Lev Solntsev", "email": "lev.sun@ya.ru", - "url": "http://github.com/GreLI" + "url": "https://github.com/GreLI" }, { "name": "Bogdan Chadkin", "email": "trysound@yandex.ru", - "url": "http://github.com/TrySound" + "url": "https://github.com/TrySound" } ], "repository": { diff --git a/plugins/_collections.js b/plugins/_collections.js index 8850e587..46837771 100644 --- a/plugins/_collections.js +++ b/plugins/_collections.js @@ -1,6 +1,6 @@ 'use strict'; -// http://www.w3.org/TR/SVG11/intro.html#Definitions +// https://www.w3.org/TR/SVG11/intro.html#Definitions exports.elemsGroups = { animation: ['animate', 'animateColor', 'animateMotion', 'animateTransform', 'set'], descriptive: ['desc', 'metadata', 'title'], @@ -19,7 +19,7 @@ exports.textElems = exports.elemsGroups.textContent.concat('title'); exports.pathElems = ['path', 'glyph', 'missing-glyph']; -// http://www.w3.org/TR/SVG11/intro.html#Definitions +// https://www.w3.org/TR/SVG11/intro.html#Definitions exports.attrsGroups = { animationAddition: ['additive', 'accumulate'], animationAttributeTarget: ['attributeType', 'attributeName'], @@ -158,7 +158,7 @@ exports.attrsGroupsDefaults = { transferFunction: {slope: '1', intercept: '0', amplitude: '1', exponent: '1', offset: '0'} }; -// http://www.w3.org/TR/SVG11/eltindex.html +// https://www.w3.org/TR/SVG11/eltindex.html exports.elems = { a: { attrsGroups: [ @@ -2269,7 +2269,7 @@ exports.elems = { } }; -// http://wiki.inkscape.org/wiki/index.php/Inkscape-specific_XML_attributes +// https://wiki.inkscape.org/wiki/index.php/Inkscape-specific_XML_attributes exports.editorNamespaces = [ 'http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd', 'http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd', @@ -2295,7 +2295,7 @@ exports.editorNamespaces = [ 'http://www.vector.evaxdesign.sk' ]; -// http://www.w3.org/TR/SVG11/linking.html#processingIRI +// https://www.w3.org/TR/SVG11/linking.html#processingIRI exports.referencesProps = [ 'clip-path', 'color-profile', @@ -2309,7 +2309,7 @@ exports.referencesProps = [ 'style' ]; -// http://www.w3.org/TR/SVG11/propidx.html +// https://www.w3.org/TR/SVG11/propidx.html exports.inheritableAttrs = [ 'clip-rule', 'color', @@ -2370,7 +2370,7 @@ exports.presentationNonInheritableGroupAttrs = [ 'visibility' ]; -// http://www.w3.org/TR/SVG11/single-page.html#types-ColorKeywords +// https://www.w3.org/TR/SVG11/single-page.html#types-ColorKeywords exports.colorsNames = { 'aliceblue': '#f0f8ff', 'antiquewhite': '#faebd7', @@ -2557,7 +2557,7 @@ exports.colorsShortNames = { '#f5deb3': 'wheat' }; -// http://www.w3.org/TR/SVG11/single-page.html#types-DataTypeColor +// https://www.w3.org/TR/SVG11/single-page.html#types-DataTypeColor exports.colorsProps = [ 'color', 'fill', 'stroke', 'stop-color', 'flood-color', 'lighting-color' ]; diff --git a/plugins/_path.js b/plugins/_path.js index d9f0c410..7a0cd5a2 100644 --- a/plugins/_path.js +++ b/plugins/_path.js @@ -75,7 +75,7 @@ exports.path2js = function(path) { data = data.map(Number); // Subsequent moveto pairs of coordinates are threated as implicit lineto commands - // http://www.w3.org/TR/SVG11/paths.html#PathDataMovetoCommands + // https://www.w3.org/TR/SVG11/paths.html#PathDataMovetoCommands if (instruction == 'M' || instruction == 'm') { pathData.push({ instruction: pathData.length == 0 ? 'M' : instruction, @@ -354,7 +354,7 @@ function transformPoint(matrix, x, y) { /** * Compute Cubic Bézie bounding box. * - * @see http://processingjs.nihongoresources.com/bezierinfo/ + * @see https://pomax.github.io/bezierinfo/ * * @param {Float} xa * @param {Float} ya @@ -461,7 +461,7 @@ function computeCubicFirstDerivativeRoots(a, b, c, d) { /** * Compute Quadratic Bézier bounding box. * - * @see http://processingjs.nihongoresources.com/bezierinfo/ + * @see https://pomax.github.io/bezierinfo/ * * @param {Float} xa * @param {Float} ya @@ -623,7 +623,7 @@ function set(dest, source) { /** * Checks if two paths have an intersection by checking convex hulls * collision using Gilbert-Johnson-Keerthi distance algorithm - * http://entropyinteractive.com/2011/04/gjk-algorithm/ + * https://web.archive.org/web/20180822200027/http://entropyinteractive.com/2011/04/gjk-algorithm/ * * @param {Array} path1 JS path representation * @param {Array} path2 JS path representation @@ -852,7 +852,7 @@ function gatherPoints(points, item, index, path) { /** * Forms a convex hull from set of points of every subpath using monotone chain convex hull algorithm. - * http://en.wikibooks.org/wiki/Algorithm_Implementation/Geometry/Convex_hull/Monotone_chain + * https://en.wikibooks.org/wiki/Algorithm_Implementation/Geometry/Convex_hull/Monotone_chain * * @param points An array of [X, Y] coordinates */ @@ -914,7 +914,7 @@ function cross(o, a, b) { function a2c(x1, y1, rx, ry, angle, large_arc_flag, sweep_flag, x2, y2, recursive) { // for more information of where this Math came from visit: - // http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes + // https://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes var _120 = Math.PI * 120 / 180, rad = Math.PI / 180 * (+angle || 0), res = [], diff --git a/plugins/_transforms.js b/plugins/_transforms.js index b050b65c..11c01982 100644 --- a/plugins/_transforms.js +++ b/plugins/_transforms.js @@ -115,7 +115,7 @@ var mth = exports.mth = { /** * Decompose matrix into simple transforms. See - * http://frederic-wang.fr/decomposition-of-2d-transform-matrices.html + * https://frederic-wang.fr/decomposition-of-2d-transform-matrices.html * * @param {Object} data matrix transform object * @return {Object|Array} transforms array or original transform object diff --git a/plugins/cleanupEnableBackground.js b/plugins/cleanupEnableBackground.js index 5ceb9517..579a1ab2 100644 --- a/plugins/cleanupEnableBackground.js +++ b/plugins/cleanupEnableBackground.js @@ -9,7 +9,7 @@ exports.description = 'remove or cleanup enable-background attribute when possib /** * Remove or cleanup enable-background attr which coincides with a width/height box. * - * @see http://www.w3.org/TR/SVG11/filters.html#EnableBackgroundProperty + * @see https://www.w3.org/TR/SVG11/filters.html#EnableBackgroundProperty * * @example * diff --git a/plugins/convertColors.js b/plugins/convertColors.js index 12f4ac11..a4341170 100644 --- a/plugins/convertColors.js +++ b/plugins/convertColors.js @@ -24,8 +24,8 @@ var collections = require('./_collections'), /** * Convert different colors formats in element attributes to hex. * - * @see http://www.w3.org/TR/SVG11/types.html#DataTypeColor - * @see http://www.w3.org/TR/SVG11/single-page.html#types-ColorKeywords + * @see https://www.w3.org/TR/SVG11/types.html#DataTypeColor + * @see https://www.w3.org/TR/SVG11/single-page.html#types-ColorKeywords * * @example * Convert color name keyword to long hex: diff --git a/plugins/convertEllipseToCircle.js b/plugins/convertEllipseToCircle.js index 9d4d9396..16f789aa 100644 --- a/plugins/convertEllipseToCircle.js +++ b/plugins/convertEllipseToCircle.js @@ -9,7 +9,7 @@ exports.description = 'converts non-eccentric s to s'; /** * Converts non-eccentric s to s. * - * @see http://www.w3.org/TR/SVG11/shapes.html + * @see https://www.w3.org/TR/SVG11/shapes.html * * @param {Object} item current iteration item * @return {Boolean} if false, item will be filtered out diff --git a/plugins/convertPathData.js b/plugins/convertPathData.js index 3b7bf4f5..f64baf28 100644 --- a/plugins/convertPathData.js +++ b/plugins/convertPathData.js @@ -48,7 +48,7 @@ var pathElems = require('./_collections.js').pathElems, * trim useless delimiters and leading zeros, * decrease accuracy of floating-point numbers. * - * @see http://www.w3.org/TR/SVG11/paths.html#PathData + * @see https://www.w3.org/TR/SVG11/paths.html#PathData * * @param {Object} item current iteration item * @param {Object} params plugin params diff --git a/plugins/convertShapeToPath.js b/plugins/convertShapeToPath.js index 2330e41e..f4b5ed6f 100644 --- a/plugins/convertShapeToPath.js +++ b/plugins/convertShapeToPath.js @@ -18,7 +18,7 @@ var none = { value: 0 }, * It also allows further optimizations like * combining paths with similar attributes. * - * @see http://www.w3.org/TR/SVG11/shapes.html + * @see https://www.w3.org/TR/SVG11/shapes.html * * @param {Object} item current iteration item * @param {Object} params plugin params diff --git a/plugins/convertTransform.js b/plugins/convertTransform.js index 61cdabf4..83d3d795 100644 --- a/plugins/convertTransform.js +++ b/plugins/convertTransform.js @@ -35,7 +35,7 @@ var cleanupOutData = require('../lib/svgo/tools').cleanupOutData, * convert transforms to the matrices and multiply them all into one, * remove useless transforms. * - * @see http://www.w3.org/TR/SVG11/coords.html#TransformMatrixDefined + * @see https://www.w3.org/TR/SVG11/coords.html#TransformMatrixDefined * * @param {Object} item current iteration item * @param {Object} params plugin params diff --git a/plugins/removeEmptyContainers.js b/plugins/removeEmptyContainers.js index 0c1046a6..28fde16c 100644 --- a/plugins/removeEmptyContainers.js +++ b/plugins/removeEmptyContainers.js @@ -11,7 +11,7 @@ var container = require('./_collections').elemsGroups.container; /** * Remove empty containers. * - * @see http://www.w3.org/TR/SVG11/intro.html#TermContainerElement + * @see https://www.w3.org/TR/SVG11/intro.html#TermContainerElement * * @example * diff --git a/plugins/removeEmptyText.js b/plugins/removeEmptyText.js index d2a09d01..13704de7 100644 --- a/plugins/removeEmptyText.js +++ b/plugins/removeEmptyText.js @@ -15,7 +15,7 @@ exports.params = { /** * Remove empty Text elements. * - * @see http://www.w3.org/TR/SVG11/text.html + * @see https://www.w3.org/TR/SVG11/text.html * * @example * Remove empty text element: diff --git a/plugins/removeHiddenElems.js b/plugins/removeHiddenElems.js index 80d4b601..cf7fdd52 100644 --- a/plugins/removeHiddenElems.js +++ b/plugins/removeHiddenElems.js @@ -59,7 +59,7 @@ exports.fn = function (item, params) { // display="none" // - // http://www.w3.org/TR/SVG11/painting.html#DisplayProperty + // https://www.w3.org/TR/SVG11/painting.html#DisplayProperty // "A value of display: none indicates that the given element // and its children shall not be rendered directly" if ( @@ -69,7 +69,7 @@ exports.fn = function (item, params) { // opacity="0" // - // http://www.w3.org/TR/SVG11/masking.html#ObjectAndGroupOpacityProperties + // https://www.w3.org/TR/SVG11/masking.html#ObjectAndGroupOpacityProperties if ( params.opacity0 && item.hasAttr('opacity', '0') && @@ -79,7 +79,7 @@ exports.fn = function (item, params) { // Circles with zero radius // - // http://www.w3.org/TR/SVG11/shapes.html#CircleElementRAttribute + // https://www.w3.org/TR/SVG11/shapes.html#CircleElementRAttribute // "A value of zero disables rendering of the element" // // @@ -92,7 +92,7 @@ exports.fn = function (item, params) { // Ellipse with zero x-axis radius // - // http://www.w3.org/TR/SVG11/shapes.html#EllipseElementRXAttribute + // https://www.w3.org/TR/SVG11/shapes.html#EllipseElementRXAttribute // "A value of zero disables rendering of the element" // // @@ -105,7 +105,7 @@ exports.fn = function (item, params) { // Ellipse with zero y-axis radius // - // http://www.w3.org/TR/SVG11/shapes.html#EllipseElementRYAttribute + // https://www.w3.org/TR/SVG11/shapes.html#EllipseElementRYAttribute // "A value of zero disables rendering of the element" // // @@ -118,7 +118,7 @@ exports.fn = function (item, params) { // Rectangle with zero width // - // http://www.w3.org/TR/SVG11/shapes.html#RectElementWidthAttribute + // https://www.w3.org/TR/SVG11/shapes.html#RectElementWidthAttribute // "A value of zero disables rendering of the element" // // @@ -131,7 +131,7 @@ exports.fn = function (item, params) { // Rectangle with zero height // - // http://www.w3.org/TR/SVG11/shapes.html#RectElementHeightAttribute + // https://www.w3.org/TR/SVG11/shapes.html#RectElementHeightAttribute // "A value of zero disables rendering of the element" // // @@ -145,7 +145,7 @@ exports.fn = function (item, params) { // Pattern with zero width // - // http://www.w3.org/TR/SVG11/pservers.html#PatternElementWidthAttribute + // https://www.w3.org/TR/SVG11/pservers.html#PatternElementWidthAttribute // "A value of zero disables rendering of the element (i.e., no paint is applied)" // // @@ -157,7 +157,7 @@ exports.fn = function (item, params) { // Pattern with zero height // - // http://www.w3.org/TR/SVG11/pservers.html#PatternElementHeightAttribute + // https://www.w3.org/TR/SVG11/pservers.html#PatternElementHeightAttribute // "A value of zero disables rendering of the element (i.e., no paint is applied)" // // @@ -169,7 +169,7 @@ exports.fn = function (item, params) { // Image with zero width // - // http://www.w3.org/TR/SVG11/struct.html#ImageElementWidthAttribute + // https://www.w3.org/TR/SVG11/struct.html#ImageElementWidthAttribute // "A value of zero disables rendering of the element" // // @@ -181,7 +181,7 @@ exports.fn = function (item, params) { // Image with zero height // - // http://www.w3.org/TR/SVG11/struct.html#ImageElementHeightAttribute + // https://www.w3.org/TR/SVG11/struct.html#ImageElementHeightAttribute // "A value of zero disables rendering of the element" // // @@ -193,7 +193,7 @@ exports.fn = function (item, params) { // Path with empty data // - // http://www.w3.org/TR/SVG11/paths.html#DAttribute + // https://www.w3.org/TR/SVG11/paths.html#DAttribute // // if ( @@ -204,7 +204,7 @@ exports.fn = function (item, params) { // Polyline with empty points // - // http://www.w3.org/TR/SVG11/shapes.html#PolylineElementPointsAttribute + // https://www.w3.org/TR/SVG11/shapes.html#PolylineElementPointsAttribute // // if ( @@ -215,7 +215,7 @@ exports.fn = function (item, params) { // Polygon with empty points // - // http://www.w3.org/TR/SVG11/shapes.html#PolygonElementPointsAttribute + // https://www.w3.org/TR/SVG11/shapes.html#PolygonElementPointsAttribute // // if ( diff --git a/plugins/removeMetadata.js b/plugins/removeMetadata.js index 116aaf17..e848af57 100644 --- a/plugins/removeMetadata.js +++ b/plugins/removeMetadata.js @@ -9,7 +9,7 @@ exports.description = 'removes '; /** * Remove . * - * http://www.w3.org/TR/SVG11/metadata.html + * https://www.w3.org/TR/SVG11/metadata.html * * @param {Object} item current iteration item * @return {Boolean} if false, item will be filtered out diff --git a/plugins/removeStyleElement.js b/plugins/removeStyleElement.js index 3fe72496..4e6205b7 100644 --- a/plugins/removeStyleElement.js +++ b/plugins/removeStyleElement.js @@ -9,7 +9,7 @@ exports.description = 'removes