From dc6ab724801e705044808d9d9aa38fc91656a5db Mon Sep 17 00:00:00 2001 From: Brett Zamir Date: Fri, 18 May 2018 12:40:50 +0800 Subject: [PATCH] - Update Opera and jQuery links - Use `https://` (fix #172), including in prompt for URL and relevant code comments (where available and naturally not on namespaces) - Comment out broken link in svg-editor.html - Trailing space --- README.md | 14 +++++++------- docs/Acknowledgements.md | 2 +- docs/SvgCanvas.md | 6 +++--- editor/browser.js | 2 +- editor/canvg/canvg.js | 10 +++++----- editor/canvg/rgbcolor.js | 2 +- editor/contextmenu/jquery.contextMenu.js | 4 ++-- editor/extensions/ext-mathjax.js | 2 +- editor/extensions/filesave.php | 4 ++-- editor/extensions/imagelib/index.html | 2 +- editor/images/svg_edit_icons.svg | 2 +- editor/jgraduate/css/jgraduate.css | 12 ++++++------ editor/jquery-svg.js | 2 +- editor/js-hotkeys/README.md | 8 ++++---- editor/path.js | 2 +- editor/pathseg.js | 10 +++++----- editor/spinbtn/JQuerySpinBtn.css | 2 +- editor/spinbtn/JQuerySpinBtn.js | 2 +- editor/svg-editor.html | 7 +++++-- editor/svg-editor.js | 8 ++++---- editor/svgcanvas.js | 14 +++++++------- editor/svgedit.js | 2 +- editor/svgicons/jquery.svgicons.js | 2 +- editor/svgutils.js | 2 +- editor/units.js | 2 +- screencasts/svgopen2010/index.html | 8 ++++---- 26 files changed, 68 insertions(+), 65 deletions(-) diff --git a/README.md b/README.md index 19ff1d97..d4cacb04 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -![alt text](https://svg-edit.github.io/svgedit/images/logo48x48.svg "svg-edit logo of a pencil") SVG-edit +![alt text](https://svg-edit.github.io/svgedit/images/logo48x48.svg "svg-edit logo of a pencil") SVG-edit === SVG-edit is a fast, web-based, javascript-driven SVG drawing editor that works in any modern browser. @@ -17,10 +17,10 @@ SVG-edit is a fast, web-based, javascript-driven SVG drawing editor that works i ## Videos - * [SVG-edit 2.4 Part 1](http://www.youtube.com/watch?v=zpC7b1ZJvvM) - * [SVG-edit 2.4 Part 2](http://www.youtube.com/watch?v=mDzZEoGUDe8) - * [SVG-edit 2.3 Features](http://www.youtube.com/watch?v=RVIcIy5fXOc) - * [Introduction to SVG-edit](http://www.youtube.com/watch?v=ZJKmEI06YiY) (Version 2.2) + * [SVG-edit 2.4 Part 1](https://www.youtube.com/watch?v=zpC7b1ZJvvM) + * [SVG-edit 2.4 Part 2](https://www.youtube.com/watch?v=mDzZEoGUDe8) + * [SVG-edit 2.3 Features](https://www.youtube.com/watch?v=RVIcIy5fXOc) + * [Introduction to SVG-edit](https://www.youtube.com/watch?v=ZJKmEI06YiY) (Version 2.2) ## Supported browsers @@ -36,6 +36,6 @@ The following browsers had been tested for 2.6 or earlier and will probably cont * See [docs](docs/) for more documentation. * [Acknowledgements](docs/Acknowledgements.md) lists open source projects used in svg-edit. * See [AUTHORS](AUTHORS) file for authors. - * [Stackoverflow](http://stackoverflow.com/tags/svg-edit) group. + * [Stackoverflow](https://stackoverflow.com/tags/svg-edit) group. * Join the [svg-edit mailing list](https://groups.google.com/forum/#!forum/svg-edit). - * Join us on `#svg-edit` on `freenode.net` (or use the [web client](http://webchat.freenode.net/?channels=svg-edit)). + * Join us on `#svg-edit` on `freenode.net` (or use the [web client](https://webchat.freenode.net/?channels=svg-edit)). diff --git a/docs/Acknowledgements.md b/docs/Acknowledgements.md index 77f75f72..7380d2fd 100644 --- a/docs/Acknowledgements.md +++ b/docs/Acknowledgements.md @@ -18,7 +18,7 @@ Gabe Lerner's excellent [canvg](https://github.com/gabelerner/canvg) library has ## jQuery UI -We use [jQuery-UI](http://jqueryui.com) for making the dialog boxes (color picker, document properties) draggable, as well as for the opacity slider. +We use [jQuery-UI](https://jqueryui.com) for making the dialog boxes (color picker, document properties) draggable, as well as for the opacity slider. ## js-hotkeys diff --git a/docs/SvgCanvas.md b/docs/SvgCanvas.md index 331ef47e..fb64230e 100644 --- a/docs/SvgCanvas.md +++ b/docs/SvgCanvas.md @@ -20,7 +20,7 @@ Function | Description [`Utils.convertToXMLReferences`](#utilsconverttoxmlreferences) | Converts a string to use XML references [`rectsIntersect`](#rectsintersect) | Check if two rectangles (BBoxes objects) intersect each other [`snapToAngle`](#snaptoangle) | Returns a 45 degree angle coordinate associated with the two given coordinates -[`text2xml`](#text2xml) | Cross-browser compatible method of converting a string to an XML tree found this function [here](http://groups.google.com/group/jquery-dev/browse_thread/thread/c6d11387c580a77f) +[`text2xml`](#text2xml) | Cross-browser compatible method of converting a string to an XML tree found this function [here](https://groups.google.com/group/jquery-dev/browse_thread/thread/c6d11387c580a77f) ### Unit conversion functions @@ -330,7 +330,7 @@ Object with the following values: x - The angle-snapped x value y - The angle-sn "text2xml": function(sXML) -Cross-browser compatible method of converting a string to an XML tree found this function [here](http://groups.google.com/group/jquery-dev/browse_thread/thread/c6d11387c580a77f) +Cross-browser compatible method of converting a string to an XML tree found this function [here](https://groups.google.com/group/jquery-dev/browse_thread/thread/c6d11387c580a77f) # Unit conversion functions @@ -1864,7 +1864,7 @@ Sets the new segment type to the selected segment(s). #### Parameters -* `new_type` Integer with the new segment type See http://www.w3.org/TR/SVG/paths.html#InterfaceSVGPathSeg for list +* `new_type` Integer with the new segment type See https://www.w3.org/TR/SVG/paths.html#InterfaceSVGPathSeg for list ## `convertToPath` diff --git a/editor/browser.js b/editor/browser.js index 04a484a5..6ab5263e 100644 --- a/editor/browser.js +++ b/editor/browser.js @@ -135,7 +135,7 @@ var supportsGoodDecimals_ = (function () { var retValue = (crect.getAttribute('x').indexOf(',') === -1); if (!retValue) { $.alert('NOTE: This version of Opera is known to contain bugs in SVG-edit.\n' + - 'Please upgrade to the latest version in which the problems have been fixed.'); + 'Please upgrade to the latest version in which the problems have been fixed.'); } return retValue; }()); diff --git a/editor/canvg/canvg.js b/editor/canvg/canvg.js index 359ab28b..b612470d 100644 --- a/editor/canvg/canvg.js +++ b/editor/canvg/canvg.js @@ -6,7 +6,7 @@ * Gabe Lerner (gabelerner@gmail.com) * http://code.google.com/p/canvg/ * - * Requires: rgbcolor.js - http://www.phpied.com/rgb-color-parser-in-javascript/ + * Requires: rgbcolor.js - https://www.phpied.com/rgb-color-parser-in-javascript/ */ var canvg; (function () { @@ -608,7 +608,7 @@ function build (opts) { // aspect ratio svg.AspectRatio = function (ctx, aspectRatio, width, desiredWidth, height, desiredHeight, minX, minY, refX, refY) { - // aspect ratio - http://www.w3.org/TR/SVG/coords.html#PreserveAspectRatioAttribute + // aspect ratio - https://www.w3.org/TR/SVG/coords.html#PreserveAspectRatioAttribute aspectRatio = svg.compressSpaces(aspectRatio); aspectRatio = aspectRatio.replace(/^defer\s/, ''); // ignore defer var align = aspectRatio.split(' ')[0] || 'xMidYMid'; @@ -1213,7 +1213,7 @@ function build (opts) { this.base(node); var d = this.attribute('d').value; - // TODO: convert to real lexer based on http://www.w3.org/TR/SVG11/paths.html#PathDataBNF + // TODO: convert to real lexer based on https://www.w3.org/TR/SVG11/paths.html#PathDataBNF d = d.replace(/,/gm, ' '); // get rid of all commas d = d.replace(/([MmZzLlHhVvCcSsQqTtAa])([MmZzLlHhVvCcSsQqTtAa])/gm, '$1 $2'); // separate commands from commands d = d.replace(/([MmZzLlHhVvCcSsQqTtAa])([MmZzLlHhVvCcSsQqTtAa])/gm, '$1 $2'); // separate commands from commands @@ -2432,7 +2432,7 @@ function build (opts) { if (element != null) { var tempSvg = element; if (element.type === 'symbol') { - // render me using a temporary svg element in symbol cases (http://www.w3.org/TR/SVG/struct.html#UseElement) + // render me using a temporary svg element in symbol cases (https://www.w3.org/TR/SVG/struct.html#UseElement) tempSvg = new svg.Element.svg(); tempSvg.type = 'svg'; tempSvg.attributes['viewBox'] = new svg.Property('viewBox', element.attribute('viewBox').value); @@ -2610,7 +2610,7 @@ function build (opts) { this.base(node); var matrix = svg.ToNumberArray(this.attribute('values').value); - switch (this.attribute('type').valueOrDefault('matrix')) { // http://www.w3.org/TR/SVG/filters.html#feColorMatrixElement + switch (this.attribute('type').valueOrDefault('matrix')) { // https://www.w3.org/TR/SVG/filters.html#feColorMatrixElement case 'saturate': var s = matrix[0]; matrix = [ diff --git a/editor/canvg/rgbcolor.js b/editor/canvg/rgbcolor.js index f902e112..2ab6b108 100644 --- a/editor/canvg/rgbcolor.js +++ b/editor/canvg/rgbcolor.js @@ -2,7 +2,7 @@ /** * A class to parse color values * @author Stoyan Stefanov - * @link http://www.phpied.com/rgb-color-parser-in-javascript/ + * @link https://www.phpied.com/rgb-color-parser-in-javascript/ * @license Use it if you like it */ function RGBColor (colorString) { // eslint-disable-line no-unused-vars diff --git a/editor/contextmenu/jquery.contextMenu.js b/editor/contextmenu/jquery.contextMenu.js index 2dc92679..9eb9fa39 100755 --- a/editor/contextmenu/jquery.contextMenu.js +++ b/editor/contextmenu/jquery.contextMenu.js @@ -5,10 +5,10 @@ // Version 1.01 // // Cory S.N. LaViska -// A Beautiful Site (http://abeautifulsite.net/) +// A Beautiful Site (https://abeautifulsite.net/) // Modified by Alexis Deveria // -// More info: http://abeautifulsite.net/2008/09/jquery-context-menu-plugin/ +// More info: https://abeautifulsite.net/2008/09/jquery-context-menu-plugin/ // // Terms of Use // diff --git a/editor/extensions/ext-mathjax.js b/editor/extensions/ext-mathjax.js index 7ab5ff6a..2a35905c 100644 --- a/editor/extensions/ext-mathjax.js +++ b/editor/extensions/ext-mathjax.js @@ -139,7 +139,7 @@ svgEditor.addExtension('mathjax', function () { 'Mathematics Editor' + '' + + 'TeX code.' + '' + '' + '' + diff --git a/editor/extensions/filesave.php b/editor/extensions/filesave.php index 22d2826a..41b2d260 100644 --- a/editor/extensions/filesave.php +++ b/editor/extensions/filesave.php @@ -10,7 +10,7 @@ */ function encodeRFC5987ValueChars ($str) { - // See http://tools.ietf.org/html/rfc5987#section-3.2.1 + // See https://tools.ietf.org/html/rfc5987#section-3.2.1 // For better readability within headers, add back the characters escaped by rawurlencode but still allowable // Although RFC3986 reserves "!" (%21), RFC5987 does not return preg_replace_callback('@%(2[1346B]|5E|60|7C)@', function ($matches) { @@ -47,7 +47,7 @@ if ($suffix == '.svg') { header('Cache-Control: public'); header('Content-Description: File Transfer'); -// See http://tools.ietf.org/html/rfc6266#section-4.1 +// See https://tools.ietf.org/html/rfc6266#section-4.1 header("Content-Disposition: attachment; filename*=UTF-8''" . encodeRFC5987ValueChars( // preg_replace('@[\\\\/:*?"<>|]@', '', $file) // If we wanted to strip Windows-disallowed characters server-side (but not a security issue, so we can strip client-side instead) $file diff --git a/editor/extensions/imagelib/index.html b/editor/extensions/imagelib/index.html index 90388af4..7da0b3ae 100644 --- a/editor/extensions/imagelib/index.html +++ b/editor/extensions/imagelib/index.html @@ -4,7 +4,7 @@ - - + diff --git a/editor/images/svg_edit_icons.svg b/editor/images/svg_edit_icons.svg index 4a19e2e9..c75858be 100644 --- a/editor/images/svg_edit_icons.svg +++ b/editor/images/svg_edit_icons.svg @@ -454,7 +454,7 @@ - + diff --git a/editor/jgraduate/css/jgraduate.css b/editor/jgraduate/css/jgraduate.css index 5a9eed32..79a7d1da 100644 --- a/editor/jgraduate/css/jgraduate.css +++ b/editor/jgraduate/css/jgraduate.css @@ -1,6 +1,6 @@ -/* +/* * jGraduate Default CSS - * + * * Copyright (c) 2010 Jeff Schiller * http://blog.codedread.com/ * @@ -52,14 +52,14 @@ li.jGraduate_tab_current { display: none; } -.jGraduate_gradPick { +.jGraduate_gradPick { display: none; border: outset 1px #666; padding: 10px 7px 5px 5px; overflow: auto; } -.jGraduate_gradPick { +.jGraduate_gradPick { display: none; border: outset 1px #666; padding: 10px 7px 5px 5px; @@ -81,7 +81,7 @@ div.jGraduate_Swatch { } div.jGraduate_GradContainer { border: 2px inset #EEE; - background-image: url(../images/map-opacity.png); + background-image: url(../images/map-opacity.png); background-position: 0px 0px; height: 256px; width: 256px; @@ -348,4 +348,4 @@ div.jGraduate_Slider img { position: absolute; right: -10px; bottom: 0; -} \ No newline at end of file +} diff --git a/editor/jquery-svg.js b/editor/jquery-svg.js index d8a96d54..ded1c59e 100644 --- a/editor/jquery-svg.js +++ b/editor/jquery-svg.js @@ -16,7 +16,7 @@ // This fixes $(...).attr() to work as expected with SVG elements. // Does not currently use *AttributeNS() since we rarely need that. -// See http://api.jquery.com/attr/ for basic documentation of .attr() +// See https://api.jquery.com/attr/ for basic documentation of .attr() // Additional functionality: // - When getting attributes, a string that's a number is return as type number. diff --git a/editor/js-hotkeys/README.md b/editor/js-hotkeys/README.md index 696e9894..3de84cc5 100644 --- a/editor/js-hotkeys/README.md +++ b/editor/js-hotkeys/README.md @@ -1,15 +1,15 @@ #About **jQuery Hotkeys** is a plug-in that lets you easily add and remove handlers for keyboard events anywhere in your code supporting almost any key combination. -This plugin is based off of the plugin by Tzury Bar Yochay: [jQuery.hotkeys](http://github.com/tzuryby/hotkeys) +This plugin is based off of the plugin by Tzury Bar Yochay: [jQuery.hotkeys](https://github.com/tzuryby/hotkeys) The syntax is as follows: $(expression).bind(types, keys, handler); $(expression).unbind(types, handler); - + $(document).bind('keydown', 'ctrl+a', fn); - + // e.g. replace '$' sign with 'EUR' $('input.foo').bind('keyup', '$', function(){ this.value = this.value.replace('$', 'EUR'); @@ -42,4 +42,4 @@ Firefox is the most liberal one in the manner of letting you capture all short-c Others, (IE) either let you handle built-in short-cuts, but will add their functionality after your code has executed. Or (Opera/Safari) will *not* pass those events to the DOM at all. -*So, if you bind `Ctrl-Q` or `Alt-F4` and your Safari/Opera window is closed don't be surprised.* \ No newline at end of file +*So, if you bind `Ctrl-Q` or `Alt-F4` and your Safari/Opera window is closed don't be surprised.* diff --git a/editor/path.js b/editor/path.js index b8f4207f..c44fecdf 100644 --- a/editor/path.js +++ b/editor/path.js @@ -674,7 +674,7 @@ svgedit.path.Path.prototype.addSeg = function (index) { newseg = this.elem.createSVGPathSegLinetoAbs(newX, newY); break; case 6: // make it a curved segment to preserve the shape (WRS) - // http://en.wikipedia.org/wiki/De_Casteljau%27s_algorithm#Geometric_interpretation + // https://en.wikipedia.org/wiki/De_Casteljau%27s_algorithm#Geometric_interpretation var p0x = (prev.item.x + seg.item.x1) / 2; var p1x = (seg.item.x1 + seg.item.x2) / 2; var p2x = (seg.item.x2 + seg.item.x) / 2; diff --git a/editor/pathseg.js b/editor/pathseg.js index b267c973..aa23523f 100644 --- a/editor/pathseg.js +++ b/editor/pathseg.js @@ -9,7 +9,7 @@ (function () { 'use strict'; if (!('SVGPathSeg' in window)) { - // Spec: http://www.w3.org/TR/SVG11/single-page.html#paths-InterfaceSVGPathSeg + // Spec: https://www.w3.org/TR/SVG11/single-page.html#paths-InterfaceSVGPathSeg window.SVGPathSeg = function (type, typeAsLetter, owningPathSegList) { this.pathSegType = type; this.pathSegTypeAsLetter = typeAsLetter; @@ -315,7 +315,7 @@ if (!('SVGPathSeg' in window)) { Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothRel.prototype, 'y', { get: function () { return this._y; }, set: function (y) { this._y = y; this._segmentChanged(); }, enumerable: true }); // Add createSVGPathSeg* functions to window.SVGPathElement. - // Spec: http://www.w3.org/TR/SVG11/single-page.html#paths-Interfacewindow.SVGPathElement. + // Spec: https://www.w3.org/TR/SVG11/single-page.html#paths-Interfacewindow.SVGPathElement. window.SVGPathElement.prototype.createSVGPathSegClosePath = function () { return new window.SVGPathSegClosePath(undefined); }; window.SVGPathElement.prototype.createSVGPathSegMovetoAbs = function (x, y) { return new window.SVGPathSegMovetoAbs(undefined, x, y); }; window.SVGPathElement.prototype.createSVGPathSegMovetoRel = function (x, y) { return new window.SVGPathSegMovetoRel(undefined, x, y); }; @@ -372,7 +372,7 @@ if (!('SVGPathSeg' in window)) { // SVGPathSegList API (e.g., appendItem). In this case we need to re-implement the entire API // so the polyfill data (i.e., _list) is used throughout. if (!('SVGPathSegList' in window) || !('appendItem' in window.SVGPathSegList.prototype)) { - // Spec: http://www.w3.org/TR/SVG11/single-page.html#paths-InterfaceSVGPathSegList + // Spec: https://www.w3.org/TR/SVG11/single-page.html#paths-InterfaceSVGPathSegList window.SVGPathSegList = function (pathElement) { this._pathElement = pathElement; this._list = this._parsePath(this._pathElement.getAttribute('d')); @@ -394,7 +394,7 @@ if (!('SVGPathSegList' in window) || !('appendItem' in window.SVGPathSegList.pro }); // Add the pathSegList accessors to window.SVGPathElement. - // Spec: http://www.w3.org/TR/SVG11/single-page.html#paths-InterfaceSVGAnimatedPathData + // Spec: https://www.w3.org/TR/SVG11/single-page.html#paths-InterfaceSVGAnimatedPathData Object.defineProperty(window.SVGPathElement.prototype, 'pathSegList', { get: function () { if (!this._pathSegList) { @@ -674,7 +674,7 @@ if (!('SVGPathSegList' in window) || !('appendItem' in window.SVGPathSegList.pro }; // Parse a number from an SVG path. This very closely follows genericParseNumber(...) from Source/core/svg/SVGParserUtilities.cpp. - // Spec: http://www.w3.org/TR/SVG11/single-page.html#paths-PathDataBNF + // Spec: https://www.w3.org/TR/SVG11/single-page.html#paths-PathDataBNF Source.prototype._parseNumber = function () { var exponent = 0; var integer = 0; diff --git a/editor/spinbtn/JQuerySpinBtn.css b/editor/spinbtn/JQuerySpinBtn.css index 7a279a09..7a7f20b0 100644 --- a/editor/spinbtn/JQuerySpinBtn.css +++ b/editor/spinbtn/JQuerySpinBtn.css @@ -1,7 +1,7 @@ /* Styles to make ordinary look like a spinbutton/spinbox control. Use with JQuerySpinBtn.js to provide the spin functionality by reacting to mouse etc. - (Requires a reference to the JQuery library found at http://jquery.com/src/latest/) + (Requires a reference to the JQuery library found at http://code.jquery.com/) (Hats-off to John Resig for creating the excellent JQuery library. It is fab.) This control is achieved with no extra html markup whatsoever and uses unobtrusive javascript. diff --git a/editor/spinbtn/JQuerySpinBtn.js b/editor/spinbtn/JQuerySpinBtn.js index bdbb0087..87f14f80 100644 --- a/editor/spinbtn/JQuerySpinBtn.js +++ b/editor/spinbtn/JQuerySpinBtn.js @@ -23,7 +23,7 @@ * * Modifications by Jeff Schiller, June 2009: * - provide callback function for when the value changes based on the following - * http://www.mail-archive.com/jquery-en@googlegroups.com/msg36070.html + * https://www.mail-archive.com/jquery-en@googlegroups.com/msg36070.html * Modifications by Jeff Schiller, July 2009: * - improve styling for widget in Opera * - consistent key-repeat handling cross-browser diff --git a/editor/svg-editor.html b/editor/svg-editor.html index 0439b938..c48d5f33 100644 --- a/editor/svg-editor.html +++ b/editor/svg-editor.html @@ -61,8 +61,11 @@ - + + SVG-edit @@ -684,7 +687,7 @@ Editor Preferences Language: - +