DmitrMakeev commited on
Commit
bdf03dd
·
verified ·
1 Parent(s): 3a0ccdb

Update js/rus/rus.js

Browse files
Files changed (1) hide show
  1. js/rus/rus.js +52 -13
js/rus/rus.js CHANGED
@@ -1250,13 +1250,19 @@ editor.Blocks.add('senler_form_btn_v1-settings-block-block', {
1250
  editor.Components.addType('senler_btn_ud_v1-settings-block', {
1251
  model: {
1252
  defaults: {
1253
- content: '<div id="set_senler_btn_ud_1"></div>',
1254
  script: function(props) {
1255
  window.w_url = props.w_url;
1256
  window.vk_grup = props.vk_grup;
1257
  window.s_grup = props.s_grup;
 
1258
  window.on_url = props.on_url;
1259
- window.red_on = props.red_on;
 
 
 
 
 
1260
  const initBlock = () => {
1261
  console.log('18CoastCustoms');
1262
  console.log('GB_page_look');
@@ -1270,21 +1276,20 @@ editor.Components.addType('senler_btn_ud_v1-settings-block', {
1270
  if (typeof vkBridge === 'undefined') {
1271
  loadScript('https://unpkg.com/@vkontakte/vk-bridge/dist/browser.min.js', () => {
1272
  console.log('VK Bridge loaded!');
1273
-
1274
  });
1275
  }
1276
- if (typeof VK === 'undefined') {
1277
- loadScript('https://vk.com/js/api/openapi.js?169', () => {
1278
- console.log('VK Open API loaded!');
1279
  });
1280
  }
1281
 
1282
- loadScript('https://huggingface.co/spaces/DMTuit/psy_vk/resolve/main/js/senler_btn_ud_v1.js', () => {
1283
  initBlock();
1284
  console.log('Custom script loaded!');
1285
  });
1286
  },
1287
- 'script-props': ['w_url', 'vk_grup', 's_grup', 'on_url', 'off_url', 'red_on'],
1288
  traits: [
1289
  {
1290
  type: 'text',
@@ -1304,16 +1309,52 @@ editor.Components.addType('senler_btn_ud_v1-settings-block', {
1304
  label: 'S_GRUP',
1305
  changeProp: true
1306
  },
 
 
 
 
 
 
1307
  {
1308
  type: 'text',
1309
  name: 'on_url',
1310
- label: 'Loyalty-URL',
 
 
 
 
 
 
1311
  changeProp: true
1312
  },
1313
  {
1314
  type: 'checkbox', // Изменено на checkbox
1315
- name: 'red_on',
1316
- label: 'Redirect',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1317
  changeProp: true
1318
  }
1319
  ]
@@ -1331,8 +1372,6 @@ editor.Blocks.add('senler_form_btn_ud_v1-settings-block-block', {
1331
 
1332
 
1333
 
1334
-
1335
-
1336
  // Создаем новый тип компонента для настройки формы для Сенлера
1337
  editor.Components.addType('senler_form_v1-settings-block', {
1338
  model: {
 
1250
  editor.Components.addType('senler_btn_ud_v1-settings-block', {
1251
  model: {
1252
  defaults: {
1253
+ content: '<div id="set_senler_btn_1"></div>',
1254
  script: function(props) {
1255
  window.w_url = props.w_url;
1256
  window.vk_grup = props.vk_grup;
1257
  window.s_grup = props.s_grup;
1258
+ window.red_on = props.red_on;
1259
  window.on_url = props.on_url;
1260
+ window.ups = props.ups;
1261
+ window.clarity_on = props.clarity_on;
1262
+ window.clarity_id = props.clarity_id;
1263
+ window.clarity_ses = props.clarity_ses;
1264
+ window.clarity_tar = props.clarity_tar;
1265
+ window.clarity_ev = props.clarity_ev;
1266
  const initBlock = () => {
1267
  console.log('18CoastCustoms');
1268
  console.log('GB_page_look');
 
1276
  if (typeof vkBridge === 'undefined') {
1277
  loadScript('https://unpkg.com/@vkontakte/vk-bridge/dist/browser.min.js', () => {
1278
  console.log('VK Bridge loaded!');
 
1279
  });
1280
  }
1281
+ if (typeof $ === 'undefined') {
1282
+ loadScript('https://code.jquery.com/jquery-3.6.0.min.js', () => {
1283
+ console.log('jquery loaded!');
1284
  });
1285
  }
1286
 
1287
+ loadScript('https://huggingface.co/spaces/DMTuit/psy_vk/resolve/main/js/senler_btn_antar_v1.js', () => {
1288
  initBlock();
1289
  console.log('Custom script loaded!');
1290
  });
1291
  },
1292
+ 'script-props': ['w_url', 'vk_grup', 's_grup', 'red_on', 'on_url', 'ups', 'clarity_on', 'clarity_id', 'clarity_ses', 'clarity_tar', 'clarity_ev'],
1293
  traits: [
1294
  {
1295
  type: 'text',
 
1309
  label: 'S_GRUP',
1310
  changeProp: true
1311
  },
1312
+ {
1313
+ type: 'checkbox', // Изменено на checkbox
1314
+ name: 'red_on',
1315
+ label: 'Redirect + User_ID',
1316
+ changeProp: true
1317
+ },
1318
  {
1319
  type: 'text',
1320
  name: 'on_url',
1321
+ label: 'Redirect-URL',
1322
+ changeProp: true
1323
+ },
1324
+ {
1325
+ type: 'text',
1326
+ name: 'ups',
1327
+ label: 'Parameter UPS',
1328
  changeProp: true
1329
  },
1330
  {
1331
  type: 'checkbox', // Изменено на checkbox
1332
+ name: 'clarity_on',
1333
+ label: 'Analytics Stream',
1334
+ changeProp: true
1335
+ },
1336
+ {
1337
+ type: 'text',
1338
+ name: 'clarity_id',
1339
+ label: 'Script Key',
1340
+ changeProp: true
1341
+ },
1342
+ {
1343
+ type: 'text',
1344
+ name: 'clarity_ses',
1345
+ label: 'Session Name',
1346
+ changeProp: true
1347
+ },
1348
+ {
1349
+ type: 'text',
1350
+ name: 'clarity_tar',
1351
+ label: 'Page Name',
1352
+ changeProp: true
1353
+ },
1354
+ {
1355
+ type: 'text',
1356
+ name: 'clarity_ev',
1357
+ label: 'Button Event',
1358
  changeProp: true
1359
  }
1360
  ]
 
1372
 
1373
 
1374
 
 
 
1375
  // Создаем новый тип компонента для настройки формы для Сенлера
1376
  editor.Components.addType('senler_form_v1-settings-block', {
1377
  model: {