PageSourceSearch

https://www.grosseswalsertal.at/cdnstatic/system/Javascript/flipbook/js/flipbook.init.js

js grosseswalsertal.at collected 2026-10-02 05:40:09 UTC 4,321 bytes, 111 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});
10
11document.addEventListener("DOMContentLoaded", function (event) {
12    let flipbookLinks = document.querySelectorAll("a[href*='useFlipbook=true'], a[data-was-flipbook=true]");
13    if (flipbookLinks.length > 0) {
14        //Loading Style
15        let styleEl = document.createElement("link");
16        styleEl.rel = "stylesheet";
17        styleEl.type = "text/css";
18        styleEl.href = "https://cdnfile.gem2go.page/cdnstatic/system/Javascriptz/flipbook/css/flipbook.style.css";
19        flipbookInitScript.parentNode.insertBefore(styleEl, flipbookInitScript.nextSibling);
20
21        //Loading Scripts
22        let flipbookScripts = [
23            "https://cdnfile.gem2go.page/cdnstatic/system/Javascriptz/flipbook/js/three.min.js",
24            "https://cdnfile.gem2go.page/cdnstatic/system/Javascriptz/flipbook/js/pdf.min.js",
25            "https://cdnfile.gem2go.page/cdnstatic/system/Javascriptz/flipbook/js/pdf.worker.min.js",
26            "https://cdnfile.gem2go.page/cdnstatic/system/Javascriptz/flipbook/js/iscroll.min.js",
27            "https://cdnfile.gem2go.page/cdnstatic/system/Javascriptz/flipbook/js/flipbook.min.js",
28            "https://cdnfile.gem2go.page/cdnstatic/system/Javascriptz/flipbook/js/flipbook.book3.min.js",
29            "https://cdnfile.gem2go.page/cdnstatic/system/Javascriptz/flipbook/js/flipbook.webgl.min.js",
30            "https://cdnfile.gem2go.page/cdnstatic/system/Javascriptz/flipbook/js/flipbook.swipe.min.js"
31        ]
32
33        if (typeof jQuery === "undefined") {
34            flipbookScripts.unshift("https://cdnfile.gem2go.page/cdnstatic/system/Javascriptz/Jquery/jquery.min_1.7.2.js");
35        }
36
37        let flipbookScriptsPromises = [];
38        flipbookScripts.forEach((url) => {
39            flipbookScriptsPromises.push(ris_loadScript(url));
40        });
41
42        Promise.all(flipbookScriptsPromises).then(() => {
43            flipbookLinks.forEach((flipbookLink) => {
44                if (flipbookLink.href.indexOf("useFlipbook=true") > 0)
45                    initFlipbook(flipbookLink, null);
46            });
47        }).catch((url) => {
48            console.debug(url + " konnte nicht geladen werden.")
49        });
50    }
51});
52
53function initFlipbook(flipbookLink) {
54    if (flipbookLink.href.indexOf("useFlipbook=true") > 0) {
55        flipbookLink.addEventListener("click", (e) => {
56            if (e.target.href.indexOf("useFlipbook=true") < 0)
57                e.stopImmediatePropagation();
58            else
59                e.preventDefault();
60        });
61    }
62
63
64    let flipbookOptions = {
65        pdfUrl: flipbookLink.getAttribute("href"),
66        lightBox: !0,
67        skin: "dark",
68        pageTextureSizeSmall: 2048,
69        annotationLayer: false,
70        btnBookmark: {
71            enabled: !1
72        },
73        btnPrint: {
74            enabled: !1
75        },
76        btnShare: {
77            enabled: !1
78        },
79        btnDownloadPages: {
80            enabled: !1
81        },
82        btnToc: {
83            enabled: !1
84        },
85        btnDownloadPdf: {
86            iconFA: "flipbook-icon-download",
87            iconM: "flipbook-icon-file_download"
88        }
89    };
90    if (typeof globalFlipbookOptions !== "undefined" && globalFlipbookOptions !== null)
91        flipbookOptions = { ...flipbookOptions, ...globalFlipbookOptions };
92
93    let book = $(flipbookLink).flipBook(flipbookOptions);
94    //flipbookLink.dataset.flipbook = book;
95    $(flipbookLink).data("flipbook", book);
96}
97
98function ris_loadScript(url) {
99    return new Promise(function (resolve, reject) {
100        let scriptEl = document.createElement("script");
101        scriptEl.src = url;
102        scriptEl.async = false;
103        scriptEl.onload = function () {
104            resolve(url)
105        };
106        scriptEl.onerror = function () {
107            reject(url);
108        };
109        flipbookInitScript.parentNode.insertBefore(scriptEl, flipbookInitScript.nextSibling);
110    });
vendor: 1 bytes, line 111
111}

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.