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

Function addUrlFunctions

scripts/opds.js:627–645  ·  view source on GitHub ↗
(items, currentUrl, mainPath)

Source from the content-addressed store, hash-verified

625}
626
627function addUrlFunctions(items, currentUrl, mainPath)
628{
629 if(!items)
630 return '';
631
632 if(!items.length)
633 items = [items];
634
635 for(let i = 0, len = items.length; i < len; i++)
636 {
637 const item = items[i];
638 const path = opds.getPath(item, currentUrl, mainPath);
639
640 if(path)
641 item.function = 'events.closeDialog(); dom.fileInfo.resize(false); dom.loadIndexPage(true, \''+escapeQuotes(escapeBackSlash(path), 'simples')+'\', false, false, \''+escapeQuotes(escapeBackSlash(mainPath), 'simples')+'\');';
642 }
643
644 return items;
645}
646
647var isFromFacets = false;
648

Callers 1

publicationFunction · 0.85

Calls 2

escapeQuotesFunction · 0.85
escapeBackSlashFunction · 0.85

Tested by

no test coverage detected