Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

установил скрипт, не работает. #23

Open
mak0ma opened this issue Feb 6, 2017 · 4 comments
Open

установил скрипт, не работает. #23

mak0ma opened this issue Feb 6, 2017 · 4 comments

Comments

@mak0ma
Copy link

mak0ma commented Feb 6, 2017

установил ваш скрипт на сайт ( скачал в директорию с JS), прописал в html.tpl.php
код <script type="text/javascript" src="/sites/all/themes/basic/js/index.min.js"></script>

<script> !function(){function a(){window.addEventListener("message",function(a){var b;if("string"==typeof a.data)try{b=JSON.parse(a.data)}catch(a){return}else b=a.data;b&&"MBR_ENVIRONMENT"===b.type&&(a.stopImmediatePropagation(),a.stopPropagation(),a.data={})},!0)}function b(){try{k=new MutationObserver(function(a){d(a)})}catch(a){}document.body&&e(document.body.children)}function c(){return document.body?void(k&&k.observe(document.body,{childList:!0})):void setTimeout(c,200)}function d(a){a.forEach(function(a){var b=a.addedNodes;b&&b.length&&e(b)})}function e(a){Array.prototype.slice.call(a).forEach(function(a){i(a)&&j(a)&&h(a)})}function f(a,b){var c=document.createElement("style"),d="";for(var e in b)b.hasOwnProperty(e)&&(d+=e+":"+b[e]+" !important;\n");return c.type="text/css",c.appendChild(document.createTextNode(a+", "+a+":hover{"+d+"}")),c}function g(a,b){var c=f(a,b);document.body.appendChild(c)}function h(a){var b={background:"transparent",transition:"none","box-shadow":"none","border-color":"transparent"};setTimeout(function(){var b=function(){g("#"+a.id,{"pointer-events":"none"}),a.removeEventListener("mouseover",b,!0),a.removeEventListener("mouseenter",b,!0)};a.addEventListener("mouseover",b,!0),a.addEventListener("mouseenter",b,!0)},3e3),g("#"+a.id,b),g("#"+a.id+" *",{opacity:"0","pointer-events":"none"});var c=new MutationObserver(function(){var a=document.documentElement.style.marginTop;a&&0!==parseInt(a,10)&&(document.documentElement.style.marginTop="")});setTimeout(function(){c.disconnect(),c=null},5e3),c.observe(document.documentElement,{attributes:!0,attributeFilter:["style"]}),document.documentElement.style.marginTop=""}function i(a){return"DIV"===a.tagName}function j(a){return!!a.querySelector('[href*="sovetnik.market.yandex.ru"]')}var k;try{b(),c(),a()}catch(l){"undefined"!=typeof console&&console.error("error while kick sovetnik",l)}}();; </script>

в блоке HEAD

в результате в html коде страницы ваш скрипт отображается, но не работает.
проверял через firebug для Mozilla, скрипт срабатывает без ошибок

@mak0ma
Copy link
Author

mak0ma commented Feb 6, 2017

@prowebcraft
Copy link

Добрый день.
В Chrome плагин успешно блокируется данным скриптом. Если вы используете Yandex.Браузер, то данный скрипт не поможет, так как там Советник вшит на более низком уровне (вне DOM).

@mak0ma
Copy link
Author

mak0ma commented Feb 6, 2017

@prowebcraft
Добрый день.
т.е. в данный момент для браузера яндекс не способов заблокировать советника ? очень жаль, т.к. в хроме этот плагин не у всех установлен, а вот в яндексе он по умолчанию стоит.

@blinild
Copy link

blinild commented Nov 29, 2017

Тоже не могу добиться работоспособности в опере, хроме, фф.
Это я что-то делаю не так?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants