PageSourceSearch

https://akademia-excel.ru/pl/layout/12759/0/script.js

js akademia-excel.ru collected 2026-09-30 11:26:03 UTC 4,264 bytes, 111 lines download raw bytes

1(function(){  
2
3$(function(){
4  
5  // Fix для ссылки на страницу Профиля
6  $('a[href*="/user/my/profile"]').attr("href","/profile");
7  setTimeout(()=>{
8    $(".edit-profile-popup-btn").off().click(function(e) {
9      e.stopPropagation();
10      window.open('/profile', '_parent');
11    });
12  });
13
14  // Fix для Настроек вида
15  $('a[href*="'+window.location.pathname+'"][href$="/editMode/1"]').each((i,el)=>{
16    $(el).attr('href', $(el).attr('href').replace('/editMode/1','?editMode=1'));
17  });
18
19  // Fix для главного контейнера в Настройках вида
20  if(typeof window.PageChecker != "undefined" && (
21      window.PageChecker.isTrainingsPage || 
22      window.PageChecker.isOneTrainingPage ||
23      window.PageChecker.isOpenProfilePage || 
24      window.PageChecker.isPaymentsPage ||
25      window.PageChecker.isSuccessPaymentPage ||
26      window.PageChecker.isLoginPage ||
27      window.PageChecker.isContactUsPage ||
28      window.location.href.indexOf('/teach/control') > -1 ||
29      window.location.href.indexOf('/teach/control/stream') > -1 ||
30      window.location.href.indexOf('/teach/control/stream/index') > -1 
31  )) {
32    let url = window.location.href;
33    if(url.indexOf('/editMode/1') > -1 || url.indexOf('?editMode=1') > -1) {
34      $('body').addClass('compact-menu').append(`
35        <style>
36          @media (min-width: 769px) {
37            body #gcAccountUserMenu~.gc-main-content.with-left-menu {
38              margin-left: 90px!important;
39              width: calc(100% - 390px)!important;
40            }
41            #gcAccountUserMenu ~ .gc-main-content.with-left-menu > .container, 
42            #gcAccountUserMenu ~ .gc-main-content.with-left-menu > .page-full-block > .main-page-block > .container {
43              width: 100%!important;
44            }
45          }
46        </style>
47      `);
48    }
49  }
50
51  // Fix видео во всплывающем окне
52  $(document).on('click', '.gc-modal', (e)=> {
53   if(!$(e.target).is('.modal-dialog') && !$(e.target).parents('.modal-dialog').length) {
54    let curr_modal = $(e.target).closest('.gc-modal');
55    if(curr_modal.length) {
56      let videobox = $(curr_modal).find('.vhi-root').eq(0);
57      let iframe = $(videobox).find('iframe'); 
58      iframe.remove();
59      videobox.append(iframe);
60    }
61   }
62  });
63
64  // Fix предложений в форме
65  $('.form-position').each((i,el)=>{
66   $(el).find('input:not([type=text])').off('change').change((e)=>{ 
67    if ($(e.target).prop('checked') ) {
68      $(e.target).parents('form').find('.selected:not(:has(:checked))').removeClass("selected"); 
69      $(e.target).parents('.form-position').addClass('selected');
70    } else $(e.target).parents('.form-position').removeClass('selected');
71   });
72  })
73
74  // Fix Stripo
75  if(window.location.href.indexOf('/notifications/control/mailings/update/id/') > -1) {
76    let bodyObserver = new MutationObserver(function(mutations) {
77      if($('#stripoPluginIFrame').length > 0) {
78        let stripoPluginIFrameChecker = setInterval(()=>{
79          let stripoTable = $('#stripoPluginIFrame').contents().find('.stripoTable'); 
80          if(stripoTable.length > 0) {
81            clearInterval(stripoPluginIFrameChecker);
82            stripoTable.css({'left':'auto','right':0,'width':'100%'});
83          }
84        });
85      }
86    }).observe($('body')[0], { attributes: false, childList: true, characterData: false, subtree: false });
87    $('body').append(`
88      <style>
89        #stripoPluginIFrame {
90          right: 0!important;
91          left: auto!important;
92          width: calc(100% - 300px)!important;
93          transition: width .3s;
94        }
95        body.compact-menu #stripoPluginIFrame {
96          width: calc(100% - 90px)!important;
97        }
98      </style>
99    `);
100  }
101
102  // Fix для Ленты ответов
103  if(window.location.href.indexOf('/teach/control/answers') > -1) {
104    $(`#gcAccountUserMenu~.gc-main-content.with-left-menu>.container, 
105       #gcAccountUserMenu~.gc-main-content.with-left-menu>.page-full-block>.main-page-block>.container`)
106      .css('max-width', 'calc(100vw - 10px)');
107  }
108
109});
110
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.