My programs for Opera

Subscribe to RSS feed

Posts tagged with "adblock"

NoAds. (NoScript+AdBlock)/2

, ,

NoAds.js 1.1.3 final (58 Kb)
noads.oex - для Opera 11.
NoAds.js 1.0.3 для Opera 9.5-10.54

Скрипт представляет собой компиляцию adblock.js, block-external-scripts.js и abp_import.js и использует глобальное хранилище scriptStorage, появившееся в Opera 10.6, для сохранения настроек.

Возможности:
Блокирование скриптов с других доменов, которые в 99% случаев являются рекламой.
Блокирование элементов страницы, включая текстовую рекламу.
Импорт подписок AdBlock Plus EHH.
Блокирование встроенных в страницу скриптов.

Кнопка быстрого отключения/включения находится в правом нижнем углу страницы. Показывается при наведении.




Установка:
Скрипт устанавливается как обычно, но кроме этого нужно выставить настройку opera:config#PersistentStorage|UserJSStorageQuota >= 500

Кнопки:
Настройки NoAds
Блокировать рекламу
Блокировать элемент страницы
Разблокировать
Разблокировать последнее
Content block Helper

Горячие клавиши:
Настройки - Alt+Shift+P

Блокирование рекламы - Alt+Shift+A
Блокирование элемента страницы - Alt+Shift+B
Разблокирование - Alt+Shift+U
Разблокирование последнего элемента - Alt+Shift+L

(раз)Блокирование нескольких элементов - Shift+Click

Документация
Css-фильтры: http://adblockplus.org/ru/filters#elemhide

Блокирование скриптов:
@@== - Белый список блокировщика внешних скриптов. Обычные регулярки, с единственным отличием - точка после которой следует алфавитно-цифровой символ, считается не спецсимволом, а обычной точкой (с версии 1.1.3).
##$$ - Блокирование встроенных в страницу скриптов, в которых будет найдено совпадение. Используются аналогичные регулярки. Например «localhost##$$document.write» заблокирует на localhost-е все скрипты в которых упоминается «document.write»


Short description in English

UserJS: NoAds.js 1.1.3 final (58 Kb)
noads.oex - for Opera 11.

Functions:
Block external scripts, block elements of a page and import subscriptions from AdBlock Plus EHH.

Required options: opera:config#PersistentStorage|UserJSStorageQuota >= 500

"Quick button" (for enable/disable the blocking) is available in the right bottom corner of a page.

Buttons:
NoAds preferences
Block ads
Unblock
Content block Helper


Hotkeys:
Preferences - Alt+Shift+P

Block ads - Alt+Shift+A
Block element - Alt+Shift+B
Unblock - Alt+Shift+U
Unblock latest element - Alt+Shift+L

Block/unblock many elements - Shift+Click

Documentation
Css-filters: http://adblockplus.org/en/filters#elemhide

Scripts blocking:
@@== - White list for script blocking. Standard regexp, with one exception. A dot before any alphanumeric character, is not special character, but an ordinary dot.
##$$ - Inline-scripts blocking. Used the same regexp. Example: «localhost##$$document.write».

Changelog:
1.1
* Using scriptStorage instead of wsh.
* Many improvements.

1.1.1
* Improvements in noads.setRules
* Some compatibility with Opera 9.6

1.1.2
+ Content block Helper. You can easy block iframes and scripts with the internal Opera blocker.
* Selectors tested for validity, before import.
* More logical behavior when switching modes (block/unblock/preferences).

1.1.3
+ Blocking inline-scripts.

Todo
Improvements in noads.setRules
Block js-functions.
Block external images and flash.

For the extension
Disable/enable from menu
Helper mode for internal opera blocker (show scripts)

Known bugs of Opera 11
DSK-316102 (User JS not loaded when page loads too fast)
DSK-318727 (Extension blocks execution of userjs)


