Martin Kadlec blogging

UserJS - External scripts v1.1

I create extensions from this userJS, you can downlod it here:

https://addons.labs.opera.com/addons/extensions/details/external-scripts/1.0/?display=en

Comments
Please login to post comments.
Avatar
08.02.2013 15:02
OK, so I'll probably stay with the old version for the next time and wait for the update.
Avatar
08.02.2013 03:02

Originally posted by Big_Mike:

Is this already feature complete? Actually the white list in the old version was very handy.


It is not, I'm waiting for better URL API :)
Avatar
08.02.2013 00:02
Ah thank you :) Seems to work fine here, while the comment says "Opera 12.60+".
Is this already feature complete? Actually the white list in the old version was very handy.
Avatar
07.02.2013 23:02
Hi, I'm sorry to bug you, but I don't understand Opera's behavior. How is script blocking working?

I'm using Opera 12.14 without urlfilter.ini and no other "block" extensions but "External Scripts 1.21" (with the option to block external scripts enabled). I'm using Privoxy as a proxy server.

For example on the page www.winfuture.de:
External scripts tells me it blocks
http://adserver.freenet.de/js.ng/site=wf&affiliate=wf&adset=bsl&prod=wf_home&tbl=channel&ppos=9&wi=0&tie=free
http://adserver.freenet.de/js.ng/site=wf&affiliate=wf&ppos=14&wi=0&tie=free&band=256
http://pagead2.googlesyndication.com/pagead/show_ads.js
http://adserver.freenet.de/js.ng/site=wf&affiliate=wf&prod=wf_home&tbl=channel&ppos=16&wi=0&tie=free
http://adserver.freenet.de/js.ng/site=wf&affiliate=wf&adset=bsl&prod=wf_home&tbl=channel&ppos=11&wi=0&tie=free
http://adserver.freenet.de/js.ng/site=wf&affiliate=wf&adset=bsl&prod=wf_home&tbl=channel&ppos=1&wi=0&tie=free
http://adserver.freenet.de/praeludium/praeludium_winfut.js
http://j.wfcdn.de/j/jquery-1.6.2.min.js
http://j.wfcdn.de/j/clickheat,160510.js
http://j.wfcdn.de/j/winfuture,59.js

While Privoxy tells me, that Opera requests these scripts:
j.wfcdn.de/j/winfuture,59.js
j.wfcdn.de/j/clickheat,160510.js
j.wfcdn.de/j/jquery-1.6.2.min.js
http://adserver.freenet.de/praeludium/praeludium_winfut.js

If blocking is done by filtering the script files, why does Opera request some?
If blocking isn't done by this way - why doesn't Opera request all of the script files?
Avatar
07.02.2013 23:02
it is bug in Opera, sometimes the blocking script isn't fact enough so some scripts starts loading before the extension can block them. The only way to solve this problem is to use the new URL fitler API, I have an alpha version of it available on :

http://files.myopera.com/BS-Harou/files/external-scripts.oex

it works bit differently, but it still does the job
Avatar
13.09.2012 01:09

Originally posted by wpost:

Assuming this is doable, where would I find the configuration file on each box?


http://my.opera.com/wpost/blog/external-scripts?cid=96375322#comment96375322
Avatar
13.09.2012 00:09
Awesome extension! Many thanks for your great work.

I've been using it for a while on my Linux box home, and more recently put it on my Windows box at work. Rather than wasting time configuring each installation separately I'd like to use file synchronization to share their configuration file. That way if (for example) I add https://example.com/* to the whitelist at home, it automatically gets added to the whitelist at work.

Assuming this is doable, where would I find the configuration file on each box? Poking around on the Windows box I'm now on (the boss is out and I'm slacking off), External Scripts seems to use the directory %drive%UsersUSERAppDataLocalOperaOperawidgetswuid-6fd5eb00-3914-f94c-837c-80637c14044f, but even after examining the contents of that directory I'm still not sure what file(s) there should be synchronized. But once I figure out what to synchronize on one OS, the other should be easy.
Avatar
23.12.2010 23:12
so all these conflicts are because of opera.....
I think your one is the best because it's the only one that shows which scripts are blocked and which ones not (internal noads script blocking and content blocker helper don't do it)

even notscripts doesn't work with noads....but it's a bit different...more similar to the firefox extension.
Avatar
23.12.2010 19:12
Marco: I stoped developing this extension because of some bugs in Opera. Once they'll fix them I will create much beter version :)
Avatar
23.12.2010 18:12
sometimes this extension doesn't work and it would be nice if you could solve the conflict with Noads

external script is better for scripts but i need noads to hide elements.

thanks
Avatar
20.12.2010 10:12
the add-on doesn't work on www.sina.com.cn and www.ifeng.com
please fix it, thanx~

hmmm, that's strange... it works again but still refuses to show the dialog...

P.S. on www.taobao.com the dialog doesn't show as well
Avatar
17.12.2010 07:12
v1 in extension is better than version1.2.6 in userJS :)
Avatar
17.12.2010 04:12
hi,

your script is awesome. i notice there is version 1.2.6 of you external scripts, but in opera extension and in your blog title it says version 1.1, where can i get version 1.2.6, because your extension is great.
Avatar
10.11.2010 05:11
It seems to be an extension specific problem, because it works with the "normal" userJS+button combination, and they are basically the same.

Let's hope the options pages for extensions mentioned here comes soon, too :)
Avatar
09.11.2010 21:11
The error is not your fault. Opera itself seems to have timing problem with extensions that utilize script or local storage. The errors vary but all are concerning local or script storage. The object seems not to be initialized correctly sometimes...

I put in some

