PageSourceSearch

https://www.mango-office.ru/local/templates/mango_ru/js/external/svg.js

js mango-office.ru collected 2026-10-01 12:07:14 UTC 1,937 bytes, 86 lines download raw bytes

1/**
2 * Created by emas on 13.04.2016.
3 */
4;(function(window, document) {
5
6    'use strict';
7
8    // var file = '../img/svg-sprite/symbol/svg/sprite.symbol.svg', // путь к файлу спрайта на сервере
9
10    var file = '/static_files_new/img/svg-sprite/symbol_svg.svg', // путь к файлу спрайта на сервере
11
12        revision = 174; // версия спрайта
13
14    if (!document.createElementNS || !document.createElementNS('http://www.w3.org/2000/svg', 'svg').createSVGRect) return true;
15
16    var isLocalStorage = false;
17
18    // доступ к localStorage может быть заблокирован политикой безопасности браузера
19    try {
20        isLocalStorage = 'localStorage' in window && window['localStorage'] !== null;
21    } catch (e) {
22
23    }
24
25    var request,
26        data,
27
28        insertIT = function() {
29
30            document.body.insertAdjacentHTML('afterbegin', data);
31
32        },
33
34        insert = function() {
35
36            if (document.body) insertIT();
37
38            else document.addEventListener('DOMContentLoaded', insertIT);
39
40        };
41
42    if (isLocalStorage && localStorage.getItem('inlineSVGrev') == revision) {
43
44        data = localStorage.getItem('inlineSVGdata');
45
46        if (data) {
47
48            insert();
49
50            return true;
51
52        }
53
54    }
55
56    try {
57
58        request = new XMLHttpRequest();
59	
60	    request.open('GET', file + '?rev=' + revision, true);
61
62        request.onload = function() {
63
64            if (request.status >= 200 && request.status < 400) {
65
66                data = request.responseText;
67
68                insert();
69
70                if (isLocalStorage) {
71
72                    localStorage.setItem('inlineSVGdata', data);
73
74                    localStorage.setItem('inlineSVGrev', revision);
75
76                }
77
78            }
79
80        }
81
82        request.send();
83
84    } catch (e) {}
85
86}(window, document));

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.