maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   User Javascript enabling on Opera (https://talk.maemo.org/showthread.php?t=7111)

aleksandyr 2007-06-30 21:20

User Javascript enabling on Opera
 
in /home/user/opera/opera.ini:

Code:

User JavaScript File=
User JavaScript=0

change to:

Code:

User JavaScript File=/home/user/user.js
User JavaScript=1

put the following in user.js:

Code:

alert("victory!");
Apologies if this is old news, but I couldn't find a reference to it anywhere.

The potential for this is extraordinary :)

YoDude 2007-06-30 22:26

Re: User Javascript enabling on Opera
 
indeed... rock on brother!

Bree 2007-07-01 00:43

Re: User Javascript enabling on Opera
 
I don't have an /opera folder in /home/user ....


edit::::

Found it and editing file now....
but is this javascript mod for n800?

I'm on 770....
no javascript in the file....

doctoss 2007-07-01 02:29

Re: User Javascript enabling on Opera
 
Does it work? Surely not this easy.

Bree 2007-07-01 02:31

Re: User Javascript enabling on Opera
 
not working for me... on 770

doctoss 2007-07-01 02:49

Re: User Javascript enabling on Opera
 
what is the alert (victory) stuff?

doctoss 2007-07-01 03:00

Re: User Javascript enabling on Opera
 
where is user.js?

YoDude 2007-07-01 03:29

Re: User Javascript enabling on Opera
 
Quote:

Originally Posted by doctoss (Post 55278)
where is user.js?


I believe you need to creat a user.js file in home/user

The file should contain the text Alek specified.
Code:

alert("victory!");
Quote:

To write your own User JavaScripts, use a text editor to create the JavaScript file, and save it in your User JavaScript directory. The file will be automatically loaded the next time a page is loaded in Opera. Opera does not need to be restarted to see any changes to User JavaScript files.
>> http://www.opera.com/support/tutorials/userjs/using/

doctoss 2007-07-01 03:36

Re: User Javascript enabling on Opera
 
Thanks, but I am new to linux and the n800. How do I create a file and how do I put script in it. Sorry, Thanks

doctoss 2007-07-01 04:06

Re: User Javascript enabling on Opera
 
I am trying to use vi, but to no success.

doctoss 2007-07-01 04:24

Re: User Javascript enabling on Opera
 
Doesn't work on n800, unless I am doing something wrong like leaving out a - or something in creating user.js. Also I am trying to open the java applet in opera.

Bree 2007-07-01 07:33

Re: User Javascript enabling on Opera
 
not working on 770 and causing opera to freeze and second attempt it crashed...

something i did affected it but the 770 don't like it...

any pro's got any feedback or constructive pointers?

aflegg 2007-07-01 14:09

Re: User Javascript enabling on Opera
 
Quote:

Originally Posted by doctoss (Post 55291)
Doesn't work on n800, unless I am doing something wrong like leaving out a - or something in creating user.js. Also I am trying to open the java applet in opera.

This is nothing to do with Java applets. This allows you to have a JavaScript file on your tablet which is invoked for every web page you visit.

For example, it could manipulate the DOM to hide adverts, or reformat a site's pages to better fit the screen.

aleksandyr 2007-07-01 14:56

Re: User Javascript enabling on Opera
 
It's the ".opera" folder, not "opera" --- I've only tested this on my n800.

The "alert('victory');" will make it so that every time you finish loading a page, "victory" will be displayed --- simple test to see that it's working :)

User CSS is the holy grail for me, because I know that can be used to deliver ad blocking services --- User JS will let me port the Opera User CSS adblocking technique, however.

To get an idea of what can be done, go to userscripts.org: the first thing I want to get adapted is the All In One Video Site download link javascript from 1024k.de.

yerga 2007-07-01 14:57

Re: User Javascript enabling on Opera
 
1 Attachment(s)
It can even show Google Docs and Picasa in Opera [1], though it doesn't work completely well.

[1] http://files.myopera.com/xErath/file...le-services.js


Cheers.

doctoss 2007-07-01 16:07

Re: User Javascript enabling on Opera
 
Quote:

Originally Posted by aflegg (Post 55352)
This is nothing to do with Java applets. This allows you to have a JavaScript file on your tablet which is invoked for every web page you visit.

For example, it could manipulate the DOM to hide adverts, or reformat a site's pages to better fit the screen.


Thanks for the clarification. I am trying to use the n800 in the hospital to replace laptop or thin client. However for the n800 to work I need to be able to open java applets and the citrix client. I am not sure if the n800 will ever be able to do these, but I am trying.

