Website message overhaul

Nick Sabalausky a at a.a
Mon Nov 14 08:20:40 PST 2011


"Vladimir Panteleev" <vladimir at thecybershadow.net> wrote in message 
news:op.v4x02rqetuzx1w at cybershadow.mshome.net...
> On Mon, 14 Nov 2011 17:11:59 +0200, Nick Sabalausky <a at a.a> wrote:
>
>> Then, if you really want JS users to see it
>> collapsed by default, you collapse it *via JS* upon page load. Or just 
>> make
>> use of the noscript tag. There is *never* any reason to do it any
>> differently than that.
>
> I agree, but there is a better way.
>
> Use JavaScript and document.write to print out a style definition which 
> hides collapsed content, like this:
>
>   <script type="text/javascript">
>   // <!--
>   document.write('<style type="text/css">.nojs { display: 
> one;  }</style>');
>   // -->
>   </script>
>
> (That goes inside the <head> tag.)
>
> This avoids a flash of content before the document load events are fired. 
> Nobody likes those.
>

Right, the main point is to make it work without JS, and then any defaults 
you want different in the JS version *MUST* be done *USING* JS, never baked 
into the raw non-JS portions of the HTML/CSS.

>> Plus: I don't see this new twitface element people are talking about. 
>> Yes, I realize *some* people like such sites, but that's no excuse for 
>> cramming it down *everyone's* face. Again, we're not here to be 
>> twitface's free
>> advertising. So I like that whatever this new thing is isn't showing up.
>
> Do you have Twitter widgets blocked? (I have them blocked too...)

Not specifically. I have JS disabled by default. Also, I use AdBlock Plus 
because of all those [many explitives here] animating ads that make it 
impossible to focus on and read a page's content (and because of targeted 
user-tracking ads - WTF is this, minority goddamn report?). So it's possible 
that one of those might be why it's mercifully not showing up for me.

> It's what the News section is.
>





More information about the Digitalmars-d mailing list