In article <>, Thomas 'PointedEars' Lahn
<> wrote:
>Dennis M wrote:
>
>> Hi guys, I'm trying to write a simple window resize script for my (older
>> version Mozilla for Mac) browser to use when it first launches to get the
>> window to the exact size and location I want it.
>>
>> Is there any way I could modify this script.......
>>
>>
>> <script language="JavaScript">
>
>Invalid (HTML4) markup. The `language' attribute is deprecated, the
>`type' attribute is required:
>
> <script type="text/javascript">
>
>> <!--
>
>Obsolete nonsense.
>
>> function move_2_631_435()
>> {
>> self.moveTo(0,0)
>> self.resizeTo(631,435)
>
>Those statements should be ended with a semicolon each.
>
>> }
>> -->
>
>This is a syntax error. `--' is the decrement operator and expects a
>reference as operand. Remove that line, it is not necessary.
>
>> </script>
>>
>> <a href="javascript:move_2_631_435();">Resize Screen</a>
>>
>>
>> .....to get my browser window to move to the left about 3 pixels more and
>> also get it to move upwards about 3 pixels more? Even though it says
>> "self.moveTo(0,0)" it's still about 5 pixels from the left side of the
>> window and 5 pixels from the bottom of the menu bar.
>
>window.moveTo() (self, which is window.self, which is window, is nonsense)
>positions the window absolutely.
That's what I want to do -- position the window absolutely when I first
launch the browser or when I make a new window from Mozilla's menu bar.
All I want to do is have about 2 pixels of space between the left, right,
top and bottom of the browser window and my screen. The script I posted
does fine for the right side and bottom, but I needed to adjust the left
and top sides by about 3 pixels each.
This script isn't going in a live website or anything, so I don't give a
crap about "syntax errors" and a lot of the other anal-retentive stuff you
mentioned as long as it gets the job done. I tried all those modifications
you suggested and it didn't resize the screen at all -- what I already had
works better than that.
>You are looking for window.moveBy().
>Maybe you will have to enable that feature in your preferences first, with
>the side effect that Web sites are allowed to cripple your environment this
>way, too, unless you disable script support completely.
>
><URL:http://developer.mozilla.org/en/docs/DOM:window.moveBy>
>
>> I tried putting negative values in the "(0,0)," but evidently that isn't
>> supported.
>
>Security restrictions do not allow to position the window outside of the
>desktop.
>
><URL:http://www.mozilla.org/projects/secu...ed-scripts.htm
l#privs-list>
>
>
>PointedEars