konttori 2007-07-01 17:26

Re: User Javascript enabling on Opera
 
Quote:

Originally Posted by doctoss (Post 55376)
Thanks for the clarification. I am trying to use the n800 in the hospital to replace laptop or thin client. However for the n800 to work I need to be able to open java applets and the citrix client. I am not sure if the n800 will ever be able to do these, but I am trying.

You should be able to get citrix client from here:
http://www.bleb.org/software/770/

If it's not working on your firmware version, just ask Andrew Flegg to recompile. Java applets you cannot open in opera, but naturally, through the citrix client you can open web browser and use the applets there.

elph 2007-07-01 17:38

Re: User Javascript enabling on Opera
 
I don't know if you can open Java applets, but I know someone (maybe fanoush?) had EWE partially working. It might be worth a look. Anyway, this page talks about Java on the 770: http://web4.cs.ucl.ac.uk/staff/C.Wal...ingblog/?cat=7

daverup 2007-07-01 18:17

Re: User Javascript enabling on Opera
 
That citrix client won't work in anything but OS2005.
Flashing back that far is pretty bad, and you will still have to use an external keyboard with the citrix client.
I used citrix with OS2005, it did work.
The citrix app for Windows Mobile on something like a Axim is alot easier to deal with, the virtual keyboard works on that one.

True Java applets are still waiting for a real Java VM, not quite here yet.
Javascript is not the same as Java.

elph 2007-07-01 19:00

Re: User Javascript enabling on Opera
 
Anyway, back on topic:

Does this work on the 770? I've done as instructed, but I'm not getting the alert. Perhaps I've missed something?

doctoss 2007-07-01 19:44

Re: User Javascript enabling on Opera
 
[QUOTE=daverup;55410]That citrix client won't work in anything but OS2005.
Flashing back that far is pretty bad, and you will still have to use an external keyboard with the citrix client.
I used citrix with OS2005, it did work.
The citrix app for Windows Mobile on something like a Axim is alot easier to deal with, the virtual keyboard works on that one.

True Java applets are still waiting for a real Java VM, not quite here yet.
Javascript is not the same as i

I guess we can have two topics. Any chance for citrix or java applets sometime soon?

aflegg 2007-07-01 20:17

Re: User Javascript enabling on Opera
 
Quote:

Originally Posted by doctoss (Post 55429)
I guess we can have two topics. Any chance for citrix or java applets sometime soon?

Short answer: no.

Long answer: nooooooo ;-)

Details: both have been discussed a few times (including on my Citrix page) here, so I won't bother going into it again.

coffeedrinker 2007-07-01 22:04

Re: User Javascript enabling on Opera
 
What I really want is user css file for blocking ads. Anyone know how this is done?

johsua 2007-07-01 22:12

Re: User Javascript enabling on Opera
 
no idea what a user css file is, but search for privoxy in the forum for ad blocking.

aleksandyr 2007-07-02 04:40

Re: User Javascript enabling on Opera
 
Quote:

Originally Posted by coffeedrinker (Post 55450)
What I really want is user css file for blocking ads. Anyone know how this is done?

Attempting to use the known Opera preambles to activate user CSS doesn't work. That said, you can load arbitrary (locally served via nginx, perhaps) CSS via JavaScript invocations.

Bree 2007-07-03 08:21

Re: User Javascript enabling on Opera
 
back to the javascipt...
got it working on the 770 on my second attempt....

added the
Code:

User JavaScript File=/home/user/user.js
User JavaScript=1

to opera.ini
then enabled javascript in opera settings also....

it's working but only just..... it's not happy doing it...
google reader is tarting to load but not completing..
google calendar also not happy.... starts but not fully loading.

will try a few more...

elph 2007-07-04 02:10

Re: User Javascript enabling on Opera
 
It's still not working on my 770. Have you added any packages or the like to the base OS 2006?

mardin 2007-07-04 03:44

Re: User Javascript enabling on Opera
 
I also spent some time reading this thread and trying to get this to work on my new 770 (OS 2006) without success. I tried varying the options according to the general opera support site UserScript information, but none of my settings or test scripts worked. I do have Javascript enabled in the browser.

gogol 2007-08-16 08:43

Re: User Javascript enabling on Opera
 
Wow this would be most excellent to get working!!!!
That means one could use any number of greasemonkey scripts to do everything from removing ads to adding download links to youtube!

Anyone have more information about this working or not on the 770? I'm trying my best to get it working, to no avail...


All times are GMT. The time now is 16:49.

vBulletin® Version 3.8.8