try { window.localStorage.getItem("userjs_extscripts_ad"); } catch(err) { alert(window.localStorage); alert(window.localStorage.getItem); }

and similar for the other items, but got no meaningful results which convinced me, that it is Operas fault indeed...
Reported as DSK-318457 and hoping they get it under control.
Avatar
09.11.2010 21:11
I found a way how to get rid off scriptStorage, but there are other bugs with this solution so I still have to wait for some fixes :P
Avatar
08.11.2010 07:11
Got a strange error in the console:

JavaScript
Unknown thread
Uncaught exception: TypeError: 'scriptStorage.getItem' is not a function
Error thrown at line 25, column 4 in <anonymous function>(scriptStorage):
var
called from line 24, column 2 in program code:
window.opera.userjs.extscripts.show = (function(scriptStorage){



BTW: Did you ever try to use an (any) extension in a private tab? AFAICS they don't work there ...
Avatar
03.11.2010 11:11
Ok :)
Avatar
03.11.2010 10:11
Can you include the version number in the help(?) next time?
It is easier to check if it is visible in plain sight :)
Avatar
23.10.2010 09:10
My plan is to move dialog and a big part of the script to the extension. That should help with the collisipns. But firstly Imust find 100% working way to send a message only to focused tab.
Avatar
22.10.2010 22:10
:bug:
Unknown thread
Uncaught exception: TypeError: 'window.localStorage.getItem' is not a function
Error thrown at line 25, column 4 in <anonymous function>(scriptStorage):
var
called from line 24, column 2 in program code:
window.opera.userjs.extscripts.show = (function(scriptStorage){

but only at the page
http://www.greywyvern.com/code/javascript/keyboard

and only when no global block is set and if I reload the page. As soon as I activate "other domain" it works without throwing an error...
Avatar
22.10.2010 22:10

Originally posted by Lex1:

I hope it's just a bug Opera.


There indeed seems to be a bug in Opera. I can't nail it down but when I install the WOT script too, script execution becomes unpredictable. Scripts that utilize script storage and|or local storage don't seem to work good together...
Avatar
22.10.2010 11:10

when I have your extension installed then my extension stops working when I try to access script storage


I hope it's just a bug Opera.

Whitelisting

static.myopera.com/*
files.myopera.com/*
api.mywot.com/*
ajax.googleapis.com/ajax/*
...
etc.


Btw. Whitelist for scripts from noads:
^http://ajax.googleapis.com/|^http://www.google.com/jsapi|^http://maps.google.com/|^http://www.google.com/recaptcha/|^http://[0-9a-z-]+.gstatic.com/|^http://[0-9a-z-]+.appspot.com/|^http://yui.yahooapis.com/|^http://script.aculo.us/|^http://ipinfodb.com/|^http://api.recaptcha.net/|^http://rutube.ru/|^http://css.yandex.net/|^http://api-maps.yandex.ru/|^http://sd+.addthis.com/js/|^http://sd+.ucoz.net/src/u.js|^http://[0-9a-z-]+.imgsmail.ru/|^http://62.105.135.100/|^https?://auth.tbn.ru|^https://easylist-downloads.adblockplus.org/[a-z_+-]+.txt$|^https://secure.fanboy.co.nz/fanboy-adblock.txt$|swfobject.js$|show_afs_search.js$|chart.js$|ajax.js$|widgets.js$|common.js$|AC_RunActiveContent.js$|jquery[0-9a-z.-]*.js$
Avatar
22.10.2010 09:10
Hm.... Are script/extension DBs possible or does Opera not support that?
A database would be just fine to store huge amounts of data and could improve the speed, even if speed is no issue with your script.
Avatar
22.10.2010 08:10
The extension adds
userjs_extscripts_ad ["off","on"]
or any other "on","off" combination to the local storage of every webpage. If I clean the web storage out of various reason, this information will be lost. Block external and same domain seem to be global settings, so is it possible to move this information to the script storage?
Avatar
22.10.2010 08:10
Unfortunately not :( I have to test local vs script storage if there is a difference
Avatar
22.10.2010 07:10
Possible problem in the future:

A pre-configured white list for "safe" scripts could come handy for all users who hare not firm enough (there will be many because the add-ons page will be used heavily, that is another dimension than it was with the pure UserJS somewhere in some "hidden" blog ;)) to unblock the necessary files of some vital external scripts, especially if an external script calls further scripts like for example one of the big libraries like YUI can do.

Example:
The user visits a page. He sees, that the YUI is blocked, puts it on the whitelist and the page is still b0rked because he doesn't recognize, that the library calls a second script after it is unblocked. The called script will still be blocked - as long as the user doesn't open your extension a second time to see what else is needed to run the page properly.

Could help to avoid problems with future extensions like the WOT extension too (WOT will release one, at least they said so on their page) - they'll for sure call their API from within the extension.

Whitelisting

static.myopera.com/*
files.myopera.com/*
api.mywot.com/*
ajax.googleapis.com/ajax/*
...
etc.

in the source of the script could avoid that, may be with a setting:
[X] Use preconfigured white list

A hint about that in the help or a dedicated "how to" for a difficult page example (with screen shots) on a web page or a nice start up screen at first start would be fine, too:

"Block external", look what doesn't work on the website.
Open the extension again, look what new scripts are used and unblock the necessary scripts (some examples of scripts that belong to advertising and some that belong to JS libraries).
Reload the page and test if it works.
If not, open the extension again an check what new scripts have been called.
Allow the new scripts and repeat these steps until the page works as intended.
Avatar
22.10.2010 07:10
good idea, I put it on my to do list :)
Avatar
22.10.2010 07:10
Gee! You are fast with answering! Do you ever sleep? :lol:
I was still editing the comment because I forgot some things.
Avatar
22.10.2010 07:10
Also need a "White list" for sites...

- "Do not use extension on this site"
- "Do not block scripts from same domain on this site"
- "Do not block scripts from other domain on this site"


Avatar
21.10.2010 21:10

broadcastMessage(<DOMString> data, <array> ports)
This method is used to broadcast a data to all connected UserJS and popup environments associated with the extension.


My quick and dirty workaround:
*.js
	extension.onmessage = function(e){
if(window.top == window.self && e.data && window.decodeURI(e.data.slice(0, e.data.indexOf('|'))) == window.location.href.replace(window.location.hash, ''))switch(e.data.slice(e.data.indexOf('|';) + 1)){
case prefix + '_block_ads': run.blockEle(true); break;

}
};

index.html
opera.extension.broadcastMessage(window.encodeURI(opera.extension.tabs.getFocused().url)+ '|' +  e.data, 80)


Deleting the hash are need, because «opera.extension.tabs.getFocused().url» returned url without a hash.
Avatar
21.10.2010 21:10
Lex1: thank you very much for your help. Now I have to only find out why when I have your extension installed then my extension stops working when I try to access script storage
Avatar
21.10.2010 20:10

Originally posted by Lakitu7:

Lastly, how am I supposed to invoke the function to add a whitelist rule from the main tab?


Click (don't release the left mouse button), wait at least one second, and then release it :)
Avatar
21.10.2010 19:10

Originally posted by Lakitu7:

Is the button I would get from the extension exactly the same as the one from here or is there some danger to mixing this element from the userjs version with the extension version?



Both should work, but there were some "animation" troubles in last few snapshots of O10.70 with the old button.
Avatar
21.10.2010 19:10
Rightclicking the addressbar and hitting "reset toolbar to its defaults" made it show up. I got the idea from someone in the desktopteam announcement comments. So, now I'm all set.

Thanks for the help and the extension!
Avatar
21.10.2010 19:10

Originally posted by Lakitu7:

Thanks for the help and the extension!



You are weolcome. btw I "fixed" a bit the dialog issue, now the message only appears when you click on the button and don't have set the storage quota :). This fix will be in next version.
Avatar
21.10.2010 19:10
Another much more trivial bug report: whitelisted items may show as blocked in the script list

On facebook, I tested with all "other domain" blocked, and nothing works, since everything comes from fbcdn.net. I added a whitelist rule "fbcdn.net" and the site then worked: everything was whitelisted and the scripts ran, but the list of scripts in the extension still showed them all as blocked (red). Changing the whitelist rule to "http://*.fbcdn.net/*" makes them show up properly as whitelisted (blue)
Avatar
21.10.2010 19:10
it's not bug, there has to be the "*" character(s) :)
Avatar
21.10.2010 19:10
Yeah I realize that I should have used the wildcards, but not doing so produces a discrepancy between what actually happened (the scripts ran) and the status list (which said that the scripts did not run). That seems dangerous?

Lastly, how am I supposed to invoke the function to add a whitelist rule from the main tab? It seems to invoke if I click 3 times quickly. Is that right? It usually triggers various other opera menus / text highlighting to do so.
Avatar
21.10.2010 18:10

Originally posted by Lakitu7:

When I install the extension, the button doesn't show up anywhere. I have to manually add the button from this page. What toolbar is it supposed to show up on? I assumed it's added in something I have disabled but when I show all toolbars I can't find it.



Button should appear in addressbar. Do you use clean installation?

Originally posted by Lakitu7:

Also, upon first install I was spammed with dialog boxes upon every page load about needing to enable userjs storage quotas in opera:config. If there's a way, perhaps the extension should check for this or modify it.


Unfortunately, extension can't change any value in opera:config. The annoying dialog is there to force user to do one of those two thinks: 1) change the quote 2) uninstall extension. But I will probably change it to something less annoying :)
Avatar
21.10.2010 18:10

Originally posted by BS-Harou:

Button should appear in addressbar. Do you use clean installation?


No, I wanted to test an upgrade installation. I was surprised when the installer wanted to upgrade by default so I decided try it. I guess that's probably the cause but I don't know if there's anything you can do about it from your end or if it's part of the way Opera handles upgrade installs. Is the button I would get from the extension exactly the same as the one from here or is there some danger to mixing this element from the userjs version with the extension version?

Originally posted by BS-Harou:

Unfortunately, extension can't change any value in opera:config. The annoying dialog is there to force user to do one of those two thinks: 1) change the quote 2) uninstall extension. But I will probably change it to something less annoying


Oh okay, it's your popup. I thought it was something from the browser core, triggered by the extension. Maybe I just missed it in my excitement but if it doesn't already say something about the external scripts extension, it might make sense to do so.
Avatar
21.10.2010 18:10
Extension bug reports:

When I install the extension, the button doesn't show up anywhere. I have to manually add the button from this page. What toolbar is it supposed to show up on? I assumed it's added in something I have disabled but when I show all toolbars I can't find it.

Also, upon first install I was spammed with dialog boxes upon every page load about needing to enable userjs storage quotas in opera:config. If there's a way, perhaps the extension should check for this or modify it.
Avatar
21.10.2010 16:10

Originally posted by InDigazzZ:

Extension, running on the one page - opens on all others. When switching to another tabs have to close the extension's window.



Interesting, I still have a lot of things to learn from the extensions API. Anyway, I will try to fix it in next version.
Avatar
21.10.2010 15:10
Extension, running on the one page - opens on all others. When switching to another tabs have to close the extension's window.
Avatar
21.10.2010 15:10
Heh, you right:

broadcastMessage(<DOMString> data, <array> ports)
This method is used to broadcast a data to all connected UserJS and popup environments associated with the extension.

Avatar
21.10.2010 12:10
You can update your bug report about ease in/out for Opera 11 Alpha :awww:

BTW: The extension doesn't want to work at all even with a surgical clean Opera install.
It blocks the CSS hover effect on all links on my own page, it even blocks clicks on links - and I have exactly 0 (zero) JS on that page.
It even blocks loading of several pages completely :yikes:
I hope it is Opera's fault, not mine or yours
(I assume it is so, it has written Alpha all over the place :lol:)


The UserJS/button combination still works fine.

Edit: Scratch everything above apart from the Alpha thing!
I had to uninstall the UJS and the button, then it miraculously worked - and used the settings of extscripts.js despite the fact, that it was an "external device" install :confused:

Edit2: Did a second clean install (and many more for various reasons :D). The extension works fine, started from zero and the first thing I saw was the script storage warning - everything as it is supposed to be now :D

Wish, if possible with the extensions API: Option to set the script storage at first start of the extension if it is not already set.


Tested with XP SP3 - will test with W7 64Bit later.
Avatar
20.10.2010 16:10
Different specs, W3C vs. ECMA and this is a display thing, so IMHO the W3C CSS is the correct recipient :D
Avatar
20.10.2010 16:10
actually, this is not part of ECMA spec. DOM specification is doing w3c too. anyway, I don't care much how it will works, main thing is that it will be there)
Avatar
20.10.2010 15:10

Originally posted by QuHno:

theElement.inheritance = value;
or
theElement.setAttribute('inheritance',value);

If it is an attribute, you can script it



I know but I think that simple function has much more chances in spec than new css property.
Avatar
20.10.2010 12:10
theElement.inheritance = value;
or
theElement.setAttribute('inheritance',value);

If it is an attribute, you can script it :D
Avatar
20.10.2010 11:10

Originally posted by BS-Harou:

I would really appreciate if w3c add something to remove inheritance for some element.


May be no one from the w3c noticed the necessity until now :lol:

Serious again:

Make a proposal to the editors at whatwg and w3c. It is not too late, HTML5 and CSS3 are still working drafts.

It could be an additional attribute:

element {inheritance: [all(default)|none];}

all: Behavior as it is now.
none: The element must not inherit any attributes or values from its parents.

The value of the attribute inheritance can not be inherited by any child of the element.
If inherit is set as value to a specific attribute, it must overrule the attribute inheritance for that specific attribute of the element.

Example:

div#id {
inheritance:none;
color:inherit;
}

should inherit nothing but the color from its ancestors.


Feel free to use and expand that but don't hold your breath until implementation in the browsers
;)
Avatar
20.10.2010 11:10
Good idea, but my vision is something in js like Element.style.clear()
Avatar
20.10.2010 09:10

Originally posted by QuHno:

Adding an explicit
height: 80% !important;
in line 178 and 217 helped here...


I would really appreciate if w3c add something to remove inheritance for some element.

Originally posted by Lex1:

Good script, fine design <img src=" class="smilie" width="27" height="17" /> I hope, you will continue to develop it


Thanks, there must be some competition, right? :)
Avatar
20.10.2010 08:10
Adding an explicit
height: 80% !important;
in line 178 and 217 helped here...
Avatar
20.10.2010 06:10
1. Go to UNITE - Главная страница;
2. Call the ExtScripts;
3. Open W or .
Avatar
20.10.2010 01:10
Good script, fine design :up: I hope, you will continue to develop it ;)
Avatar
19.10.2010 16:10
Ok, there are the facts. Lex1 just released an update for his AdBlock+. Huge update! With possibility to block scripts. And it looks really awesome if you ask me. You can download it from here:
http://my.opera.com/Lex1/blog/noads-noscript-adblock-2

So what it means to me and my user script?
1. I will remove the possibility to block/edit elements etc.. (or should I keep it?)
2. My script has still some advantages against Lex1's one so I will keep developing it.

I'm really interested what you think about whole things and what should I do now.
Avatar
19.10.2010 16:10
In my eyes the main advantage of your script is: It is small, JS blocking is the thing I need and it does it just fine :)

I don't block ads on web pages because several pages exist only because the ads give them the revenue to sustain the server, so to me add blocking and reading the content is like stealing. But I hate it if some rouge add scripts hijack my screen real estate (by layer ads with misleading close buttons especially) or try spying out where and when I surf, so some kinds of scripts are blocked by me - and that is, where your script comes in:

It is lean and meant to those scripts and works just like it is intended to do.

Second plus: I don't like "one size fits all", when I install my software. I prefer the freedom of choice and I prefer your script :)

So, even if you should plan to not develop it further on, please don't remove it, several people here like it because it is easy to use!
Avatar
18.10.2010 13:10
Wish...

Double-click on rule (in AdBlock list) works as ALT+SHIFT+U for selected rule.

Very convenient to unlock one item at a time.
Avatar
18.10.2010 12:10

Originally posted by QuHno:

Are the specs out yet?


nope :zip:
Avatar
18.10.2010 12:10

Originally posted by InDigazzZ:

2. Call the ExtScripts;



both will be fixed in next version :)
Avatar
18.10.2010 11:10
1. Go to Sexy CSS3 Buttons
2. Call the ExtScripts.
Avatar
18.10.2010 11:10
1. Go to Make CSS3 buttons that are extremely fancy - The Official Posterous Tech Blog
2. Call the ExtScripts;
3. Click ☺ and block element;
4. Look at AdBlock list - font in too large

Avatar
18.10.2010 11:10

Originally posted by BS-Harou:

BTW I'm working on creating Opera Extension from this script.


Are the specs out yet? :eyes:
Where are they?
Avatar
17.10.2010 20:10
I don't have much time this week, but I still did at least a little update - V1.2.9

News:
- Script to WL: click on switch next to some script and wait 1s, then release left mouse button.
- If you have installed AdBlock+ from Lex you will have new section, where you can manage the block rules.
- Exit/Hide button is now at bottom

I'm waiting for bugreports

BTW I'm working on creating Opera Extension from this script. :D
Avatar
16.10.2010 07:10
I can see reasons for a blacklist (Google analytics anywhere? :lol:), but personally I don't need it. Normally I just block all scripts (same and other) and just unblock so much that the specific site works.

Black-listing is a different philosophy than white-listing.
Think about a house and a bouncer:

If you use a white-list, the door is closed for all, the bouncer is in front of the door and selects who is allowed to go in.

If you use a black-list, the door is wide open to all, the people are in and then the bouncer has to select, who shouldn't be there.

A black-list could come handy as an additional feature to overrule all other entries. Referring to the white-list door example the bouncer has a list of people her won't let in under any circumstances, no matter if anything else is allowed or not.
Avatar
16.10.2010 05:10
Ok, i mean, with your 'extension' to implement this would be more convenient. )
Avatar
15.10.2010 20:10
Why not? You can use * in built-in blocker too
Avatar
15.10.2010 14:10
Blacklist still need ...

How to block all scripts from specific site? Built-in blocker can not do this.
Avatar
11.10.2010 18:10
Now to the funny thing (NOT):
In the test case set

-o-transition:all 0.2s 1s;

and then use the JS command in the address bar or click or do whatever you want ... :eyes:
Avatar
11.10.2010 18:10
interesting ... I hope developers will find where is the problem =)
Avatar
11.10.2010 17:10
Until I install the new snapshot: Yes, may be :D

edit:
Just installed it.
No, you aren't the only one. Ease in and ease out are b0rked - not only with the script it seems ...
Avatar
11.10.2010 17:10

Originally posted by QuHno:

No, you aren't the only one. Ease in and ease out are b0rked - not only with the script it seems ...



thank you for quick answer, I will try to find where is the problem
Avatar
11.10.2010 17:10
The animation is lost and after the time it would take if everything were animated it jumps to the end position.

Most of the other transforms and transitions seem to work with ease-in and -out. Example page:
http://return-true.com/2010/06/using-css-transforms-and-transitions/

But the changelog spoke of some performance changes, it could be they broke again something by speeding things up ...

I'd say: If you can melt it down to a test case, fire a bug report.

edit: If I hit the X for close, ease-out works every time, only if i hit the button it skips...
Avatar
11.10.2010 16:10
Am I the only one who has problem in newest snapshot (9067) that the show/hide animations works only first time?
Avatar
10.10.2010 12:10
version 1.2.8
- White-list Import/Export
- Hide/Show white-list items (I don't save it to storage, so you always have to switch it when scripts list is displayed - but in next version I will add global option to auto hide WL items)
Avatar
09.10.2010 22:10
No regressions so far and the new settings seem to work fine :cheers:
Avatar
09.10.2010 21:10
Guess what =) .. I've got finally few free hours so I've made version 1.2.7.

What's new:
- global "ignore query string" option (I will perhaps add local option in the future)
- Disable/Enable all on current page

There is also "blue" option next to "disable/enable", but it's not working now. In future it should hide/show white list items =)

I didn't again test it much so if you find some bug let me know.
Avatar
09.10.2010 12:10
QuHno: I definitely have to do something with the dots, this is just another reason why to do that. But as you said, it is slow priority now. There are more important things to do.
Avatar
08.10.2010 20:10
Have you ever switched Opera to user mode or just killed the colors of a webpage and then opened the settings overlay? :D

May be images instead of the pure CSS "dots" or - IMHO better - plain letters or u2295 - u2298 ⊕ ⊗ ⊖ ⊘ would be a good idea for a future version. If you set the letters to the same color as the background, the look would remain the same as long as the user doesn't switch to user mode ...

... but low priority, most of the Opera users I know never switch to user mode, even if the visited page burns their eyes out :lol:

Avatar
07.10.2010 23:10
I was thinking about bigger regex support, but it's not in top of my to do list
Avatar
07.10.2010 22:10
minimal problem:

Imagine such an address:
http ://www.opera.com.evilsite.com/blahblah
In the whitelist this would be a match:
http ://www.opera.com*

or:
http ://evilsite.com/opera
would be matched by:
http ://*opera*

With some I18n addresses there might be some frauds possible.

May be a not so greedy wildcard for single letters as second option could help against that - and it could help to match addresses with www. and without www. or some other changing subdomain...
Avatar
07.10.2010 17:10
nope, the goal is to make the switch not visible by default but make it easy and fast to use =) just wait)
Avatar
07.10.2010 07:10

Originally posted by BS-Harou:

that would look terrible


totally agree... ))

Originally posted by BS-Harou:

but I think I found a solution


smth like

Other domain:
Same domain:
White list:

or

Other domain:
Other domain (White list):

Same domain:
Same domain (White list):
?
Avatar
06.10.2010 16:10

Originally posted by InDigazzZ:

If you can not (do not want) to add the switch "show added in a white sheet," that can highlight the background? Included - black, disabled - pink added to the whitelist - blue.



that would look terrible :D ... but I think I found a solution =) anyway, I don't have much time during workdays so you have to wait for weekend for new update)
Avatar
06.10.2010 14:10

Whitelist a serious obstacle.

If you can not (do not want) to add the switch "show added in a white sheet," that can highlight the background? Included - black, disabled - pink added to the whitelist - blue.
Avatar
05.10.2010 23:10
Hm... my whitelist becomes impressively big somehow - is there a possibility to read out the local storage for an export and to re import it after an Opera clean install?

edit: Found the path to the file when I opened opera:webstorage

Can I overwrite the file in %appdata%OperaOperapstoragexxxxxxxxx (x are numbers) from the old location to the new one? The content looks somehow encrypted...
Avatar
05.10.2010 23:10

Originally posted by QuHno:

Hm... my whitelist becomes impressively big somehow - is there a possibility to read out the local storage for an export and to re import it after an Opera clean install?



good idea, I must implement this =)

If you need it now you can edit the js file. Add this line to get the white-list data:
alert(opera.scriptStorage.getItem("userjs_extscripts_whitelist"));

And then in the new Opera add this line:
opera.scriptStorage.setItem("userjs_extscripts_whitelist", "DATA_FROM_OLD_OPERA");
Avatar
05.10.2010 23:10
Wow! That was faster than my edit above :)

No, I don't need it now but it is alays better to be prepared ;)

Tested it, and put it directly after
}(opera.scriptStorage));
Works like a charm! Thank you! :)
Avatar
05.10.2010 05:10

Originally posted by BS-Harou:

why?


o scripts that are added to the white list does not distract from those that can / should disable it.
Avatar
04.10.2010 14:10

Originally posted by InDigazzZ:

Need a setting that will enable / disable displaing scripts added to the whitelist.


why?
Avatar
04.10.2010 13:10


Need a setting that will enable / disable displaing scripts added to the whitelist.
You can certainly put this switch in the "Preferences". But it would be better if they are on the front.
Avatar
04.10.2010 09:10
Turn all on/off and "ignore query string" option will be in next version

Black list is already implemented in opera (content blocker)

I'll be thinking about the icons instead of colored dots =)
Avatar
04.10.2010 07:10

Originally posted by BS-Harou:

Version 1.2.6 with white list uploaded =). I've also (at least I hope) fix all here mentioned bugs including the flash problem.



Settings for Twitter are still not remembered.
Avatar
04.10.2010 07:10
Additional thoughts about usability:
A partially color blind friend of mine tested the script and had some difficulties in differentiating between the colored dots. I changed the script to use some of the skin images instead of the colors.


I used -o-skin('Menu Info') for default, -o-skin('Blocked') for blocked items and -o-skin('Transfer Success') for white-listed scripts instead of the pure color dots.
Disadvantage: You'd have to modify the script a little bit more because the method you use doesn't allow switching the background image. Switching the CLASS of the div could be a better approach for that.

I am still a little bit unhappy with the small clicking area for blocking and unblocking. The mouse cursor is always a URL pointer and normally I don't expect, that a menu like list like this is divided into two clicking areas with different actions. May be a more table like approach with 3 real radio buttons in front of the URLs and 3 symbols above as column header would be more distinctive.

You could recycle some of the other skin images too for the UI:
('Menu Tools';) for the settings etc., that would help avoiding questions and could be better for internationalization. It is quite a pity that there is no whitelist icon in the skin ...

Settings for Twitter are still not remembered.

Did you use the * for the changing parts of the script URLs?
Avatar
04.10.2010 06:10
or may be something like this

On > Off > White list > Black list

and this
Avatar
04.10.2010 05:10
Hi, will you do that?



about WL

Originally posted by QuHno:

How about displaying the scripts of the page for selection, if you click on "add" in the white list panel?


Better to do so - the button is clicked not only on/off, but
On > Off > White list

And of course leave the method of adding the BS, which is implemented now.
Avatar
03.10.2010 13:10

Originally posted by QuHno:

How about displaying the scripts of the page for selection, if you click on "add" in the white list panel?



I like this idea, but I want to keep the possibility to add any script with "add" button, but I might add fourth button that would do that =) It won't be probably in next version but might be in the second ;)
Avatar
03.10.2010 12:10
That's a tricky decision :lol:

Dragging is not so much fun with a touchscreen (big fingers, small aim to drag to) ...

I would prefer selecting the relevant part and pressing "W". If not everything is selected the * is added at the end and a "partial selected URL" warning saying that this will allow all scripts that start with xxxxxx (may be this domain and this folder) will be allowed - but I fear that would be a little bit geeky and not very intuitive...

How about displaying the scripts of the page for selection, if you click on "add" in the white list panel?
Avatar
03.10.2010 11:10

Originally posted by QuHno:

But it would be better if a native English speaker would write the text, I can read much better than I can write and I know that the text above is not good enough


Your English is still much better than mine, so if you don't mind I will use it - or at least some parts. =)

Originally posted by QuHno:

It would be fine if an URL could be copied from the start "screen" to the white-list prompt.


How would you do that? Double clicking on the script url? Drag & drop (dragging the url on the "W")? any other idea? =)
Avatar
03.10.2010 02:10
This:
"In the white-list (W) you can use "*" as a wildcard that matches every set of characters." :D
May be with an example or two.

OK, this too:
"Clicking on the colored dots before the URLs blocks or unblocks scripts. Green stands for unblocked, red for blocked and blue for a white-listed entry that is allowed to work even when you set block all external or same domain scripts in the settings panel (S).

You can block a script by clicking at the green dot and unblocking it by clicking on the red dot. Clicking on the URL of the script will open it as readable text in the browser for further inspection.

You can return to the scripts listing by clicking on "<""

The alert if no quota is set is there, so that part isn't necessary in the help.

But it would be better if a native English speaker would write the text, I can read much better than I can write and I know that the text above is not good enough ;)


Then my last wish and I'll be fully comfortable with this script:
It would be fine if an URL could be copied from the start "screen" to the white-list prompt. That could help avoiding typing errors - at least mine :D

PS: That was fast work, no complaints but compliments! Good work! :cheers:
Avatar
02.10.2010 21:10
Version 1.2.6 with white list uploaded =). I've also (at least I hope) fix all here mentioned bugs including the flash problem.

White list is working similar to implicit Opera content blocker. That means that you can use "*" like a "any character(s)". Data of white list are saved in script storage, so if you are going to use it I suggest you to increase the quota =)

btw do you have any ideas what all should be in help section? =)
Avatar
01.10.2010 19:10
What do you mean? I do not
mean that the settings are not
remembered, but that can not
disable scripts (same domain). There's no
reaction to clicks ...
Avatar
01.10.2010 19:10

Originally posted by InDigazzZ:

There's no
reaction to clicks ...


Sorry, my mistake, you are right =)
Avatar
01.10.2010 16:10

Originally posted by InDigazzZ:

Settings for Twitter are not remembered.



yes, thats because of different number after the "?". This will fix the white list, but I'm also thinking about some possibility to enable/disable script with any query string - but I haven't find any good solution for this yet.

btw I found a way how to fix the flash problem. I will just set visiblity: hidden to all object elements while userJS window is opened =) but you have to wait a bit longer for new version because I started working on the white list and it will take some time.
Avatar
01.10.2010 16:10
1. Go to Блоги в Казахстане на YVISION.kz
2. Call the ExtScripts.
3. Try to turn on/of some scripts.
Avatar
01.10.2010 16:10

Originally posted by InDigazzZ:

1. Go to Блоги в Казахстане на YVISION.kz
2. Call the ExtScripts.
3. Try to turn on/of some scripts.


that is the same problem as I was describing above...
Avatar
01.10.2010 07:10

Originally posted by QuHno:

think the youtube problem is caused by Opera itself because of the way it handles the flash content, that could be out of control for a userJS.


+1
Avatar
01.10.2010 06:10
I think the youtube problem is caused by Opera itself because of the way it handles the flash content, that could be out of control for a userJS.

A different approach for the script could be injecting the the code at the top of the page and pushing the whole page down (like i.e. the search toolbar) but that wouldn't look as nice like now...
Avatar
01.10.2010 05:10
Avatar
01.10.2010 05:10
Settings for Twitter are not remembered. After opening and closing Twitter's page i have to re-include external (same) scripts.

User JS Storage Quota = 1024000
Avatar
30.09.2010 16:09

Originally posted by QuHno:

They use:
z-index: 16777260;



omg, they are crazy :D ... anyway, thanks for the help I will fix it soon)
Avatar
30.09.2010 15:09
They use:
z-index: 16777260; :eyes:
where 10 would have been enough. That's a bit more than the
z-index:100000;
in the script.
Just replacing it by 16777261 solves the problem :)

Good that CSS doesn't support exponents, I think Reuters would use it :lol:
Avatar
30.09.2010 12:09
1. Go to Mobile Web usage jumped in August: Opera | Reuters
2. Call the ExtScripts.
Avatar
29.09.2010 20:09
Works :cheers:
Avatar
29.09.2010 17:09

Originally posted by QuHno:

PS: Didn't know that opera.userjs is an object, too. That would have made several of my testscripts easier. Where is the full documentation of the opera object? I somehow can't find it, may be because of wrong search terms...



opera.userjs is not native object, my script creates it:
opera.userjs = opera.userjs || {};
opera.userjs.extscripts = {};

I test it for existence only because I use it in some other user scripts.
Avatar
29.09.2010 17:09
New version uploaded (1.2.5) with "Классный конкурс на свадьбе +3" fix and optimized memory usage.
Avatar
29.09.2010 12:09

Originally posted by InDigazzZ:

1. Go to Классный конкурс на свадьбе +3



interesting) I will try to fix it =)
Avatar
29.09.2010 11:09

Ability to enable/disable all


I want to do that in next version :)

I still can't start the script because it changes the ID with every click.


This will hopefully fix the white list.
Avatar
29.09.2010 11:09
1. Go to Классный конкурс на свадьбе +3
2. Call the ExtScripts;
3. Hover mouse over the name of the script.
Avatar
29.09.2010 09:09
Hm... another problem: If I set it to block all external scripts, I can't use some buttons that trigger external scripts. When I unblock the specific script and reload the page to load the external JS for the button, the setting from before the reload is ignored and I still can't start the script because it changes the ID with every click.

Example button:
Readability

(In this case no real problem because I have a full local version of that script and button too :D)

PS: Didn't know that opera.userjs is an object, too. That would have made several of my testscripts easier. Where is the full documentation of the opera object? I somehow can't find it, may be because of wrong search terms...
Avatar
29.09.2010 08:09


Ability to enable/disable all (same/other) scripts at once. Useful when some scripts is disabled (by auto), but to correctly view/work site you must include them and not to click each one separately...
Avatar
28.09.2010 05:09
Avatar
27.09.2010 23:09
Forgot to set the storage quota in opera:config#User JS Storage Quota - I looked in opera:webstorage :doh:

I have set the value to 50 now and it seems to work fine.
What's the best value to set?

BTW: "Other Domain" and "same domain" works fine but it is a bit of overkill here because of static.opera.com :D


Avatar
27.09.2010 23:09

Originally posted by QuHno:

I have set the value to 50 now and it seems to work fine.



I use "200000", but thats because my Image gallery userJS needs much more quota. This userJS needs only few bytes =)

Originally posted by QuHno:

BTW: "Other Domain" and "same domain" works fine but it is a bit of overkill here because of static.opera.com


I know, but I can't do much about this :P

you can disable all scripts from other domain and enable only the ones you want
Avatar
27.09.2010 23:09
I am patiently waiting for the white list option, but one step at a time, it is OK as it is and works fine :up:


Are the values in the config setting Bytes or KBytes (the later I hope)?
Is it the total amount or per domain?

You could add a hint to the alert in the next version, saying where to set it. That would help people like me finding it faster ;)
Avatar
27.09.2010 23:09

Originally posted by QuHno:

Bytes or KByte


not sure :P

Originally posted by QuHno:

Is it the total amount or per domain?


total (because the script storage is same for all domains)

Originally posted by QuHno:

You could add a hint to the alert in the next version, saying where to set it.


Will do it :yes:
Avatar
27.09.2010 23:09

Originally posted by QuHno:

Are the values in the config setting Bytes or KBytes (the later I hope)?


I found it, its in "KiB" :sherlock:
Avatar
27.09.2010 22:09
Of cause "Nobody" uses your scripts :P

Hm... to some strange reason it doesn't want to open the panel a second time here at my.opera...

Works fine so far on other pages.
Avatar
27.09.2010 22:09

Originally posted by QuHno:

Works fine so far on other pages.



I've realized that disabling single scripts is not working .. I'm trying to fix it =)
Avatar
27.09.2010 22:09
New version uploaded, should be working now :sherlock:

(should be version 1.2.3 - if there is lower then press F5)
Avatar
27.09.2010 22:09
That would have been the next comment - you beat me by 10s ... :D

edit: Hm... now it won't work at all...
Avatar
27.09.2010 22:09

Originally posted by QuHno:

That would have been the next comment - you beat me by 10s ...



:D ... is there still the problem on my.opera.com? is it throwing any error to error console?
Avatar
27.09.2010 22:09
You mean that one?:
Uncaught exception: TypeError: 'opera.userjs.extscripts.show' is not a function

Not only on my.opera now :( I have 1.2.3, I looked into the source.

Opera Version 10.70 9053 (latest of today)

Avatar
27.09.2010 22:09

Originally posted by QuHno:

Not only on my.opera now :( I have 1.2.3, I looked into the source.



Did you set the userjs storage quota? can you please send me everything from error console, there might be something useful...
Avatar
27.09.2010 22:09
You've got a PM (I hope) :)
Avatar
27.09.2010 22:09
Uploaded new version (1.2.4) that shows alert dialog when the storage quota is not set
Avatar
27.09.2010 21:09
It's here! I've uploaded new version but I don't have energy to test it, if it's really working so - please - if you will find any bug(s) let me know!

You have to set higher number for "User JS Storage Quota" in opera:config to make this script working

BTW There will be probably second new version in near future, because this version has really unoptimized and ugly script + I want to add "white list" =)

PS: I would appreciate any feedback positive/negative because it makes me feel that there is some one who actually uses my scripts :P

Avatar
22.09.2010 18:09
I started working on update for this userJS (because I have to wait for Opera to fix some redraw bugs before releasing final version of Image Gallery userJS). So there should be update for extscript.js in a week :yes:
Avatar
11.09.2010 20:09
One more wish:

The UJS Manager Unite Application can check for updates of scripts periodically every 3 days, if one of these conditions is met.

Sometimes I change my UserJS directory or I do a real clean install and jst copy my userJS folder back into location. Then the UJS Manager fails if condition b or c are not fulfilled. Could you add the full d/l path to your script(s) to the script headers, please?
Avatar
11.09.2010 20:09

Originally posted by QuHno:

Could you add the full d/l path to your script(s) to the script headers, please?



thank you for information, I will add it in the next version of this userJS =)
Avatar
09.09.2010 15:09

Originally posted by QuHno:

I fear you have to include an "exclude from blocking" list if you add the block all scripts from a different domain functionality.



that is the plan =)
Avatar
09.09.2010 06:09
It would be nice to have a settings by default:
"Block all"
"Block external"
"Block nothing"
Avatar
09.09.2010 02:09
That could break some UserJS like i.e. the WOT Script for it calls a script from api.mywot.com and some buttons, especially converted bookmarklets, load external scripts too ...

I fear you have to include an "exclude from blocking" list if you add the block all scripts from a different domain functionality.
Avatar
09.09.2010 00:09

Originally posted by QuHno:

A small close button in the lower right corner of the overlay



This is one of things I've wanted to do. =)

Another plan/idea is to separate scripts into two sections "same domain" and "different domain" and the possibility to automatically disable all scripts for one or both those sections.
Avatar
08.09.2010 23:09
Hr, hr ... buttons are easy, scripts are not :)

One wish for the next version if you plan to make any updates:

A small close button in the lower right corner of the overlay - I always forget that I have to click the button to close it again - I think I'm getting old and senile ;)
Avatar
07.09.2010 07:09

Originally posted by QuHno:

The button for drag and drop:



Thank you for the button =)

When I finish my Image Gallery userJS, I will focus again on this userJS and on buscomplete to make them even better)
Avatar
07.09.2010 06:09
Nice script :up:

The button for drag and drop:
Show external scripts
easier than editing the toolbar ini and adds to the customize dialog too :)
Avatar
07.08.2010 15:08
yes (sorry for late answer I was on my vacation)
Avatar
02.08.2010 07:08
Information about blocked scripts placed in LocalStorage?!

Hide extra comments