MCPcopy
hub / github.com/ollm/OpenComic / addImageToDom

Function addImageToDom

scripts/dom.js:98–111  ·  view source on GitHub ↗
(sha, path, animation = true)

Source from the content-addressed store, hash-verified

96}
97
98function addImageToDom(sha, path, animation = true)
99{
100 const src = dom.queryAll('img.sha-image-'+sha).setAttribute('src', app.encodeSrcURI(app.shortWindowsPath(path, true)));
101
102 if(animation)
103 {
104 src.addClass('a', 'active', 'border');
105 }
106 else
107 {
108 src.addClass('active', 'border');
109 src.filter('.folder-poster-img').addClass('has-poster');
110 }
111}
112
113async function addProgressToDom(sha, progress, animation = true)
114{

Callers 2

loadFilesIndexPageFunction · 0.85
_getFolderThumbnailsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected