Changeset 2141952
- Timestamp:
- 08/19/2019 01:47:30 PM (7 years ago)
- Location:
- realbig-media/trunk
- Files:
-
- 2 edited
-
asyncBlockInserting.js (modified) (28 diffs)
-
realbigForWP.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
realbig-media/trunk/asyncBlockInserting.js
r2138846 r2141952 30 30 if (typeof endedCc === 'undefined') { 31 31 var endedCc = false; 32 } 33 if (typeof usedAdBlocksArray==='undefined') { 34 var usedAdBlocksArray = []; 35 } 36 if (typeof usedBlockSettingArrayIds==='undefined') { 37 var usedBlockSettingArrayIds = []; 32 38 } 33 39 … … 213 219 if (excIdClass&&excIdClass.length > 0) { 214 220 for (i = 0; i < excIdClass.length; i++) { 215 blocksRepositionUse(excIdClass[i], '', markingString); 216 } 217 } 218 221 if (excIdClass[i].length > 0) { 222 blocksRepositionUse(excIdClass[i], '', markingString); 223 } 224 } 225 } 219 226 } 220 227 221 228 function asyncBlocksInsertingFunction(blockSettingArray, contentLength) { 222 229 try { 223 var content_pointer = document.querySelector("#content_pointer_id"); 230 var content_pointer = document.querySelector("#content_pointer_id"); //orig 231 // var content_pointer = document.querySelectorAll("#content_pointer_id"); 232 // content_pointer = content_pointer[content_pointer.length - 1]; 224 233 var parent_with_content = content_pointer.parentElement; 225 234 var lordOfElements = parent_with_content; … … 239 248 let containerFor7th = []; 240 249 let posCurrentElement; 250 // var checkIfBlockUsed = 0; 241 251 242 252 function getFromConstructions(currentElement) { … … 306 316 } 307 317 318 // if (usedBlockSettingArray&&usedBlockSettingArray.length > 0) { 319 // for (let j = 0; j < usedBlockSettingArray.length; j++) { 320 // if (usedBlockSettingArrayIds.length > 0) { 321 // if (usedBlockSettingArrayIds.includes(usedBlockSettingArray[j]['id'])) { 322 // continue; 323 // } 324 // } 325 // usedBlockSettingArrayIds.push(usedBlockSettingArray[j]['id']); 326 // } 327 // } 328 308 329 for (var i = 0; i < blockSettingArray.length; i++) { 309 330 currentElement = null; … … 314 335 continue; 315 336 } 337 // checkIfBlockUsed = elementToAdd.querySelector('.content_rb'); 338 // checkIfBlockUsed = checkIfBlockUsed.getAttribute('data-id'); 339 // if (usedAdBlocksArray&&usedAdBlocksArray.length > 0) { 340 // if (checkIfBlockUsed&&checkIfBlockUsed > 0&&usedAdBlocksArray.includes(checkIfBlockUsed)) { 341 // blockSettingArray.splice(i, 1); 342 // continue; 343 // } 344 // } 345 // if (usedBlockSettingArrayIds&&usedBlockSettingArrayIds.length > 0) { 346 // if (checkIfBlockUsed&&checkIfBlockUsed > 0&&usedBlockSettingArrayIds.includes(checkIfBlockUsed)) { 347 // blockSettingArray.splice(i, 1); 348 // continue; 349 // } 350 // } 316 351 317 352 if (blockSettingArray[i]["minHeaders"] > 0) { … … 359 394 if (excIdClass&&excIdClass.length > 0) { 360 395 for (let i2 = 0; i2 < excIdClass.length; i2++) { 361 currentElement = blocksRepositionUse(excIdClass[i2], currentElement, 'marked'); 396 if (excIdClass[i2].length > 0) { 397 currentElement = blocksRepositionUse(excIdClass[i2], currentElement, 'marked'); 398 } 362 399 } 363 400 } … … 373 410 if (excIdClass&&excIdClass.length > 0) { 374 411 for (let i2 = 0; i2 < excIdClass.length; i2++) { 375 currentElement = blocksRepositionUse(excIdClass[i2], currentElement, 'marked'); 412 if (excIdClass[i2].length > 0) { 413 currentElement = blocksRepositionUse(excIdClass[i2], currentElement, 'marked'); 414 } 376 415 } 377 416 } … … 385 424 currentElement.parentNode.insertBefore(elementToAdd, posCurrentElement); 386 425 elementToAdd.classList.remove('coveredAd'); 426 // usedAdBlocksArray.push(checkIfBlockUsed); 387 427 blockSettingArray.splice(i, 1); 388 428 poolbackI = 1; … … 457 497 currentElement.parentNode.insertBefore(elementToAdd, posCurrentElement); 458 498 elementToAdd.classList.remove('coveredAd'); 459 499 // usedAdBlocksArray.push(checkIfBlockUsed); 460 500 blockSettingArray.splice(i, 1); 461 501 poolbackI = 1; … … 466 506 } else if (blockSettingArray[i]["setting_type"] == 4) { 467 507 parent_with_content.append(elementToAdd); 508 // usedAdBlocksArray.push(checkIfBlockUsed); 468 509 blockSettingArray.splice(i, 1); 469 510 poolbackI = 1; … … 471 512 } else if (blockSettingArray[i]["setting_type"] == 5) { 472 513 let currentElement = document.getElementById("content_pointer_id").parentElement; 514 // let currentElement = document.querySelectorAll("content_pointer_id"); 515 // currentElement = currentElement[currentElement.length - 1]; 516 // currentElement = currentElement.parentElement; 473 517 if (currentElement.getElementsByTagName("p").length > 0) { 474 518 let pCount = currentElement.getElementsByTagName("p").length; … … 480 524 if (excIdClass&&excIdClass.length > 0) { 481 525 for (let i2 = 0; i2 < excIdClass.length; i2++) { 482 currentElement = blocksRepositionUse(excIdClass[i2], currentElement, 'marked'); 526 if (excIdClass[i2].length > 0) { 527 currentElement = blocksRepositionUse(excIdClass[i2], currentElement, 'marked'); 528 } 483 529 } 484 530 } … … 491 537 elementToAdd.classList.remove('coveredAd'); 492 538 } 539 // usedAdBlocksArray.push(checkIfBlockUsed); 493 540 blockSettingArray.splice(i, 1); 494 541 poolbackI = 1; … … 507 554 if (j == containerFor6th.length-1) { 508 555 containerFor6th.push(blockSettingArray[i]); 556 // usedAdBlocksArray.push(checkIfBlockUsed); 509 557 blockSettingArray.splice(i, 1); 510 558 poolbackI = 1; … … 517 565 } 518 566 containerFor6th[j] = blockSettingArray[i]; 567 // usedAdBlocksArray.push(checkIfBlockUsed); 519 568 blockSettingArray.splice(i, 1); 520 569 poolbackI = 1; … … 525 574 } else { 526 575 containerFor6th.push(blockSettingArray[i]); 576 // usedAdBlocksArray.push(checkIfBlockUsed); 527 577 blockSettingArray.splice(i, 1); 528 578 poolbackI = 1; … … 537 587 if (j == containerFor7th.length-1) { 538 588 containerFor7th.push(blockSettingArray[i]); 589 // usedAdBlocksArray.push(checkIfBlockUsed); 539 590 blockSettingArray.splice(i, 1); 540 591 poolbackI = 1; … … 547 598 } 548 599 containerFor7th[j] = blockSettingArray[i]; 600 // usedAdBlocksArray.push(checkIfBlockUsed); 549 601 blockSettingArray.splice(i, 1); 550 602 poolbackI = 1; … … 555 607 } else { 556 608 containerFor7th.push(blockSettingArray[i]); 609 // usedAdBlocksArray.push(checkIfBlockUsed); 557 610 blockSettingArray.splice(i, 1); 558 611 poolbackI = 1; … … 561 614 // vidpravutu v vidstiinuk dlya 7ho tipa 562 615 } 616 // checkIfBlockUsed = 0; 563 617 } catch (e) { } 564 618 } … … 909 963 if (excIdClass&&excIdClass.length > 0) { 910 964 for (let i2 = 0; i2 < excIdClass.length; i2++) { 911 elementToBind = blocksRepositionUse(excIdClass[i2], elementToBind, 'marked'); 965 if (excIdClass[i2].length > 0) { 966 elementToBind = blocksRepositionUse(excIdClass[i2], elementToBind, 'marked'); 967 } 912 968 } 913 969 } … … 927 983 if (excIdClass&&excIdClass.length > 0) { 928 984 for (let i2 = 0; i2 < excIdClass.length; i2++) { 929 elementToBind = blocksRepositionUse(excIdClass[i2], elementToBind, 'marked'); 985 if (excIdClass[i2].length > 0) { 986 elementToBind = blocksRepositionUse(excIdClass[i2], elementToBind, 'marked'); 987 } 930 988 } 931 989 } … … 939 997 if (excIdClass&&excIdClass.length > 0) { 940 998 for (let i2 = 0; i2 < excIdClass.length; i2++) { 941 elementToBind = blocksRepositionUse(excIdClass[i2], elementToBind, 'marked'); 999 if (excIdClass[i2].length > 0) { 1000 elementToBind = blocksRepositionUse(excIdClass[i2], elementToBind, 'marked'); 1001 } 942 1002 } 943 1003 } … … 950 1010 if (excIdClass&&excIdClass.length > 0) { 951 1011 for (let i2 = 0; i2 < excIdClass.length; i2++) { 952 elementToBind = blocksRepositionUse(excIdClass[i2], elementToBind, 'marked'); 1012 if (excIdClass[i2].length > 0) { 1013 elementToBind = blocksRepositionUse(excIdClass[i2], elementToBind, 'marked'); 1014 } 953 1015 } 954 1016 } … … 1004 1066 var lastLceCou = 0; 1005 1067 var elementToBind; 1068 // var checkIfBlockUsed = 0; 1006 1069 1007 1070 function textLengthMeter(i, usedElement, deepLvl) { … … 1163 1226 for (let i = 0; i < perfectPlace.length; i++) { 1164 1227 if (perfectPlace[i].getAttribute('data-id') > textNeedyLength) { 1228 elementToAdd = document.querySelector('.percentPointerClass[data-id="'+containerFor6th[j]['id']+'"]'); 1229 if (!elementToAdd) { 1230 return false; 1231 } 1232 1165 1233 if (i > 0) { 1166 1234 localMiddleValue = perfectPlace[i].getAttribute('data-id') - perfectPlace[i-1].getAttribute('data-id'); … … 1170 1238 } 1171 1239 1172 elementToAdd = document.querySelector('.percentPointerClass[data-id="'+containerFor6th[j]['id']+'"]');1173 1240 elementToBind = perfectPlace[i]; 1174 1241 if (excIdClass&&excIdClass.length > 0) { 1175 1242 for (let i2 = 0; i2 < excIdClass.length; i2++) { 1176 elementToBind = blocksRepositionUse(excIdClass[i2], elementToBind, 'marked'); 1243 if (excIdClass[i2].length > 0) { 1244 elementToBind = blocksRepositionUse(excIdClass[i2], elementToBind, 'marked'); 1245 } 1177 1246 } 1178 1247 } … … 1183 1252 elementToBind.parentNode.insertBefore(elementToAdd, elementToBind); 1184 1253 } 1254 // usedAdBlocksArray.push(checkIfBlockUsed); 1185 1255 elementToAdd.classList.remove('coveredAd'); 1186 1256 return false; -
realbig-media/trunk/realbigForWP.php
r2138846 r2141952 11 11 Plugin name: Realbig Media 12 12 Description: Плагин для монетизации от RealBig.media 13 Version: 0.1.26.7 413 Version: 0.1.26.75 14 14 Author: Realbig Team 15 15 License: GPLv2 or later … … 138 138 $GLOBALS['realbigForWP_version'] = $pluginData['Version']; 139 139 } else { 140 $GLOBALS['realbigForWP_version'] = '0.1.26.7 4';140 $GLOBALS['realbigForWP_version'] = '0.1.26.75'; 141 141 } 142 142 $lastSuccessVersionGatherer = get_option('realbig_status_gatherer_version');
Note: See TracChangeset
for help on using the changeset viewer.