FAQ
Q: It doesn't work for me.
A: 1) Please, read the list of known bugs.
2) Set UserJSStorageQuota. It's really needed!
3) If it doesn't help, post the log from Error Console to the comments.

Q: Is this a replacement for the content blocker/urlfilter.ini?
A: Nope. This is an _addition_ to Opera's content blocker.

Q: How to update urlfilter.ini?
A: This is impossible with the current extension api. However, there is a good java application: http://my.opera.com/urlfilterdownloader/blog/

Q: Is it actually block ads or just hide it?
A: Opera doesn't load the hidden content (exclude iframes).

Q: There are many bugs in Opera 11 Alpha...
A: You can use userjs-version noads.js with the stable Opera 10.63.

AdBlock for Opera - analogue of «Adblock Plus: Element Hiding Helper»

adblock_setup.zip (130Kb)

UserJS-only version: adblock.js (recommended for Opera 10.5)
Use Alt+Shift+A for blocking ads, Alt+Shift+B for exact blocking and Alt+Shift+U for unblocking. Press Alt+Shift+E for editing styles.
From version 1.3.12, you can use Shift+Click to block many elements.

Buttons are available in the Readme.html. Video.

This tool used for easily blocking of page elements (and text ads). You simply select the element you want to be block. The element hiding rule is generated and added to localStorage/cookies.

Classic version
Copy and select the menu in Ctrl+F12-Advanced-Toolbars. Close Opera, start AdBlock_setup.exe, specify the folder of Opera.
Enable style AdBlock+ in menu View-Style. Install adblock.js as usually.
Now you can block an element from the context menu of page, or having used button AdBlock+.


P.S. Rip.js it's good thing, but the page at first is loaded and only contents then disappear. On my connect, it looks ugly.

Block images from menu Opera

,

Add in [Image Popup Menu] and [Image Link Popup Menu]
Platform Windows, Item, "Block image"="Copy image address,,,, "Content block image" & Go to Page, "javascript:(function(){var clip='%c';var d = document.selectNodes('//img[@src]');for(var i=0, di; di=d[i]; i++){if(di.src==clip)di.style.display='none !important'};})()" & Execute program, "D:\Opera\misc\Block.vbs" & Content block details, 1"


And in [Frame Menu]
Platform Windows, Item, "Block frame"="Copy frame address,,,, "Content block image" & Go to Page, "javascript:(function(){var clip='%c';var d = document.selectNodes('//iframe[@src]');for(var i=0, di; di=d[i]; i++){if(di.src==clip)di.style.display='none !important'};})()" & Execute program, "D:\Opera\misc\Block.vbs" & Content block details, 1"



Block.vbs
Dim WshShell
Set WshShell = WScript.CreateObject("WScript.Shell")

WScript.Sleep 100
WshShell.SendKeys "{TAB}"
WScript.Sleep 100
WshShell.SendKeys "{ENTER}"
WScript.Sleep 200
WshShell.SendKeys "+{INSERT}"
WScript.Sleep 100
WshShell.SendKeys "{ENTER}"


For Opera 9.5+
[Image Popup Menu]
[Image Link Popup Menu]
;Item, "Block image"="Copy image address,,,, "Content block image" & Show preferences, 14 & Focus Previous Widget & Focus Previous Widget & Focus Previous Widget & Focus Previous Widget & Click Button & Delay, 300 & Focus Next Widget & Focus Next Widget & Click Button & Delay, 100 & Paste & Delay, 100 & Click Default Button & Delay, 100 & Ok"
Item, "Block image"="Copy image address,,,, "Content block image" & Go to Page, "javascript:(function(w){if(w)try{var c=decodeURIComponent('%c');var e=w.document.selectNodes('//img[@src]');for(var i=0,ele;ele=e[i];i++){if(decodeURIComponent(ele.src)==c)ele.style.display='none !important'};for(var j=0,f;f=w.frames[j];j++){arguments.callee(f)}}catch(e){}})(window)" & Show preferences, 14 & Focus Previous Widget & Focus Previous Widget & Focus Previous Widget & Focus Previous Widget & Click Button & Delay, 300 & Focus Next Widget & Focus Next Widget & Click Button & Delay, 100 & Paste & Delay, 100 & Click Default Button & Delay, 100 & Cancel"

