ci: use Gitea API for releases #2
+12
-3
@@ -181,14 +181,23 @@
|
|||||||
if (document.getElementById(BTN_ID)) return;
|
if (document.getElementById(BTN_ID)) return;
|
||||||
const unitsP = findTotalUnitsP();
|
const unitsP = findTotalUnitsP();
|
||||||
if (!unitsP) return;
|
if (!unitsP) return;
|
||||||
|
|
||||||
|
const wrapper = document.createElement('div');
|
||||||
|
wrapper.style.display = 'flex';
|
||||||
|
wrapper.style.alignItems = 'center';
|
||||||
|
wrapper.style.justifyContent = 'space-between';
|
||||||
|
wrapper.style.margin = '10px 0';
|
||||||
|
|
||||||
const btn = document.createElement('button');
|
const btn = document.createElement('button');
|
||||||
btn.id = BTN_ID;
|
btn.id = BTN_ID;
|
||||||
btn.type = 'button';
|
btn.type = 'button';
|
||||||
btn.className = 'btn green pull-right';
|
btn.className = 'btn green';
|
||||||
btn.style.margin = '10px 0';
|
|
||||||
btn.innerHTML = '<i class="fa fa-download"></i> Download PDF';
|
btn.innerHTML = '<i class="fa fa-download"></i> Download PDF';
|
||||||
btn.addEventListener('click', onDownloadPdf);
|
btn.addEventListener('click', onDownloadPdf);
|
||||||
unitsP.insertAdjacentElement('afterend', btn);
|
|
||||||
|
unitsP.parentNode.insertBefore(wrapper, unitsP);
|
||||||
|
wrapper.appendChild(btn);
|
||||||
|
wrapper.appendChild(unitsP);
|
||||||
}
|
}
|
||||||
|
|
||||||
function tryInjectButton() {
|
function tryInjectButton() {
|
||||||
|
|||||||
Reference in New Issue
Block a user