diff --git a/.eslintrc.js b/.eslintrc.js
index 3dfcb35b..fc6244b7 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -44,10 +44,7 @@ module.exports = {
"editor/redirect-on-no-module-support.js",
"editor/extensions/imagelib/index.js",
"editor/external/dom-polyfill/dom-polyfill.js",
- "screencasts/svgopen2010/script.js",
- "opera-widget/handlers.js",
- "firefox-extension/handlers.js",
- "firefox-extension/content/svg-edit-overlay.js"
+ "screencasts/svgopen2010/script.js"
],
rules: {
"import/unambiguous": ["off"]
@@ -223,15 +220,6 @@ module.exports = {
]
}
},
- {
- // Misc. probably to remove
- files: ['firefox-extension/**', 'opera-widget/**'],
- settings: {
- polyfills: [
- 'console'
- ]
- }
- },
{
files: ["cypress/**"],
extends: ["plugin:cypress/recommended"],
diff --git a/CHANGES.md b/CHANGES.md
index 17933323..a34e31e6 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -24,6 +24,9 @@
`url` is set within the URL)
- Optimization: Remove unused `jquery-ui-1.8.custom.min.js` file
- Optimization: Remove old build/tools closure/yuicompressor code
+- Optimization: Remove unmaintained chrome-app, firefox-extension,
+ opera-widget (an updated WebExtensions replacement (or such)
+ would be welcome.)
- Localization: Add 'SVG-Edit Home Page' to locale files
- Docs: Remove outdated info on jsdoc linting (now just part of eslint config)
- Docs: Add testing badge
diff --git a/chrome-app/icon_128.png b/chrome-app/icon_128.png
deleted file mode 100644
index 6369b49b..00000000
Binary files a/chrome-app/icon_128.png and /dev/null differ
diff --git a/chrome-app/manifest.json b/chrome-app/manifest.json
deleted file mode 100644
index 80dba56d..00000000
--- a/chrome-app/manifest.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "name": "SVG-edit",
- "description": "A fast, web-based, Javascript-driven SVG editor that works in any modern browser",
- "version": "2.6",
- "app": {
- "urls": [
- "*://svg-edit.googlecode.com/svn/tags/stable/"
- ],
- "launch": {
- "web_url": "http://svg-edit.googlecode.com/svn/tags/stable/editor/svg-editor.html"
- }
- },
- "icons": {
- "128": "icon_128.png"
- },
- "permissions": [
- "unlimitedStorage",
- "notifications"
- ]
-}
diff --git a/docs/jsdoc-config.js b/docs/jsdoc-config.js
index ac1b4001..f4941e7a 100644
--- a/docs/jsdoc-config.js
+++ b/docs/jsdoc-config.js
@@ -61,8 +61,6 @@ module.exports = {
'node_modules',
'dist',
'editor/external',
- 'firefox-extension',
- 'opera-widget',
'screencasts',
'test'
],
diff --git a/firefox-extension/chrome.manifest b/firefox-extension/chrome.manifest
deleted file mode 100644
index 3e98b2dd..00000000
--- a/firefox-extension/chrome.manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-content svg-edit content/
-overlay chrome://browser/content/browser.xul chrome://svg-edit/content/svg-edit-overlay.xul
diff --git a/firefox-extension/content/svg-edit-overlay.css b/firefox-extension/content/svg-edit-overlay.css
deleted file mode 100644
index 4b7e9b54..00000000
--- a/firefox-extension/content/svg-edit-overlay.css
+++ /dev/null
@@ -1,21 +0,0 @@
-#svg-edit-statusbar-button {
- list-style-image: url("chrome://svg-edit/content/editor/images/logo.png");
- display: -moz-box;
- /*-moz-image-region: rect(16px, 16px, 32px, 0px);*/
- padding-left: 0px;
- padding-right: 0px;
- width: 16px;
- height: 16px;
-
-}
-
-#svg-edit-statusbar-button[state="active"] {
- list-style-image: url("chrome://svg-edit/content/editor/images/logo.png");
- -moz-image-region: rect(32px, 16px, 48px, 0px);
-}
-
-#svg-edit-statusbar-button[state="error"] {
- list-style-image: url("chrome://svg-edit/content/editor/images/logo.png");
- -moz-image-region: rect(0px, 16px, 16px, 0px);
-}
-
diff --git a/firefox-extension/content/svg-edit-overlay.js b/firefox-extension/content/svg-edit-overlay.js
deleted file mode 100644
index 0c05a594..00000000
--- a/firefox-extension/content/svg-edit-overlay.js
+++ /dev/null
@@ -1,8 +0,0 @@
-/**
- * Opens the dialog with the SVG Editor.
- * @returns {void}
- */
-function startSvgEdit () { // eslint-disable-line no-unused-vars
- const url = 'chrome://svg-edit/content/editor/svg-editor.html';
- window.openDialog(url, 'SVG Editor', 'width=1024,height=700,menubar=no,toolbar=no');
-}
diff --git a/firefox-extension/content/svg-edit-overlay.xul b/firefox-extension/content/svg-edit-overlay.xul
deleted file mode 100644
index ac8899c3..00000000
--- a/firefox-extension/content/svg-edit-overlay.xul
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/firefox-extension/handlers.js b/firefox-extension/handlers.js
deleted file mode 100644
index d33cb0ec..00000000
--- a/firefox-extension/handlers.js
+++ /dev/null
@@ -1,60 +0,0 @@
-/* global svgCanvas, jQuery, Components, netscape */
-// Note: This JavaScript file must be included as the last script on the main HTML editor page to override the open/save handlers
-jQuery(function () {
- if (!window.Components) return;
-
- /**
- * Offer choice of file.
- * @param {boolean} readflag
- * @returns {nsILocalFile}
- */
- function mozFilePicker (readflag) {
- const fp = window.Components.classes['@mozilla.org/filepicker;1']
- .createInstance(Components.interfaces.nsIFilePicker);
- if (readflag) fp.init(window, 'Pick a SVG file', fp.modeOpen);
- else fp.init(window, 'Pick a SVG file', fp.modeSave);
- fp.defaultExtension = '*.svg';
- fp.show();
- return fp.file;
- }
-
- svgCanvas.setCustomHandlers({
- open () {
- try {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
- const file = mozFilePicker(true);
- if (!file) {
- return;
- }
-
- const inputStream = Components.classes['@mozilla.org/network/file-input-stream;1'].createInstance(Components.interfaces.nsIFileInputStream);
- inputStream.init(file, 0x01, 0o00004, null);
- const sInputStream = Components.classes['@mozilla.org/scriptableinputstream;1'].createInstance(Components.interfaces.nsIScriptableInputStream);
- sInputStream.init(inputStream);
- svgCanvas.setSvgString(sInputStream.read(sInputStream.available()));
- } catch (e) {
- console.log('Exception while attempting to load' + e); // eslint-disable-line no-console
- }
- },
- save (svg, str) {
- try {
- const file = mozFilePicker(false);
- if (!file) {
- return;
- }
-
- if (!file.exists()) {
- file.create(0, 0o0664);
- }
-
- const out = Components.classes['@mozilla.org/network/file-output-stream;1'].createInstance(Components.interfaces.nsIFileOutputStream);
- out.init(file, 0x20 | 0x02, 0o00004, null); // eslint-disable-line no-bitwise
- out.write(str, str.length);
- out.flush();
- out.close();
- } catch (e) {
- alert(e); // eslint-disable-line no-alert
- }
- }
- });
-});
diff --git a/firefox-extension/install.rdf b/firefox-extension/install.rdf
deleted file mode 100644
index 781b80ad..00000000
--- a/firefox-extension/install.rdf
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
-
-
- svg-edit@googlegroups.com
- 2.6
- 2
-
-
- {ec8030f7-c20a-464f-9b0e-13a3a9e97384}
- 1.5
- 4.*
-
-
- SVG-edit
-
-
diff --git a/opera-widget/config.xml b/opera-widget/config.xml
deleted file mode 100644
index 797aafba..00000000
--- a/opera-widget/config.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
- SVG Edit
-
- A simple SVG Editor.
-
- 800
- 600
- editor/images/logo.svg
-
- SVG Edit
- 2010-09
-
-
-
-
-
diff --git a/opera-widget/handlers.js b/opera-widget/handlers.js
deleted file mode 100644
index e5d2a549..00000000
--- a/opera-widget/handlers.js
+++ /dev/null
@@ -1,60 +0,0 @@
-/* globals jQuery, svgCanvas */
-/* eslint-disable no-console */
-// Note: This JavaScript file must be included as the last script on the main
-// HTML editor page to override the open/save handlers
-jQuery(function () {
- if (window.opera && window.opera.io && window.opera.io.filesystem) {
- svgCanvas.setCustomHandlers({
- open () {
- try {
- window.opera.io.filesystem.browseForFile(
- new Date().getTime(), /* mountpoint name */
- '', /* default location */
- function (file) {
- try {
- if (file) {
- const fstream = file.open(file, 'r');
- let output = '';
- while (!fstream.eof) {
- output += fstream.readLine();
- }
-
- svgCanvas.setSvgString(output); /* 'this' is bound to the filestream object here */
- }
- } catch (e) {
- console.log('Reading file failed.');
- }
- },
- false, /* not persistent */
- false, /* no multiple selections */
- '*.svg' /* file extension filter */
- );
- } catch (e) {
- console.log('Open file failed.');
- }
- },
- save (win, svg) {
- try {
- win.opera.io.filesystem.browseForSave(
- new Date().getTime(), /* mountpoint name */
- '', /* default location */
- function (file) {
- try {
- if (file) {
- const fstream = file.open(file, 'w');
- fstream.write(svg, 'UTF-8');
- fstream.close();
- }
- } catch (e) {
- console.log('Write to file failed.');
- }
- },
- false /* not persistent */
- );
- } catch (e) {
- console.log('Save file failed.');
- }
- }
- });
- }
-});
diff --git a/opera-widget/index.html b/opera-widget/index.html
deleted file mode 100644
index 4d5e292c..00000000
--- a/opera-widget/index.html
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
- SVG Edit
-
-
-
-
-
-
-
diff --git a/opera-widget/style.css b/opera-widget/style.css
deleted file mode 100644
index b4e8ae66..00000000
--- a/opera-widget/style.css
+++ /dev/null
@@ -1,2 +0,0 @@
-body { margin: 0px; padding: 0px; }
-#container { width: 100%; height: 100%; border: none; }
diff --git a/package.json b/package.json
index c1508bd2..e380a961 100644
--- a/package.json
+++ b/package.json
@@ -24,7 +24,7 @@
"open-docs-no-start": "open-cli http://localhost:8000/docs/jsdoc/",
"open-docs": "run-p start open-docs-no-start",
"build-html": "npx babel-node --plugins @babel/plugin-transform-modules-commonjs build/build-html.js",
- "compress-images": "imageoptim \"chrome-app/*.png\" \"editor/extensions/*.png\" \"editor/spinbtn/*.png\" \"editor/jgraduate/images/*.{png,gif}\" \"editor/images/*.png\"",
+ "compress-images": "imageoptim \"editor/extensions/*.png\" \"editor/spinbtn/*.png\" \"editor/jgraduate/images/*.{png,gif}\" \"editor/images/*.png\"",
"copy": "copyfiles -f node_modules/load-stylesheets/dist/index-es.js editor/external/load-stylesheets && copyfiles -f node_modules/jamilih/dist/jml-es.js editor/external/jamilih && copyfiles -f node_modules/query-result/esm/index.js editor/external/query-result/esm && copyfiles -f node_modules/qr-manipulation/dist/index-es.js editor/external/qr-manipulation/dist && copyfiles -f node_modules/stackblur-canvas/dist/stackblur-es.js editor/external/stackblur-canvas/dist && copyfiles -f node_modules/regenerator-runtime/runtime.js editor/external/regenerator-runtime && copyfiles -f \"node_modules/core-js-bundle//minified*\" editor/external/core-js-bundle && copyfiles -f \"node_modules/underscore/underscore-*\" editor/jspdf && copyfiles -f \"node_modules/deparam/dist/deparam.esm.js\" editor/external/deparam",
"remark": "remark -q -f .",
"eslint-fix": "eslint --fix --ext js,md,html .",