[Frame Menu]
;Item, "Block frame"="Copy frame address,,,, "Content block image" & Show preferences, 14 & Focus Previous Widget & Focus Previous Widget & Focus Previous Widget & Focus Previous Widget & Click Button & Delay, 300 & Focus Next Widget & Focus Next Widget & Click Button & Delay, 100 & Paste & Delay, 100 & Click Default Button & Delay, 100 & Ok"
Item, "Block frame"="Copy frame address,,,, "Content block image" & Go to Page, "javascript:(function(w){if(w)try{var c=decodeURIComponent('%c');var e=w.document.selectNodes('//iframe[@src]');for(var i=0,ele;ele=e[i];i++){if(decodeURIComponent(ele.src)==c)ele.style.display='none !important'};for(var j=0,f;f=w.frames[j];j++){arguments.callee(f)}}catch(e){}})(window)" & Show preferences, 14 & Focus Previous Widget & Focus Previous Widget & Focus Previous Widget & Focus Previous Widget & Click Button & Delay, 300 & Focus Next Widget & Focus Next Widget & Click Button & Delay, 100 & Paste & Delay, 100 & Click Default Button & Delay, 100 & Cancel"


Extended menu for Opera 9.5+ is here.

For Opera 10+
[Image Popup Menu]
[Image Link Popup Menu]
;Item, "Block image"="Copy image address,,,, "Content block image" & Show preferences, 13 & Focus Previous Widget & Focus Previous Widget & Focus Previous Widget & Focus Previous Widget & Click Button & Delay, 300 & Focus Next Widget & Focus Next Widget & Click Button & Delay, 100 & Paste & Delay, 100 & Click Default Button & Delay, 100 & Ok"
Item, "Block image"="Copy image address,,,, "Content block image" & Go to Page, "javascript:(function(w){if(w)try{var c=decodeURIComponent('%c');var e=w.document.selectNodes('//img[@src]');for(var i=0,ele;ele=e[i];i++){if(decodeURIComponent(ele.src)==c)ele.style.display='none !important'};for(var j=0,f;f=w.frames[j];j++){arguments.callee(f)}}catch(e){}})(window)" & Show preferences, 13 & Focus Previous Widget & Focus Previous Widget & Focus Previous Widget & Focus Previous Widget & Click Button & Delay, 300 & Focus Next Widget & Focus Next Widget & Click Button & Delay, 100 & Paste & Delay, 100 & Click Default Button & Delay, 100 & Cancel"

[Frame Menu]
;Item, "Block frame"="Copy frame address,,,, "Content block image" & Show preferences, 13 & Focus Previous Widget & Focus Previous Widget & Focus Previous Widget & Focus Previous Widget & Click Button & Delay, 300 & Focus Next Widget & Focus Next Widget & Click Button & Delay, 100 & Paste & Delay, 100 & Click Default Button & Delay, 100 & Ok"
Item, "Block frame"="Copy frame address,,,, "Content block image" & Go to Page, "javascript:(function(w){if(w)try{var c=decodeURIComponent('%c');var e=w.document.selectNodes('//iframe[@src]');for(var i=0,ele;ele=e[i];i++){if(decodeURIComponent(ele.src)==c)ele.style.display='none !important'};for(var j=0,f;f=w.frames[j];j++){arguments.callee(f)}}catch(e){}})(window)" & Show preferences, 13 & Focus Previous Widget & Focus Previous Widget & Focus Previous Widget & Focus Previous Widget & Click Button & Delay, 300 & Focus Next Widget & Focus Next Widget & Click Button & Delay, 100 & Paste & Delay, 100 & Click Default Button & Delay, 100 & Cancel"