PageSourceSearch

http://www.turmush.kg/uiall-js/addtocopy2.js?version=1

js turmush.kg collected 2026-10-01 08:58:12 UTC 20,539 bytes, 188 lines download raw bytes

1(function ($) {
2jQuery.fn.addtocopy = function (user_options) { var options = {htmlcopytxt: ""}; $.extend(options, user_options); var addLink = function () { var e = window.getSelection(); var f; if (options.htmlcopytxt) { f = options.htmlcopytxt; } else { var d = window.location.host + window.location.pathname + "?f=cp"; f = "<br/> Подробнее: <a href='" + d + "'>" + d + "</a>"; } var h = e.toString().trim().replace(/\n/g, "<br/>") + f, g = document.createElement("div"), b = e.getRangeAt(0); document.body.appendChild(g); g.innerHTML = h; e.selectAllChildren(g); window.setTimeout(function () { document.body.removeChild(g); e.removeAllRanges(); e.addRange(b); }, 0); }; return $(this).each(function () { $(this).on("copy", addLink); }); };
3    jQuery.fn.AkiDeviceFullScreen = function (user_options) {
4        var options = { device: 'android', bg_color: '#027C71', bg_img: 'http://doska.kg/ui-img/android/android-app-doska.jpg', market_url: 'https://play.google.com/store/apps/details?id=org.akipress', market_img: 'http://doska.kg/ui-img/android/android-play.png', caption: '', host: location.host, cookie_name: '_app-full-screen', cookie_name_hide: '_app-toolbar_hide', cookie_val: '1', expires: 604800, timeout: 10000, event_cat: 'full_screen', margin_top: 40, before_show: function () { }, after_show: function () { }, before_show_tool: function () { }, marginTop: 82, show_toolbar: false, show_only_toolbar: false, app_id: 'org.akipress', app_toolbar_top: 0, debug: false };
5        $.extend(options, user_options);
6        function getCookie(name) { var matches = document.cookie.match(new RegExp("(?:^|; )" + name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, '\\$1') + "=([^;]*)")); return matches ? decodeURIComponent(matches[1]) : undefined; }
7        $('body').on('click', '.click_element', function () { if (typeof ga != "undefined")ga('send', 'event', options.event_cat, options.device + ' fullscren click', 'fullscren click'); window.location = options.market_url; return false; });
8        function checkCookie() { var cookieEnabled = (navigator.cookieEnabled) ? true : false; if (typeof navigator.cookieEnabled == "undefined" && !cookieEnabled) { document.cookie = "testcookie"; cookieEnabled = (document.cookie.indexOf("testcookie") != -1) ? true : false; } return cookieEnabled; }
9        function setCookie(name, value, opt) { opt = opt || {}; var expires = opt.expires; if (typeof expires == 'number' && expires) { var d = new Date(); d.setTime(d.getTime() + expires * 1000); expires = opt.expires = d; } if (expires && expires.toUTCString) { opt.expires = expires.toUTCString(); } value = encodeURIComponent(value); var updatedCookie = name + '=' + value; for (var propName in opt) { updatedCookie += '; ' + propName; var propValue = opt[propName]; if (propValue !== true) { updatedCookie += "=" + propValue; } } document.cookie = updatedCookie; }
10        var find = function (needle) { return window.navigator.userAgent.toLowerCase().indexOf(needle) !== -1; };
11        if (window.location.hash == '#demo') { options.debug = true; }
12        var isDevice = false;
13        if (options.device == "android") { isDevice = find('android') && !find('windows'); } else if (options.device == "ios") { isDevice = (!find('windows') && find('iphone')) || find('ipod') || find('ipad'); }
14        if (options.show_only_toolbar) { if (isDevice && getCookie(options.cookie_name_hide)!=options.cookie_val) {options.before_show.call(); appToolbar(); options.after_show.call(); } return $(this);}
15        if (typeof document.cookie == "undefined" || !checkCookie()) { return $(this); }
16        if (options.debug == false && getCookie(options.cookie_name) == options.cookie_val) { appToolbar(); return $(this); }
17        var find = function (needle) { return window.navigator.userAgent.toLowerCase().indexOf(needle) !== -1; };
18        if(options.app_toolbar_top > 0) { $('body').css({marginTop: options.app_toolbar_top}); }
19        function templateBind(bindData) {
20            if ($.isEmptyObject(bindData)) return;
21            var html = '<div id="app-toolbar" class="app-toolbar" style="display: none">';
22            /*if (typeof bindData.playStoreUrl !== "undefined") { html += '<a onclick="ga(\'send\', \'event\', \'app-toolbar\', \'app-toolbar click\', \'app-toolbar click\');" class="link app-toolbar__installLink" href="' + bindData.playStoreUrl + '">'; }*/
23            html += '<div class="app-toolbar__install">'; if (typeof bindData.playStoreUrl !== "undefined") { html += '<a onclick="ga(\'send\', \'event\', \'app-toolbar\', \'app-toolbar click\', \'app-toolbar click\');" class="link app-toolbar__installLink" href="' + bindData.playStoreUrl + '">Скачать</a></div>'; } if (typeof bindData.title !== "undefined") { html += '<div class="app-toolbar__title">' + bindData.title + '</div>'; } if (typeof bindData.category !== "undefined") { html += '<div class="app-toolbar__desc">' + bindData.category + '</div>'; } html += '<div class="app-toolbar__rating" style="background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAQAAAC1QeVaAAAAY0lEQVR4AWP4jwcSloSB4oTiBCC
23FQ/JB8QN0SYS+/0CYgCZZXFDcUHyg+ANIEkgeAPIKEJILgIKocAHCWHTpBWh2Fl+AS10AipEgCRY+AIRAGk2y2ADoxwCwogAgy4Co4MMDAQ52uOmaLCe/AAAAAElFTkSuQmCC)"></div>'; if (typeof bindData.price !== "undefined" && typeof  bindData.price_currency !== "undefined") { html += '<div class="app-toolbar__sub">' + (bindData.price > 0 ? (bindData.price + '' + bindData.price_currency) : "Бесплатно") + '</div>'; } html += '<div class="app-toolbar__logo"></div><div class="app-toolbar__close" style="background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMCIgaGVpZ2h0PSIxMCIgdmlld0JveD0iMCAwIDEwIDEwIj48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZmlsbD0iIzhDODc4MiIgZD0iTTEwLDEwSDguNTg2TDUsNi40MTRMMS40MTQsMTBIMFY4LjU4NUwzLjU4Niw1TDAsMS40MTRWMGgxLjQxNAlMNSwzLjU4NUw4LjU4NiwwSDEwdjEuNDE0TDYuNDE0LDVMMTAsOC41ODVWMTB6Ii8+PC9zdmc+)"></div>'; /*if (typeof bindData.playStoreUrl !== "undefined") { html += "</a>"; }*/ html += '</div>';
24            var app_toolbar = { position: 'absolute', top: options.margin_top, right: 0, left: 0, zIndex: 2, overflow: 'hidden', minHeight: 70, border: '1px solid #c2c2c2', borderWidth: '1px 0', backgroundColor: '#f2f2f2', color: '#212121', font: '12px/14px Helvetica, Arial, sans-serif', userSelect: 'none' };
25            var app_toolbar__install = { minWidth: 94, padding: '0 10px 0', lineHeight: '70px', float: 'right', textAlign: 'center', whiteSpace: 'nowrap', boxSizing: 'border-box' };
26            var app_toolbar__title = { position: 'relative', overflow: 'hidden', margin: '13px 98px 1px 101px', maxHeight: 48, font: '700 14px/15px Helvetica, Arial, sans-serif' };
27            var app_toolbar__rating = { width: (bindData.rating * 10), backgroundRepeat: 'repeat-x', backgroundSize: 10, height: 9, margin: '3px 0 4px 100px' };
28            var app_toolbar__desc = { position: 'relative', overflow: 'hidden', color: '#616161', margin: '3px 98px 1px 101px', maxHeight: 48, font: '300 12px/13px Helvetica,Arial,sans-serif' };
29            var app_toolbar__sub = { overflow: 'hidden', margin: '0 95px 5px 101px', color: '#689f38', textOverflow: 'ellipsis', whiteSpace: 'nowrap', fontSize: 12, lineHeight: 1.4 };
30            var app_toolbar__logo = { backgroundImage: 'url(' + bindData.icon + ')', overflow: 'hidden', boxSizing: 'border-box', backgroundOrigin: 'border-box', borderRadius: 20, top: '9px', left: '29px', width: '54px', height: '54px', position: 'absolute', backgroundSize: '100%' };
31            var app_toolbar__close = { backgroundRepeat: 'no-repeat', width: 18, height: '100%', top: 0, left: 5, marginTop: 0, cursor: 'pointer', position: 'absolute', backgroundSize: 'contain', backgroundPosition: 'center' };
32            var app_toolbar__installLink = { textTransform: 'uppercase', fontSize: 13, color: '#689f38' };
33            if ($('#app-toolbar').length < 1) { $('body').append(html); }
34            $('#app-toolbar').css(app_toolbar).show();
35            $('.app-toolbar__install').css(app_toolbar__install);
36            $('.app-toolbar__title').css(app_toolbar__title);
37            $('.app-toolbar__desc').css(app_toolbar__desc);
38            $('.app-toolbar__rating').css(app_toolbar__rating).hide();
39            $('.app-toolbar__sub').css(app_toolbar__sub);
40            $('.app-toolbar__logo').css(app_toolbar__logo);
41            $('.app-toolbar__installLink').css(app_toolbar__installLink);
42            $('body').css('margin-top', options.marginTop);
43            $('.app-toolbar__close').css(app_toolbar__close).click(function () { $('#app-toolbar').hide('10', function () { $('body').css('margin-top', '0'); setCookie(options.cookie_name_hide, 1, { expires: 24 * 3600, path: '/', domain: options.host }); ga("send", "event", "app-toolbar", "app-toolbar hide", "app-toolbar hide"); }); $('body').css({marginTop: 0}); });
44            $('.app-toolbar__installLink').click(function(){ setCookie(options.cookie_name_hide, 1, { expires: 24 * 3600, path: '/', domain: options.host }); });
45
46        }
47
48        function appToolbar() {
49            if (options.show_toolbar == false || isDevice == false) return;
50            if (getCookie(options.cookie_name_hide) == 1) return;
51            var currentTime = Math.floor(Date.now() / 1000);
52            var appDesc = {};
53            var appDescDate = null;
54            if (typeof localStorage !== 'undefined') { appDesc = JSON.parse(localStorage.getItem('app__' + options.device)); appDescDate = JSON.parse(localStorage.getItem('app_date__' + options.device)); if (typeof appDesc !== "undefined" && appDesc != null) { if (typeof appDesc.title == "null" || appDesc.icon == "null" || appDesc.rating == "null" || appDesc.playStoreUrl == "null" || appDesc.category == "null" || appDesc.price == "null") { var appDesc = {}; var appDescDate = null; } } }
55            /*appDesc.title = 'Tazabek'; appDesc.icon = 'http://www.tazabek.kg/ui-img/tazabek-app-logo.png'; appDesc.playStoreUrl = options.market_url; appDesc.rating = 4.2; appDesc.category = 'Новости и журналы'; templateBind(appDesc); appDescDate + (3600 * 7 * 24)  < currentTime*/
56            if (!(currentTime < appDescDate + 3600 && typeof appDesc !== "undefined" && appDesc != null && typeof appDescDate !== "undefined" && appDescDate != null)) { $.getJSON((location.protocol == "https:" ? "https:" : "http:") + '//akipress.org/app/?device=' + options.device + '&id=' + options.app_id).done(function (data) { var app = JSON.parse(JSON.stringify(data)); appDesc = {}; appDesc.title = app.title; appDesc.icon = app.iconMini; appDesc.playStoreUrl = app.storeUrlDevice; appDesc.rating = app.rating; appDesc.category = app.category; appDesc.price = app.price; appDesc.price_currency = app.price_currency; if (typeof localStorage !== 'undefined') { localStorage.setItem('app__' + options.device, JSON.stringify(appDesc)); localStorage.setItem('app_date__' + options.device, currentTime); } templateBind(appDesc); ga("send", "event", "app-toolbar", "load", "app-toolbar new data");  }); } else { templateBind(appDesc); }
57        }
58
59
60        if (isDevice) {
61            options.before_show.call();
62            ga('send', 'event', options.event_cat, options.device + ' fullscreen show', 'fullscreen show');
63            appToolbar();
64            var app_full_screen = { backgroundColor: options.bg_color, position: 'fixed', left: 0, top: 0, right: 0, bottom: 0, zIndex: 99998 };
65            var app_full_screen__cancelLink = { textDecoration: 'none', color: '#fff', position: 'fixed', right: 20, top: 0, fontSize: '5em', zIndex: 99999 };
66            var app_full_screen__clickElem = { background: 'url(' + options.bg_img + ') center/cover no-repeat', width: '100%', height: '100%', position: 'relative' };
67            var app_full_screen_storeLogo = { position: 'absolute', left: 20, top: 20 };
68            var app_full_screen_storeLogoImg = { width: 140 };
69            var app_full_screen_storeCaption = { textAlign: 'center', color: '#fff', fontSize: '2rem' };
70            var app_full_screen_storeCaptionWrap = { position: 'absolute', left: 0, bottom: 30, width: '100%' };
71            var full_screen = '<div id="app-full-screen"><noindex>' + '<a href="javascript:void(0)" title="Закрыть" class="cancel-link">×</a>' + '<div class="click_element wrap-bg">' + '<div class="store-logo">' + '<a target="_blank" class="click_element" href="javascript:void(0)">' + '<img src="' + options.market_img + '"></a></div>' + '<div class="store-caption-wrap">' + '<div class="store-caption text-scale">' + '<a target="_blank" class="text-scale click_element"  href="javascript:void(0)">' + options.caption + '</a></div></div></noindex></div>' + '<style> @-webkit-keyframes text-scale{0% {transform: scale(1);  -webkit-transform: scale(1);}50% {transform: scale(1.2);  -webkit-transform: scale(1.2);}100% {transform: scale(1);  -webkit-transform: scale(1);}}' + ' @keyframes text-scale{0% {transform: scale(1);  -webkit-transform: scale(1);}50% {transform: scale(1.2);  -webkit-transform: scale(1.2);}100% {transform: scale(1);  -webkit-transform: scale(1);}}' + '.text-scale{text-decoration:none; color: #fff; -webkit-animation: text-scale 5s infinite;animation: text-scale 5s infinite;}</style>';
72            $('body').css('overflow', 'hidden');
73            $('body').append(full_screen).on('click', '.cancel-link', function () { ga('send', 'event', options.event_cat, options.device + ' fullscreen user hide', 'cancel btn'); $('body').css('overflow', 'auto'); $('#app-full-screen').remove(); options.after_show.call(); setCookie(options.cookie_name, options.cookie_val, { expires: options.expires, path: '/', domain: options.host }); });
74            $('#app-full-screen').css(app_full_screen);
75            $('#app-full-screen .cancel-link').css(app_full_screen__cancelLink);
76            $('#app-full-screen .wrap-bg.click_element').css(app_full_screen__clickElem);
77            $('#app-full-screen .store-logo').css(app_full_screen_storeLogo);
78            $('#app-full-screen .store-logo img').css(app_full_screen_storeLogoImg);
79            $('#app-full-screen .store-caption').css(app_full_screen_storeCaption);
80            $('#app-full-screen .store-caption-wrap').css(app_full_screen_storeCaptionWrap);
81            if (!options.debug) { setTimeout(function () { $('body').css('overflow', 'auto'); $('#app-full-screen').remove(); setCookie(options.cookie_name, options.cookie_val, { expires: options.expires, path: '/', domain: options.host });
82            options.after_show.call();
83            ga('send', 'event', options.event_cat, options.device + ' fullscren end time', 'timeout end'); }, options.timeout); }
84        }
85        return $(this);
86    };
87})(jQuery);
88
89(function ($) {
90    jQuery.fn.CheckResizeAds = function (user_options) {
91        var options = {
92            debug: false,
93            frameParentElem: window,
94            notEmptyCallBack: function () {},
95            emptyCallBack: function () {},
96            beforeCallBack: function () {},
97            afterCallBack: function () {},
98            isResizeWidth: true,
99            isResizeHeight: true
100        };
101
102        $.extend(options, user_options);
103        var isMutation = "MutationObserver" in window;
104
105        options.beforeCallBack.call(this, isMutation);
106
107        var resizeElement = function (elem, w, h) {
108            var iw = $(options.frameParentElem).width();
109            var ih = $(options.frameParentElem).height();
110            if(iw < ih) {
111                var xRatio = iw / w;
112                if (w > iw) {
113                    if (options.isResizeWidth) elem.width(iw).attr('width', iw);
114                    if (options.isResizeHeight) elem.height(xRatio * h).attr('height', xRatio * h);
115                    logToConsole('Banner has been resized');
116                }
117            } else {
118                var xRatioH = ih / h;
119                if (h > ih) {
120                    if (options.isResizeWidth) elem.width(w * xRatioH).attr('width', w * xRatioH);
121                    if (options.isResizeHeight) elem.height(ih).attr('height', ih);
122                    logToConsole('Banner has been resized');
123                }
124            }
125        };
126        var logToConsole = function (log) {
127            if (options.debug && typeof console.log !== "undefined")
128                console.log('CheckResizeAds: ' + log);
129        };
130
131        var listenerMutation = function (el) {
132            try {
133                var obs = new MutationObserver(function (mutations, observer) {
134                    $.each(mutations, function (i, mutation) {
135                        var filteredFrame = $(mutation.addedNodes).find('iframe');
136                        var filteredLink = $(mutation.addedNodes).find('a');
137                        var filteredImg = $(mutation.addedNodes).find('img');
138                        var adstype = "undefined";
139
140
141                        if (filteredFrame.length > 0) {
142                            adstype = "iframe";
143                            filteredFrame.each(function () {
144                                resizeElement($(this), $(this).attr('width'), $(this).attr('height'));
145                                if(typeof options.notEmptyCallBack == 'function')
146                                    options.notEmptyCallBack.call(this, el, adstype);
147                                logToConsole('Found html ads, zonei
147d ' + $(this).parent('ins').first().data('revive-zoneid'));
148                            });
149                        } else if (filteredLink.length > 0) {
150                            adstype = "link";
151                            filteredLink.each(function () {
152                                resizeElement($(this).parent('ins').first(), $(this).find('img').attr('width'), $(this).find('img').attr('height'));
153                                resizeElement($(this).find('img').first(), $(this).find('img').attr('width'), $(this).find('img').attr('height'));
154                                if(typeof options.notEmptyCallBack == 'function')
155                                    options.notEmptyCallBack.call(this, el, adstype);
156                                logToConsole('Found img with link ads, zoneid ' + $(this).parent('ins').first().data('revive-zoneid'));
157                            });
158                        } else if(filteredImg.length > 0 && (filteredImg[0].clientWidth > 1 || filteredImg[0].getAttribute('width') > 1)){
159                            adstype = "img";
160                            filteredImg.each(function () {
161                                resizeElement($(this).parent('ins').first(), $(this).attr('width'), $(this).attr('height'));
162                                if(typeof options.notEmptyCallBack == 'function')
163                                    options.notEmptyCallBack.call(this, el, adstype);
164                                logToConsole('Found img ads, zoneid ' + $(this).parent('ins').first().data('revive-zoneid'));
165                            });
166                        } else {
167                            if(typeof options.emptyCallBack == 'function')
168                                options.emptyCallBack.call(this, el, adstype);
169                            logToConsole('Not found ads, zoneid ' + $(mutation.addedNodes).first().data('revive-zoneid'));
170                        }
171                    });
172                });
173                obs.observe(el, {childList: true});
174                options.afterCallBack.call(this, isMutation);
175            } catch (e) {
176                console.error(e.toString());
177                options.afterCallBack.call(this, isMutation);
178            }
179        };
180
181        return $(this).each(function (i,elem) {
182            logToConsole('ins with zoneid ' + $(this).find('ins').data('revive-zoneid'));
183            listenerMutation(elem);
184        });
185    };
186})(jQuery);
187
188(function ($) { jQuery.fn.format = function () { function format(text, n, x, s, c) { var re = '\\d(?=(\\d{' + (x || 3) + '})+' + (n > 0 ? '\\D' : '$') + ')', num = Number(text).toFixed(Math.max(0, ~~n)); return (c ? num.replace('.', c) : num).replace(new RegExp(re, 'g'), '$&' + (s || ',')); }  return $(this).each(function () { var number = $(this).text(); if (Number(number) === null) return false; number = format(number, 0, 3, ' '); $(this).html(number); }); }; })(jQuery);

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.