gitlab-org--gitlab-foss/app/assets/javascripts/blob/sketch_viewer.js
Jacob Schatz fd8a40783d Load a preview of Sketch 43 files
Sketch 43 files are technically a zip file, so the JavaScript opens the
zip file & locates a preview.png which is just a quick preview of the
last sketch page edited. After that is loaded it simply places the image
into the DOM
2017-04-05 11:49:08 +01:00

8 lines
207 B
JavaScript

/* eslint-disable no-new */
import SketchLoader from './sketch';
document.addEventListener('DOMContentLoaded', () => {
const el = document.getElementById('js-sketch-viewer');
new SketchLoader(el);
});