Greasy Fork is available in English.

No Yandex Ads [discontinued]

Удаляет рекламу из результатов поиска Яндекс. Removes ads in Yandex search results.

< Valutazione su No Yandex Ads [discontinued]

Recensione: OK - lo script funziona, ma ha degli errori.

§
Pubblicato: 01/11/2014

Совместимость с Opera 12

Спасибо. Но в Opera 12 не работает. Сделайте совместимость с Оперой, пожалуйста.
Dragonfly пишет
if (s) (new MutationObserver(removeAds)).observe(s,{childList:true});
Unhandled Error: Undefined variable: MutationObserver

Lain inVerseAutore
§
Pubblicato: 18/11/2014

Не планируется. Связано это с тем, что я не хочу поддерживать код, основанный на веб-технологиях, которые в современных браузерах стремятся удалить.
https://developer.mozilla.org/en-US/docs/Web/Guide/Events/Mutation_events

А поддержки новых в Опере 12 нет и уже никогда не будет. Писать же отдельный скрипт для неё персонально я тем более не желаю так-как мне этот браузер совершенно не интересен.

§
Pubblicato: 16/04/2015
Modificato: 16/04/2015

A polyfill has already been made for MutationObserver that has been verified to work in Opera 12; you should just be able to copy and paste it in: https://github.com/megawac/MutationObserver.js

I would recommend @require but I don't think old Opera's native UserJS system supports that.

EDIT: Here's my fork: https://greasyfork.org/en/scripts/9243-no-yandex-ads

FTR it seems like the latest Fanboy Ultimate urlfilter.ini already blocked the ad-content, although it did not remove the HTML elements where the ads would go; in my testing, I had to disable the URL Filter File so I could see what I was doing. Also, it turns out that NodeList in Opera can only be iterated via the for-in loop; it must not be array-like, because I got "could not be converted to object" errors with the original code.

Pubblica risposta

Accedi per pubblicare una risposta.