Sign up | Lost password? | Help

[ advanced search ]

How to open a specific web site in Browser XX only?

Forums » Opera Community » General Opera topics » Customizing Opera

Sunday, 26. August 2007, 02:40:18

nandayo

avatar

Posts: 25

Canada

How to open a specific web site in Browser XX only?

Hello!

Because of Opera's line wrapping problem in rich text boxes (Gmail) I would like to configure Opera to open Gmail in Firefox only.
Is there a way to set this up?

I know it's possible in the menu.ini file using
"Item, “View in Firefox”= Execute program, “firefox.exe”,”%u”
but it's not really what I want.

Thanks!

Sunday, 26. August 2007, 10:53:48 (edited)

AyushJ

avatar

Posts: 4754

Download open_browser.js to your UserJS folder. If you dont know about UserJS and how to install them then read this & this.

After downloading the file, drag this button button to a toolbar and click it then find and double click the downloaded js file. Click OK twice to close dialogs. Now edit the open_browser.js and add the URLs you want to open in FF in the script header.
The above will work on windows only..

Some extra features-
you can use other browsers (like IE) if you want..
you can force any url to open in IE, FF or Opera temporarily by adding forceIE, forceFF or forceOP in the URL's Get Query (e.g. http://mail.google.com/?forceFF )

Sunday, 26. August 2007, 20:25:55

nandayo

avatar

Posts: 25

Canada

Thank you so much, AyushJ. I appreciate your help.

Well, I just tried it but somehow it doesn't work. I did exactly what you wrote but Firefox is not loading. I looked at the script and read that it's loading firefox.exe so I first thought it was a PATH problem, but "unfortunately" starting FF by writing "firefox.exe" works, so it must be something else.

I checked the MIME type "open/browser" several times, but it's correct - as far as I can see.

By the way, I inserted the following line to the user JS script:

 // @include mail.google.com/a/mydomain.com/?forceFF 


But always when I try to open http://mail.google.com/a/mydomain.com in Opera.... Opera is still loading the page.

What did I do wrong? :whistle: Any idea?

Thanks a lot!

Sunday, 26. August 2007, 22:30:31

larskl

~ moderator ~

avatar

Posts: 18754

Germany

you have to open http://mail.google.com/a/mydomain.com?forceFF if you want it to open in FF

Monday, 27. August 2007, 03:59:20

nandayo

avatar

Posts: 25

Canada

Well, seems to work with any other web address, like aol.com?forceFF, nytimes.com?forceFF but not with Gmail nor Gmail for your domain.

Just try http(s)://www.google.com/a/google.com/?forceFF or http(s)://www.google.com/a/google.com?forceFF for example. Won't work.

Any more suggestions?

Thank you.

Monday, 27. August 2007, 18:34:47

AyushJ

avatar

Posts: 4754

Originally posted by nandayo:

I inserted the following line to the user JS script: // @include mail.google.com/a/mydomain.com/?forceFF But always when I try to open http://mail.google.com/a/mydomain.com in Opera.... Opera is still loading the page.


The include line is wrong, use:
// @include mail.google.com/a/mydomain.com/
and then load http://mail.google.com/a/mydomain.com/

Originally posted by nandayo:

Just try http(s)://www.google.com/a/google.com/?forceFF


http://www.google.com/a/google.com/?forceFF should work. To enable user-js on https, check User javascript on https

Monday, 27. August 2007, 22:45:08

DreamRyderX

Universal Inspirer

avatar

Banned User

Up To My Eyeballs In Crocodiles

G'Day AyushJ,

I like your JS Idea because there are a few pages that act oddly, so having the ability to automatically open them in another browser would be great!

I loaded your javascript file as explained & to test it I decided to use http://www.mirc.com/


Here is what I did:

I downloaded the script to my userJS folder.

I captured the Button & placed it on my view bar so I can click on it.

I clicked the button, then found & selected the open_browser.js

I clicked ok 2x ( which closed the mime & pref boxes).

I entered // @include http://www.mirc.com/ into the header of the JS as explained & saved it.

I Typed in & entered http://www.mirc.com/?forceIE into Opera.

It opened in Firefox.

I Typed in http://www.mirc.com/?forceFF

It opened in Firefox.

I Typed in http://www.mirc.com/?forceOP

It opened in Firefox.

It seems to only open in FireFox?????

So I decided to look at the script & found this line var DefID='FF'; and I changed the 'FF' to 'IE'

Now it will only open in IE, even when I use the ?forceFF or ?forceOP ???????

Seems like it only likes what is defined in the var DefID= ????

Not being a programmer this is the end of the road for me (as far as ideas anyway).

Im sure it's something simple, but I havent got a clue.


