Closed
Bug 644700
Opened 14 years ago
Closed 14 years ago
Need a way to only show content to 2.1 users
Categories
(Camino Graveyard :: Product Site, enhancement)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: alqahira, Assigned: stuart.morgan+bugzilla)
References
Details
Attachments
(1 file)
|
2.10 KB,
patch
|
Details | Diff | Splinter Review |
We introduced several new used-in-product URLs in the plug-in blocking/disabling UI, including new sections about blocked and disabled plug-ins.
It would be nice if we could go ahead and add that content to the website in advance of beta 1 (when these features are making their wide debut), given that we're now blocking old Flash and old F4M, so that the more info links work when people do follow them to figure out why their plug-ins don't work.
However, we really shouldn't display these sections to Camino 2.0 users, because they don't apply (and, because the URLs are to anchors, we can't redirect hits to those "URLs" to the wiki or somewhere else).
Are there any methods available to us that would let on 2.1 users see the sections for these two messages?
http://caminobrowser.org/documentation/setup/#disable_plugin
http://caminobrowser.org/documentation/setup/#blocked_plugin
Flags: camino2.1b1?
| Assignee | ||
Comment 1•14 years ago
|
||
We could mark those blocks and display:none and then use... wait for it... browser-specifica UA sniffing! to show them. Fails for people with JS off, but that's probably rare.
I do wonder if we'd confuse people using 2.1 talking to people using older versions in the forums and such though. It would be easier if we had separate pages, but that would be a major redesign.
| Assignee | ||
Comment 2•14 years ago
|
||
Oh, but you're just talking about something temporary, until we ship 2.1 for realz, right?
UA sniffing would be reasonable in that case.
| Assignee | ||
Comment 3•14 years ago
|
||
In terms of implementation:
- give those blocks a class="two-point-one-only"
- give that class display:none
- add an onload handler that used document.getElementsByClassName to remove the class from those elements (or manually changes the .style.display to block)
| Reporter | ||
Comment 4•14 years ago
|
||
(In reply to comment #2)
> Oh, but you're just talking about something temporary, until we ship 2.1 for
> realz, right?
Yes; the website always contains content appropriate for the current stable release.
I'd really like to add the <li>s in the list at the top of the page, too, both for sanity for 2.1 users now and sanity for me updating the site pre-release (all I'd have to remember to do is remove the classes from the element).
| Assignee | ||
Comment 5•14 years ago
|
||
Okay, so here's comment 3 in actual code:
For a foo.js file, to be included *after* the ua-detection file:
-----
function showConditionalElements() {
if (BrowserDetect.browser != "Camino" || BrowserDetect.version != 2.1)
return;
var elements = document.getElementsByClassName('camino-future');
for (var i = 0; i < elements.length; i++) {
elements[i].classList.remove('hidden');
}
}
window.addEventListener('DOMContentLoaded', showConditionalElements, false);
-----
For our CSS:
-----
.hidden {
display: none;
}
-----
And the for each element that should be hidden, add: class="camino-future hidden"
| Reporter | ||
Comment 6•14 years ago
|
||
(In reply to comment #5)
> Okay, so here's comment 3 in actual code:
>
> For a foo.js file, to be included *after* the ua-detection file:
Sam, what do you want that file to be called?
Comment 7•14 years ago
|
||
conditional.js? Or conditionalcontent.js? Something like that anyway.
| Reporter | ||
Comment 8•14 years ago
|
||
Here's the relevant diff for the changes for comment 5, which are now live. (I didn't make conditional.js cache-managed, because like some of the other js files, it doesn't seem like it'll change much.)
I'll spin off adding the actual page/itme content to another bug assigned to me.
| Reporter | ||
Comment 9•14 years ago
|
||
-->Stuart, since he provided all the code :)
Bug 668721 for the page contents.
Assignee: samuel.sidler → stuart.morgan+bugzilla
Status: NEW → RESOLVED
Closed: 14 years ago
Flags: camino2.1b1? → camino2.1b1+
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•