PageSourceSearch

http://www.artstetten.at/cdnstatic/system/Javascript/flipbook/js/flipbook.init.defer.js

js artstetten.at collected 2026-10-02 20:07:43 UTC 4,977 bytes, 133 lines download raw bytes

1const flipbookInitScript = document.currentScript;
2
3document.addEventListener("fireOpenFlipbookEvent", function (event) {
4    var link = document.querySelector("a[href='" + event.detail + "']");
5    var span = document.createElement("div");
6    document.body.appendChild(span);
7    initFlipbook(link, span);
8    span.click();
9});
10document.addEventListener("DOMContentLoaded", function (event) {
11    let flipbookLinks = document.querySelectorAll("a[href*='useFlipbook=true'], a[data-was-flipbook=true]");
12    if (flipbookLinks.length > 0) {
13        //Loading Style
14        let styleEl = document.createElement("link");
15        styleEl.rel = "stylesheet";
16        styleEl.type = "text/css";
17        styleEl.href = "https://cdnfile.gem2go.page/cdnstatic/system/Javascriptz/flipbook/css/flipbook.style.css";
18        flipbookInitScript.parentNode.insertBefore(styleEl, flipbookInitScript.nextSibling);
19
20        //Loading Scripts
21        let flipbookScripts = [
22            "https://cdnfile.gem2go.page/cdnstatic/system/Javascriptz/flipbook/js/three.min.js",
23            "https://cdnfile.gem2go.page/cdnstatic/system/Javascriptz/flipbook/js/pdf.min.js",
24            "https://cdnfile.gem2go.page/cdnstatic/system/Javascriptz/flipbook/js/pdf.worker.min.js",
25            "https://cdnfile.gem2go.page/cdnstatic/system/Javascriptz/flipbook/js/iscroll.min.js",
26            "https://cdnfile.gem2go.page/cdnstatic/system/Javascriptz/flipbook/js/flipbook.min.js",
27            "https://cdnfile.gem2go.page/cdnstatic/system/Javascriptz/flipbook/js/flipbook.book3.min.js",
28            "https://cdnfile.gem2go.page/cdnstatic/system/Javascriptz/flipbook/js/flipbook.webgl.min.js",
29            "https://cdnfile.gem2go.page/cdnstatic/system/Javascriptz/flipbook/js/flipbook.swipe.min.js"
30        ]
31
32        if (typeof jQuery === "undefined") {
33            flipbookScripts.unshift("https://cdnfile.gem2go.page/cdnstatic/system/Javascriptz/Jquery/jquery.min_1.7.2.js");
34        }
35
36        let flipbookScriptsPromises = [];
37        flipbookScripts.forEach((url) => {
38            flipbookScriptsPromises.push(ris_loadScript(url));
39        });
40
41        Promise.all(flipbookScriptsPromises).then(() => {
42            flipbookLinks.forEach((flipbookLink) => {
43                if(flipbookLink.href.indexOf("useFlipbook=true") > 0)
44                    initFlipbook(flipbookLink, null);
45            });
46        }).catch((url) => {
47            console.debug(url + " konnte nicht geladen werden.")
48        });
49    }
50});
51
52function initFlipbook(flipbookLink, element = null) {
53    if (flipbookLink.href.indexOf("useFlipbook=true") > 0) {
54        flipbookLink.addEventListener("click", (e) => {
55            if (e.currentTarget.href.indexOf("useFlipbook=true") < 0)
56                e.stopImmediatePropagation();
57            else
58                e.preventDefault();
59        });
60    }
61
62    //Erweiterung zur anpassung der Position des schliessen Buttons - für Kiosk Varianten
63    let verticalAlign = "top";
64    let horizontalAlign = "right";
65
66    const params = new URL(flipbookLink.href).searchParams;
67    if (params.has("vAlign")) {
68        verticalAlign = params.get("vAlign");
69    }
70    if (params.has("hAlign")) {
71        horizontalAlign = params.get("hAlign");
72    }
73
74    var container = null;
75    if (element == null)
76        container = flipbookLink;
77    else
78        container = element;
79
80    let flipbookOptions = {
81        pdfUrl: flipbookLink.getAttribute("href"),
82        lightBox: !0,
83        skin: "dark",
84        pageTextureSizeSmall: 2048,
85        annotationLayer: false,
86        btnBookmark: {
87            enabled: !1
88        },
89        btnPrint: {
90            enabled: !1
91        },
92        btnShare: {
93            enabled: !1
94        },
95        btnDownloadPages: {
96            enabled: !1
97        },
98        btnToc: {
99            enabled: !1
100        },
101        btnDownloadPdf: {
102            iconFA: "flipbook-icon-download",
103            iconM: "flipbook-icon-file_download"
104        },
105        btnClose: {
106            vAlign: verticalAlign,
107            hAlign: horizontalAlign
108        }
109    };
110
111    if (typeof globalFlipbookOptions !== "undefined" && globalFlipbookOptions !== null)
112        flipbookOptions = { ...flipbookOptions, ...globalFlipbookOptions };
113
114    let book = $(container).flipBook(flipbookOptions);
115
116    //flipbookLink.dataset.flipbook = book;
117    $(flipbookLink).data("flipbook", book);
118}
119
120function ris_loadScript(url) {
121    return new Promise(function (resolve, reject) {
122        let scriptEl = document.createElement("script");
123        scriptEl.src = url;
124        scriptEl.async = false;
125        scriptEl.onload = function () {
126            resolve(url)
127        };
128        scriptEl.onerror = function () {
129            reject(url);
130        };
131        flipbookInitScript.parentNode.insertBefore(scriptEl, flipbookInitScript.nextSibling);
132    });
vendor: 1 bytes, line 133
133}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.