PS...... I would like to use Maxthon instead of IE or better yet Maxthon as well as FF & IE.

My file location for Maxthon is F:\program files\Maxthon Browser\Maxthon.exe

The reason I want to use Maxthon is that I have a tone of accessories(plug-ins) that I made for Maxthon that I don't have in FF or IE.

Thanks,,,,Bobby,,,AKA,,,DreamRyderX :wink:

Monday, 27. August 2007, 23:14:23

AyushJ

avatar

Posts: 4754

@DreamRyderX-
  • After adding an URL in script, it is not necessary to use forceXX. You can just open the URL (e.g. http://www.mirc.com )
  • What happens when you run iexplore.exe "http://test.com" from Start > Run ?
  • Add alert(bID) after stop(); in script and then test the mirc URL. A alert dialog will appear, post the alert contents here.
  • To add Maxthon, change {IE:0,FF:1} to {IE:0,FF:1,Maxthon:2} and add the following line after case "1" line:
    case "2": run("F:\program files\Maxthon Browser\Maxthon.exe");break

Tuesday, 28. August 2007, 02:32:57 (edited)

DreamRyderX

Universal Inspirer

avatar

Banned User

Up To My Eyeballs In Crocodiles

Ok,

When I ran iexplore.exe "http://test.com" from Start > Run

It opened Internet Explorer & went to http://test.com

Added alert(bID) after stop(); in script and then I tested the mirc URL.

This is what I got:

alertbid.png

When I closed the Message it opened mirc.com in FF.

This is the open_browser.js file as it stands with Maxthon update:

2open_browser.js

EDIT: Note that the above file is named 2open_browser.js---On my drive it is open_browser.js due to me uploading for attachment 2x earlier. Don't know how to remove the earlier ones.

Tuesday, 28. August 2007, 02:51:52

AyushJ

avatar

Posts: 4754

Add WScript.Echo(arg) before the switch(.. line and then test with this URL and then post the text of both alerts here:
http://www.mirc.com/?forceIE

Tuesday, 28. August 2007, 03:52:17

DreamRyderX

Universal Inspirer

avatar

Banned User

Up To My Eyeballs In Crocodiles

ok,,,

I did what you asked:

run=function(para){ var ws=new ActiveXObject("WScript.Shell");ws.Run(para+' "'+url+'"') };
WScript.Echo(arg)
switch(arg.substr(0,c2)){

These are the error messages I got in order of occurrence:

alertbid2.png

alertbid3.png

alertbid4.png

Each occurred after the prior one was closed. After the very last error message mirc.com did not load at all in any browser.

BTW,,,,thanks so much for your time!

Tuesday, 28. August 2007, 05:59:51

nandayo

avatar

Posts: 25

Canada

Originally posted by AyushJ:

http://www.google.com/a/google.com/?forceFF should work. To enable user-js on https, check User javascript on https



I had to restart Opera over and over. Sometimes it was loading IE, then Opera opened it and finally FF. Weird. Now it's working without changing anything. (just 500 Opera restarts lol)

Thank you very much, AyushJ!

Tuesday, 28. August 2007, 12:04:42

AyushJ

avatar

Posts: 4754

@Bobby - The messages looks OK but the last error (can't find path) is because you changed iexplore.exe to iexplorer.exe. Chaneg it back and it should work ! :up:

@Marco - :cheers:

Wednesday, 29. August 2007, 03:59:16 (edited)

DreamRyderX

Universal Inspirer

avatar

Banned User

Up To My Eyeballs In Crocodiles

Thanks for your time & patience Marco :wink:

I can do the IE & FF now! :yes:

<sigh> I get an error though with Maxthon :frown:

I use this url: http://www.mirc.com/?forceMax

Here is the error:

MAX.png

This is my updated JS---I removed the additions you had me insert to collect the error messages, & made one addition (line 15 Max for Maxthon) & one change (line 18 Max for Maxthon)

3open_browser.js

I doesn't seem to like the run("F:\program files\Maxthon Browser\maxthon.exe")

When I do START--->RUN--->F:\program files\Maxthon Browser\maxthon.exe it opens the Maxthon Browser fine.

When I do START--->RUN--->F:\program files\Maxthon Browser\maxthon.exe "http://test.com/" I get this error:

TestCom.png

I don't know if that means anything?

A little knowledge is dangerous, so here is another un-educated shot-in-the-dark. :confused:

Is there a special way you must note the file other than this:

run("F:\program files\Maxthon Browser\maxthon.exe")

I've tried two ways F:\program files\Maxthon Browser\maxthon.exe & F:/program files/Maxthon Browser/maxthon.exe---still get the same error either way.

MAX.png

:right: Just a "shot-in-the-dark" on my part...Sorry for being a pain :left:

Wednesday, 29. August 2007, 12:38:05 (edited)

AyushJ
Fine code. Maybe add support of meado-plugin?

DreamRyderX

I get this error:


For path with spaces, need quotes.
run("""F:\program files\Maxthon Browser\maxthon.exe""")

:lol: It's jscript, not vbscript. Correct code:
"\"D:\\Program Files\\Maxthon2\\Maxthon.exe\""

Wednesday, 29. August 2007, 15:23:29 (edited)

AyushJ

avatar

Posts: 4754

add support of meado-plugin?


What's that ?

Originally posted by DreamRyderX:

(line 15 Max for Maxthon) & one change (line 18 Max for Maxthon)


Also add // @include *?*forceMax* to script header after *?*forceOP*

Originally posted by Lex1:

It's jscript, not vbscript.


Forgot about that :D

Wednesday, 29. August 2007, 17:00:46

MeadCo Neptune. It more comfortable what separate IE, imho.

Wednesday, 29. August 2007, 22:02:36 (edited)

DreamRyderX

Universal Inspirer

avatar

Banned User

Up To My Eyeballs In Crocodiles

Thanx Lex1 & AyushJ for helping me here.

I added the // @include *?*forceMax* as instructed.

I changed the file format as instructed by Lex1

From:
case "2": run("F:\program files\maxthon browser\maxthon.exe");break


To:
case "2": "\"F:\\Program Files\\Maxthon Browser\\Maxthon.exe\"";break


While I no longer get the "file not found" error anymore, it doesn't load the Maxthon Browser---It just seems to load the website(modem activity)--but to nowhere??

Just for kicks I also tried this line as a replacement to the above:

case "2": run("\"F:\\Program Files\\Maxthon Browser\\Maxthon.exe\"");break

& I get the exact same result---no error, but no Maxthon load???

We seem to be closer, but still negative results???

Here is my present open_browser.js

open_browser.js

Wednesday, 29. August 2007, 22:21:47

AyushJ

avatar

Posts: 4754

Originally posted by DreamRyderX:

I also tried this line as a replacement to the above:case "2": run("\"F:\\Program Files\\Maxthon Browser\\Maxthon.exe\"");break


This should work on http://www.mirc.com?forceMax .

Wednesday, 29. August 2007, 23:44:00

DreamRyderX

Universal Inspirer

avatar

Banned User

Up To My Eyeballs In Crocodiles

open_browser.js

Sorry Marco, but it doesn't. :frown:

I tried it earlier before I posted last time & again just now...same result. Looks like it wants to, but it never happens? :worried:

Thursday, 30. August 2007, 00:09:21

AyushJ

avatar

Posts: 4754

Add WScript.Echo(para+"\n"+url); just before ws.Run(para+' "'+url+'"') and then open http://www.mirc.com/?forceMax . Post the alerted message here. You can focus the message window and press Ctrl+C to copy the message..

Thursday, 30. August 2007, 00:27:56

DreamRyderX

Universal Inspirer

avatar

Banned User

Up To My Eyeballs In Crocodiles

Done as you requested.

Error.png

Thursday, 30. August 2007, 00:37:35

AyushJ

avatar

Posts: 4754

.. :confused:

Try running the following line from Start > Run:
"F:\Program Files\Maxthon Browser\Maxthon.exe" "http://www.mirc.com/?"

Does maxthon open with mirc.com ?

Thursday, 30. August 2007, 00:43:03

DreamRyderX

Universal Inspirer

avatar

Banned User

Up To My Eyeballs In Crocodiles

Ok,

With this string ---"F:\Program Files\Maxthon Browser\Maxthon.exe" "http://www.mirc.com/?"----entered into START--->RUN

Maxthon doesn't open & run.


With this string ---"F:\Program Files\Maxthon Browser\Maxthon.exe"----entered into START--->RUN

Maxthon opens.

Hope that helps :wink:

Thursday, 30. August 2007, 00:49:32

AyushJ

avatar

Posts: 4754

:yes:

What happens when you run
"F:\Program Files\Maxthon Browser\Maxthon.exe" "http://www.mirc.com"
and
"F:\Program Files\Maxthon Browser\Maxthon.exe" http://www.mirc.com

Thursday, 30. August 2007, 01:10:49 (edited)

DreamRyderX

Universal Inspirer

avatar

Banned User

Up To My Eyeballs In Crocodiles

Ran both (copy & pasted into run)

Both did nothing---Maxthon did not open for either.

Ran both using "iexplore.exe" instead of maxthon.exe string.

The first one opened IE, but with an error. Http://Http://www.mirc "Page could not be displayed"

The second opened IE & www.mirc.com ok

Thursday, 30. August 2007, 01:10:08

AyushJ

avatar

Posts: 4754

I am downloading and installing Maxthon to see what's the problem.. :wait:

Btw, I'm not Marco :wink:

Thursday, 30. August 2007, 01:15:20

DreamRyderX

Universal Inspirer

avatar

Banned User

Up To My Eyeballs In Crocodiles

Thanks Marco!

Your really going way "above & beyond"!

I truly appreciate this! :wink:

I just wish you didn't have to go thru all this trouble awww

Edit: Dunno where I got that from....pardon :faint:

Thursday, 30. August 2007, 01:17:03

AyushJ

avatar

Posts: 4754

Originally posted by DreamRyderX:

Thanks Marco!


Read the previous message :D

Thursday, 30. August 2007, 01:19:33

DreamRyderX

Universal Inspirer

avatar

Banned User

Up To My Eyeballs In Crocodiles

Originally posted by AyushJ:

@Bobby - The messages looks OK but the last error (can't find path) is because you changed iexplore.exe to iexplorer.exe. Chaneg it back and it should work ! :up:

@Marco - :cheers:



A few posts up....thought it was your name---sowwie, Homer: Doh! Marco was the other guy!! :lol:

Thursday, 30. August 2007, 01:55:38

AyushJ

avatar

Posts: 4754

I installed Maxthon 2.0.3.4020 and tried it with "http://www.mirc.com" and it opened the website fine. :confused: Can you test it again and look at the task manager to see if maxthon.exe opens or not ?

Thursday, 30. August 2007, 02:16:31

DreamRyderX

Universal Inspirer

avatar

Banned User

Up To My Eyeballs In Crocodiles

DreamRyderX wacks his head 50 times with a baseball bat!!!!Homer: Doh! Homer: Doh! Homer: Doh! DreamRyderX hands the bat to AyushJ & begs that he have a go---I deserve it!!!!




When you mentioned Task Manager a bulb lit in my swiss cheeze for brains head!!

I opened it & found over 30 maxthon's running! :yikes: :no: :faint:

It seems, if I have Maxthon open & it is called from another program, it opens a "silent" second occurrance of Maxthon. Next time, same thing,,,etc,,,etc.

The problem is it doesn't do this visually---but only in the background (Task Manager).
As long as more than one occurrance is running in the Task Manager it does its "dead fish" impersionation, & I'm unaware of it opening!:furious:

I closed all the occurrances of Maxthon in the task manager & presto :wizard: it workes!!! :yes: :yes: :yes: :yes:

If I would have rebooted it would have worked from the get-go! :furious:

I'm so sowwie I put you through all that, but I was unaware this was happening.

Thursday, 30. August 2007, 02:24:30

DreamRyderX

Universal Inspirer

avatar

Banned User

Up To My Eyeballs In Crocodiles

Thanks AyushJ, yer a livin' legend!!!

Sowiee for the muck up!

Thanks again, Bobby,,,,AKA,,,,DreamRyderX :cheers:

Thursday, 10. July 2008, 05:46:51

Good day!

Plz, help!
I use opera version 9.51 and when I try to open www.mirc.com page in IE7 (var DefID='IE').
Then in field of IE adress pass "data:open/browser,0,http%3A%2F%2Fwww.mirc.com%2F" and message that page cannot be display.

Friday, 11. July 2008, 04:43:42

AyushJ

avatar

Posts: 4754

Originally posted by grida:

I use opera version 9.51 and when I try to open www.mirc.com page in IE7 (var DefID='IE').
Then in field of IE adress pass "data:open/browser,0,http%3A%2F%2Fwww.mirc.com%2F" and message that page cannot be display.


Strange.. that shouldn't happen. Use the button from this post then select the user-js and try again. Also, does FF work fine ? What happens when you double click the .js file in explorer ?

Friday, 11. July 2008, 04:58:18

Thanks you. All Ok.
I a few times checked the link in open/browser MIME type, but now I see that there IE but not script path.

Friday, 11. July 2008, 05:18:58 (edited)

I have two questions.
1. May be you know, how to open page in new tab in IE7, but not in a new window?
2. Why opera don't close "phantom page", after that page will be opened in another browser?

Sunday, 13. July 2008, 01:28:31

AyushJ

avatar

Posts: 4754

Originally posted by grida:

1. May be you know, how to open page in new tab in IE7, but not in a new window?


:no:

Originally posted by grida:

2. Why opera don't close "phantom page", after that page will be opened in another browser?


Closing the page immediately prevents opera from loading the new url that opens the browser and a timer also doesn't work reliably (the opening time varies depending on several things)..

Forums » Opera Community » General Opera topics » Customizing Opera