|
@@ -12,61 +12,48 @@ if(($controller!="site" && $action!="index") && Yii::$app->deviceDetect->isMobil
|
|
<div id="vi_105778" class="moevideo_inject"></div>
|
|
<div id="vi_105778" class="moevideo_inject"></div>
|
|
<script type="text/javascript">
|
|
<script type="text/javascript">
|
|
function moevideo() {
|
|
function moevideo() {
|
|
- console.log("Подключение моёвидео")
|
|
|
|
- (
|
|
|
|
- () => {
|
|
|
|
- const script = document.createElement("script");
|
|
|
|
- script.defer = true,
|
|
|
|
- script.src = "https://cdn1.moe.video/player/mvplayer.min.js";
|
|
|
|
- script.onload = () => {
|
|
|
|
- addContentRoll({
|
|
|
|
- width: '100%',
|
|
|
|
- placement: 10167,
|
|
|
|
- promo: true,
|
|
|
|
- advertCount: 10,
|
|
|
|
- slot: 'page',
|
|
|
|
- sound: 'onclick',
|
|
|
|
- fly:{
|
|
|
|
- mode: 'stick',
|
|
|
|
- animation: 'fly',
|
|
|
|
- width: 450,
|
|
|
|
- closeSecOffset: 3,
|
|
|
|
- position: 'bottom-right',
|
|
|
|
- },
|
|
|
|
- adEmpty: () => {
|
|
|
|
- var i = document.createElement("script");
|
|
|
|
- i.src = "https://player.codes/tag/load.js?sid=105778&tag_id=vi_105778";
|
|
|
|
- document.head.append(i); },
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- document.body.append(script);
|
|
|
|
- }
|
|
|
|
- )()
|
|
|
|
- }
|
|
|
|
- function adfinityVideoAdv(){
|
|
|
|
- console.log("Подключение adfinity")
|
|
|
|
- adfinity.event().publish('externalLaunch', 8427);
|
|
|
|
- }
|
|
|
|
- function videoAdvRotate(){
|
|
|
|
- const date = new Date();
|
|
|
|
- date.getSeconds()
|
|
|
|
- let flag = false;
|
|
|
|
- const scrollDelay = 200;
|
|
|
|
- console.log("Загрузка видеорекламы, ожидание прокрутки "+scrollDelay+"px")
|
|
|
|
- if(window.scrollY>scrollDelay && !flag) {
|
|
|
|
- console.log("Подключение видеорекламы, скролл достигнул " + scrollDelay + "px")
|
|
|
|
|
|
+ let flag = false;
|
|
|
|
+ const scrollDelay = 200;
|
|
|
|
+ console.log("Загрузка моевидео, ожидание прокрутки "+scrollDelay+"px")
|
|
|
|
+ if(window.scrollY>scrollDelay && !flag)
|
|
|
|
+ {
|
|
|
|
+ console.log("Подключение моёвидео, скролл достигнул "+scrollDelay+"px")
|
|
flag = true;
|
|
flag = true;
|
|
- window.removeEventListener("scroll", moevideo);
|
|
|
|
- if(date.getSeconds()%2){
|
|
|
|
- moevideo();
|
|
|
|
- } else {
|
|
|
|
- adfinityVideoAdv();
|
|
|
|
- }
|
|
|
|
|
|
+ window.removeEventListener("scroll", moevideo);
|
|
|
|
+ (
|
|
|
|
+ () => {
|
|
|
|
+ const script = document.createElement("script");
|
|
|
|
+ script.defer = true,
|
|
|
|
+ script.src = "https://cdn1.moe.video/player/mvplayer.min.js";
|
|
|
|
+ script.onload = () => {
|
|
|
|
+ addContentRoll({
|
|
|
|
+ width: '100%',
|
|
|
|
+ placement: 10167,
|
|
|
|
+ promo: true,
|
|
|
|
+ advertCount: 10,
|
|
|
|
+ slot: 'page',
|
|
|
|
+ sound: 'onclick',
|
|
|
|
+ fly:{
|
|
|
|
+ mode: 'stick',
|
|
|
|
+ animation: 'fly',
|
|
|
|
+ width: 450,
|
|
|
|
+ closeSecOffset: 3,
|
|
|
|
+ position: 'bottom-right',
|
|
|
|
+ },
|
|
|
|
+ adEmpty: () => {
|
|
|
|
+ var i = document.createElement("script");
|
|
|
|
+ i.src = "https://player.codes/tag/load.js?sid=105778&tag_id=vi_105778";
|
|
|
|
+ document.head.append(i); },
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ document.body.append(script);
|
|
|
|
+ }
|
|
|
|
+ )()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
setTimeout((function (){
|
|
setTimeout((function (){
|
|
// let flag = false;
|
|
// let flag = false;
|
|
- window.addEventListener('scroll',videoAdvRotate);
|
|
|
|
|
|
+ window.addEventListener('scroll',moevideo);
|
|
}), 7000);
|
|
}), 7000);
|
|
|
|
|
|
</script>
|
|
</script>
|