Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #36041

Greasemonkey getComputedStyle doesn't doesn't return the expected-and-confirmed value.

Path csiph.com!aioe.org!.POSTED.wIgm+2MIUUYkuZKIR0Uhug.user.gioia.aioe.org!not-for-mail
From "R.Wieser" <address@not.available>
Newsgroups comp.lang.javascript
Subject Greasemonkey getComputedStyle doesn't doesn't return the expected-and-confirmed value.
Date Thu, 21 Feb 2019 12:39:54 +0100
Organization Aioe.org NNTP Server
Lines 32
Message-ID <q4m2mu$msd$1@gioia.aioe.org> (permalink)
NNTP-Posting-Host wIgm+2MIUUYkuZKIR0Uhug.user.gioia.aioe.org
X-Complaints-To abuse@aioe.org
X-RFC2646 Format=Flowed; Original
X-MSMail-Priority Normal
X-Notice Filtered by postfilter v. 0.9.2
X-Priority 3
X-Newsreader Microsoft Outlook Express 6.00.2900.5512
X-MimeOLE Produced By Microsoft MimeOLE V6.00.2900.5512
Xref csiph.com comp.lang.javascript:36041

Show key headers only | View raw


Hello all,

I do not see a GreaseMonkey specific newsgroup, so I'm posting here as the 
next-best thing.

The problem: I'm using FireFox 52, and am trying to find elements with the 
'position' is 'fixed' settings (yes, stuff stuck to the top or bottom of my 
screen.  I want to un-stick them).

For that I'm using the following line :

  if (window.getComputedStyle(aElements[i]).getPropertyValue("position") == 
'fixed') {

But for some reason it doesn't find elements which are floating, but when 
use "inspect element" -> "rules" it does actually show a position: fixed 
entry.

I did try to execute that above line on a mouse-click event, but it didn't 
find the element than either (indicating that it doesn't seem to be a "DOM 
must be fully loaded first" problem).

Does someone here have an idea of what goes wrong and how to fix it ?

And by the way, this is a site on which it fails.  For both the purple top 
bar and the green block on the left: 
https://sourcemaking.com/design-patterns-and-tips

Regards,
Rudy Wieser

Back to comp.lang.javascript | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Greasemonkey getComputedStyle doesn't doesn't return the expected-and-confirmed value. "R.Wieser" <address@not.available> - 2019-02-21 12:39 +0100
  Re: Greasemonkey getComputedStyle doesn't doesn't return the expected-and-confirmed value. "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2019-02-22 00:05 +0100
    Re: Greasemonkey getComputedStyle doesn't doesn't return the expected-and-confirmed value. "R.Wieser" <address@not.available> - 2019-02-22 08:59 +0100
      Re: Greasemonkey getComputedStyle doesn't doesn't return the expected-and-confirmed value. Flng Fck <nothanks@invalid.invalid> - 2019-02-22 09:05 +0100
        Re: Greasemonkey getComputedStyle doesn't doesn't return the expected-and-confirmed value. "R.Wieser" <address@not.available> - 2019-02-22 10:50 +0100
  Re: Greasemonkey getComputedStyle doesn't doesn't return the expected-and-confirmed value. Joao Rodrigues <jr.c.l.js@gmail.com> - 2019-02-21 21:51 -0300
    Re: Greasemonkey getComputedStyle doesn't doesn't return the expected-and-confirmed value. "R.Wieser" <address@not.available> - 2019-02-22 09:29 +0100
  Re: Greasemonkey getComputedStyle doesn't doesn't return the expected-and-confirmed value. JJ <jj4public@vfemail.net> - 2019-02-22 18:49 +0700
    Re: Greasemonkey getComputedStyle doesn't doesn't return the expected-and-confirmed value. "R.Wieser" <address@not.available> - 2019-02-22 13:51 +0100
      Re: Greasemonkey getComputedStyle doesn't doesn't return the expected-and-confirmed value. Update. "R.Wieser" <address@not.available> - 2019-02-22 14:34 +0100
        Re: Greasemonkey getComputedStyle doesn't doesn't return the expected-and-confirmed value.Solved. "R.Wieser" <address@not.available> - 2019-02-22 15:12 +0100
      Re: Greasemonkey getComputedStyle doesn't doesn't return the expected-and-confirmed value. JJ <jj4public@vfemail.net> - 2019-02-23 10:18 +0700
        Re: Greasemonkey getComputedStyle doesn't doesn't return the expected-and-confirmed value. "R.Wieser" <address@not.available> - 2019-02-23 09:53 +0100
          Re: Greasemonkey getComputedStyle doesn't doesn't return the expected-and-confirmed value. JJ <jj4public@vfemail.net> - 2019-02-23 18:14 +0700
            Re: Greasemonkey getComputedStyle doesn't doesn't return the expected-and-confirmed value. "R.Wieser" <address@not.available> - 2019-02-25 18:53 +0100
              Re: Greasemonkey vs the other ones - iframes "R.Wieser" <address@not.available> - 2019-02-26 10:23 +0100
                Re: Greasemonkey vs the other ones - iframes "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2019-02-26 11:27 +0100
                Re: Greasemonkey vs the other ones - iframes "R.Wieser" <address@not.available> - 2019-02-26 12:54 +0100
                Re: Greasemonkey vs the other ones - iframes "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2019-02-26 19:26 +0100
                Re: Greasemonkey vs the other ones - iframes "R.Wieser" <address@not.available> - 2019-02-27 10:45 +0100
                Re: Greasemonkey vs the other ones - iframes "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2019-02-27 12:09 +0100
                Re: Greasemonkey vs the other ones - iframes "R.Wieser" <address@not.available> - 2019-02-27 12:34 +0100
                Re: Greasemonkey vs the other ones - iframes "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2019-02-28 11:07 +0100
                Re: Greasemonkey vs the other ones - iframes "R.Wieser" <address@not.available> - 2019-02-28 12:46 +0100
                Re: Greasemonkey vs the other ones - iframes "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2019-02-28 22:41 +0100
                Re: Greasemonkey vs the other ones - iframes "R.Wieser" <address@not.available> - 2019-03-01 09:59 +0100
                Re: Greasemonkey vs the other ones - iframes "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2019-03-01 10:55 +0100
                Re: Greasemonkey vs the other ones - iframes "R.Wieser" <address@not.available> - 2019-03-01 11:40 +0100
                Re: Greasemonkey vs the other ones - iframes "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2019-03-01 16:08 +0100
                Re: Greasemonkey vs the other ones - iframes JJ <jj4public@vfemail.net> - 2019-02-27 00:12 +0700
                Re: Greasemonkey vs the other ones - iframes "R.Wieser" <address@not.available> - 2019-02-27 10:39 +0100

csiph-web