PageSourceSearch

https://www.salamair.com/templates/salamair/assets/js/common.js

js salamair.com collected 2026-10-01 12:34:08 UTC 1,647 bytes, 53 lines download raw bytes

1function getCurrentCulture() {
2    return $('html').attr('lang');
3}
4
5// Convert images into inline svg
6function imagesToSvg() {
7    $('img[src$=".svg"]').each(function () {
8        var $img = $(this);
9        var imgURL = $img.attr("src");
10        var attributes = $img.prop("attributes");
11
12        $.get(
13            imgURL,
14            function (data) {
15                // Get the SVG tag, ignore the rest
16                var $svg = $(data).find("svg");
17
18                // Remove any invalid XML tags
19                $svg = $svg.removeAttr("xmlns:a");
20
21                // Loop through IMG attributes and apply on SVG
22                $.each(attributes, function () {
23                    $svg.attr(this.name, this.value);
24                });
25
26                if ($img.attr("fill")) {
27                    $svg.find("path, circle, rect").css("fill", $img.attr("fill"));
28                }
29                if ($img.attr("fill-opacity")) {
30                    $svg.find("path, circle, rect").css("fill-opacity", $img.attr("fill-opacity"));
31                }
32                if ($img.attr("stroke")) {
33                    $svg.find("path, circle, rect").css("stroke", $img.attr("stroke"));
34                }
35                if ($img.attr("stroke-opacity")) {
36                    $svg.find("path, circle, rect").css("stroke-opacity", $img.attr("stroke-opacity"));
37                }
38
39                // Replace IMG with SVG
40                $img.replaceWith($svg);
41            },
42            "xml"
43        );
44    });
45}
46
47function getSession(callback) {
48    $.ajax({
49        type: "POST",
50        url: cmsAPIcallsession,
51        success: callback
52    });
53}

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.