All Downloads are FREE. Search and download functionalities are using the official Maven repository.

webapp.pdf-exporter.js.side-panel-starter.js Maven / Gradle / Ivy

Go to download

This Polarion extension provides possibility to convert Polarion Documents to PDF files. This is an alternative to native Polarion's solution.

There is a newer version: 7.0.1
Show newest version
const PdfExporterSidePanelStarter = {
    timestampParam: `?timestamp=${Date.now()}`,

    injectAll: function () {
        this.injectScript("common-script", `/polarion/pdf-exporter/ui/generic/js/common.js${this.timestampParam}`);
        this.injectScript("ExportParams-script", `/polarion/pdf-exporter/ui/js/modules/ExportParams.js${this.timestampParam}`, 'module');
        this.injectScript("export-common-script", `/polarion/pdf-exporter/ui/js/export-common.js${this.timestampParam}`);
        this.injectScript("export-pdf-script", `/polarion/pdf-exporter/ui/js/export-pdf.js${this.timestampParam}`);
    },


    injectScript: function (id, componentScriptPath, type = "text/javascript") {
        if (top.document.body && !top.document.getElementById(id)) {
            const scriptElement = document.createElement("script");
            scriptElement.id = id;
            scriptElement.setAttribute("src", componentScriptPath);
            scriptElement.setAttribute("type", type);
            top.document.body.appendChild(scriptElement);
        }
    },
}

PdfExporterSidePanelStarter.injectAll();




© 2015 - 2024 Weber Informatics LLC | Privacy Policy