How to add a script in crm Bitrix?

You need to change the text with js, the code is written, but much stick I do not know.590fbd3344.jpg

https://b24-y68x8f.bitrix24.ru/stream/

code like this
$(document).ready(function() {
 String.prototype.replaceAll = function(s1, s2) {
 return this.replace(
 new RegExp( s1.replace(/[.^$*+?()[{\|]/g, '\\$&'), 'g' ),
s2
);
};

 var e = $("span"),
 fix = e.html().replaceAll('74991105297', "Text1");
e.html(fix);
});


Tell me where to find the file js or php where to insert this code, what he would have earned.
March 23rd 20 at 18:56
1 answer
March 23rd 20 at 18:58
In local/php_interface/init.php

<?
use Bitrix\Main\Page\Asset;

CJSCore::Init(array("jquery" ));

$oAsset = Asset::getInstance();
$oAsset->addJs('тут_путь_к_вашем_скрипту_относительно_document_root', true);
And here it ? Question about Битриксе24 - SRM system. - Estella_DuBuque72 commented on March 23rd 20 at 19:01
not noticed that in the cloud - kira commented on March 23rd 20 at 19:04
@kira, no it's not the cloud we do this on the box only on our box Bitrix24 CRM - Estella_DuBuque72 commented on March 23rd 20 at 19:07
the screen is made with the cloud for example. and in fact we on the box don't know which file to change or where to add it in which file out of the box. we need the path to that file. - Estella_DuBuque72 commented on March 23rd 20 at 19:10
Well, the difference in init.php what?
The same initialization is similar to brand - Saul commented on March 23rd 20 at 19:13
@Estella_DuBuque72, then if you have a box portal solution use the option I suggested. Bitrix24 and Bitrix CMS uses Bitrix Framework (which includes handlers, d7, bootstrap file - just init and much more).

For cloud portals, the problem lies precisely in the fact that code access - no, you need to search for the place of incorporation (if the developers have provided such a place) or to issue the application (but then you will only be given a frame with the authorization token) - kira commented on March 23rd 20 at 19:16
@kira, you have access to the files but when you change them, crashes website - Theodora commented on March 23rd 20 at 19:19
files - Theodora commented on March 23rd 20 at 19:22
joxi.ru/xAe51eCRP0ZJAy - Theodora commented on March 23rd 20 at 19:25

Find more questions by tags Bitrix24jQuery