Category:SVG created with JavaScript
Appearance
Self-generating SVG pioneered by TilmannR (talk · contribs) and further developed by cmglee (talk · contribs) which uses JavaScript to replace itself with static SVG, and embed itself as a comment.
This avoids users needing any software except a web browser and a text editor to update and rerun the script.
Editing workflow:
- Open a template file or existing file to be amended in a text editor.
- Amend code in user-editable parts as needed.
- Delete the "!--" and "--" on lines indicated.
- Save as a new file or file to be amended.
- Open the file in Firefox or Chrome.
- In the web browser, save as another file.
- Upload this file to Commons.
Drawbacks of this method:
- Escaped non-ASCII characters are converted to their UTF-8 equivalents so the file may no longer be ASCII (giving mojibake in some text editors).
- The JavaScript must not have two consecutive hyphens (--).
- Errors may be difficult to debug for editors unfamiliar with JavaScript; pressing F12 and selecting the Console tab may give clues.
Media in category "SVG created with JavaScript"
The following 19 files are in this category, out of 19 total.
-
Template map of US states and District of Columbia.svg 512 × 341; 60 KB
-
Binomial trial dice.svg 512 × 512; 14 KB
-
Cognitive bias codex en uk.svg 1,900 × 1,500; 178 KB
-
Cognitive bias codex en.svg 1,900 × 1,500; 167 KB
-
Current vs planetary health diet.svg 512 × 341; 37 KB
-
Gabriel horn 2d.svg 512 × 384; 4 KB
-
Lorentz factor log log.svg 512 × 512; 8 KB
-
Phyllotaxis golden angle.svg 512 × 512; 13 KB
-
Preferred numbers.svg 512 × 640; 22 KB
-
Pythagorean tuning geometric.svg 512 × 512; 6 KB
-
Stopping sight distance.svg 512 × 384; 9 KB
-
Thin lens graph.svg 512 × 512; 5 KB
-
Visual cryptography stenography.svg 512 × 512; 240 KB
-
Visual proof centered polygonal numbers.svg 512 × 910; 60 KB
-
Visual proof harmonic series diverges.svg 512 × 512; 11 KB
-
Visual proof polygonal numbers.svg 512 × 910; 55 KB
-
WCAG contrast ratio 4.5.svg 512 × 640; 35 KB
-
WCAG contrast ratio 7.svg 512 × 256; 305 KB
-
WCAG contrast ratio thresholds.svg 512 × 224; 35 KB