1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Javascript Age Restriction Overlay for Adult Site

Discussion in 'JavaScript' started by terriblebmx, May 6, 2013.

  1. #1
    Hey guys, i want to first state.... I KNOW NOTHING OF JAVASCRIPT :[[

    I have an adult website I recently put online and would like to have a javascript overlay where the visitor would have to either enter to view the site or exit.

    I say overlay because I believe that is what it is called... a shadow or type of mask hiding the website with dark opacity before enter is clicked.

    example of what I'm referring to is here...

    ichan.org

    amavids.net

    what do i need to download ? jquery ? cookie.js ?
    is there a script available ?

    thanks for any help
    Last edited by a moderator: May 7, 2013
    terriblebmx, May 6, 2013 IP
  2. GMF

    GMF Well-Known Member

    Messages:
    856
    Likes Received:
    112
    Best Answers:
    19
    Trophy Points:
    145
    #2
    Mhh.... why use Javascript for that?

    I would make an "entry" page that has 2 links - the first one goes to your adult site, the second one to wherever you like (google.com).


    You could make it a simple disclaimer site (blablabla adult contetn blablabla) with a simple question: are you over 18 - Yes | No
    GMF, May 8, 2013 IP
  3. terriblebmx

    terriblebmx Peon

    Messages:
    11
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #3
    hey yeah i could do that as well and that is the simple way of just getting around what i want to do but it is not time efficient having the visitor load 2 pages, and it would require me to change the directories of the other pages. a simple javascropt overlay or perhaps even CSS overlay is nicer as you can see the content in the backround and it just goes away without redirecting once you click enter
    terriblebmx, May 8, 2013 IP
  4. deathshadow

    deathshadow Prominent Member

    Messages:
    5,980
    Likes Received:
    825
    Best Answers:
    144
    Trophy Points:
    395
    #4
    It is better if they have javascript disabled. It is better if they bookmark the sub-page with the actual content instead of the splash page. It's better than having the extra markup and scripting garbage loaded each and every time they view any of your sub-pages...

    ... though honestly, I'd handle it server-side by detecting a cookie, if it exists go directly to the content, if not, go to the splash page with the warning. That way you're not wasting time sending ANYTHING client side you don't have to.
    deathshadow, May 10, 2013 IP
  5. HowDoYou

    HowDoYou Active Member

    Messages:
    425
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    80
    #5
    If they have javascript disabled, then most of your website, and the worlds websites won't be visible anyway. use jQuery overlays with cookies.

    Having a gateway page would hurt your search engine rankings. there is also a meta tag for content ratings. called ICRA Labels and PICS-Label.
    HowDoYou, May 13, 2013 IP
  6. GMF

    GMF Well-Known Member

    Messages:
    856
    Likes Received:
    112
    Best Answers:
    19
    Trophy Points:
    145
    #6
    If a website really doesn't work with JS disabled, someone should consider writing the whole thing anew :rolleyes:
    GMF, May 13, 2013 IP
  7. HowDoYou

    HowDoYou Active Member

    Messages:
    425
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    80
    #7
    http://developer.yahoo.com

    If this is a concern still, maybe have the script detect for JavaScript, if its disabled/missing, offer up an upgrade link. or instructions like this: http://www.enable-javascript.com/
    HowDoYou, May 13, 2013 IP
  8. deathshadow

    deathshadow Prominent Member

    Messages:
    5,980
    Likes Received:
    825
    Best Answers:
    144
    Trophy Points:
    395
    #8
    100% BULL if the developer has ANY clue what they are doing, particularly for content driven websites. Again though, PROPERLY developed websites made by people who understand the POINT of HTML, the POINT of CSS, following guidelines like the WCAG, practicing semantic markup, separation of presentation from content with progressive enhancement

    If that was true, the noscript extension probably wouldn't have two million plus users -- admittedly it lets you enable/disable it on a per-site basis, but for the most part it and the dozen plus clones across multiple browsers are popular for a reason -- and most of that reason is people throwing javascript at websites for NOTHING.

    Good scripting on a normal website should enhance the functionality, NOT supplant it!

    Because adding bloat to EVERY page load is so good for a sites performance and usefulness.

    Ah yes, this malarkey -- because having a page possibly full of text saying who/what they are would SO hurt their rankings, or engines are too stupid to spider a link -- NOT!

    That not one UA or Search engine bothers looking at by default, making them little more than code bloat. (unless you talk the handful of nutters using "security bulldog")

    I mean, ICRA is DEAD
    http://en.wikipedia.org/wiki/Internet_Content_Rating_Association#Discontinuation

    and PICS-Label likely suffered from it not actually having anything resembing a standard for declarations which is why it's been stillborn since it was introduced back in '94... AND it's been replaced by POWDER

    http://www.w3.org/TR/powder-primer/

    Which I'm pretty sure NOTHING actually makes use of in a meaningful manner.
    deathshadow, May 13, 2013 IP
  9. HowDoYou

    HowDoYou Active Member

    Messages:
    425
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    80
    #9
    Why are you still alive? You still have no idea what your talking about. And no one on this forum will ever read anything you ever post. Go away.
    HowDoYou, May 13, 2013 IP
  10. deathshadow

    deathshadow Prominent Member

    Messages:
    5,980
    Likes Received:
    825
    Best Answers:
    144
    Trophy Points:
    395
    #10
    Says the one who posted about a dead/discontinued specification, and one that has been superseded by another... none of which UA's do anything useful with. Instead of going "wah, wah, wah, I don't wanna hear it" maybe you should at least open yourself to the idea that there's more to building websites than "it works fine scripting on at desktop resolutions and screen only targets".

    ... and of course, lets ignore the millions of USERS who tell you exactly where to stick scripting, ignoring every good practice and the ENTIRE POINT of using HTML... Sure, that's a brilliant approach to development.

    Oh, BTW, it's easy to dismiss things when you list them by percent -- oh this is only 2%, oh this is only 1% -- you take that approach and sooner or later you'll have alienated any potential users since they all add up.

    It's a lot harder to dismiss when you realize that 2% of the American audience alone is out of 245 million, meaning you're basically telling 5 million people to go stick it. It's like the idiots who go "Who cares about Opera users, it's only 3% worldwide" -- which is 3% of 2.6 BILLION, meaning that's 78 million people...

    Could be worse though, could be the nonsense of IE having lost users just because it lost 'share'... two completely unrelated numbers and the opposite of the truth. (95% of 400 million < 22% of 2.6 billion)

    Someone I knew in marketing a decade or so ago used to call folks who do this "percenters" - making small percents sound like they don't matter just to justify being sleazy, shortsighted, or just plain lazy. Just another method of card stacking and yet another lame excuse.
    Last edited: May 13, 2013
    deathshadow, May 13, 2013 IP
  11. HowDoYou

    HowDoYou Active Member

    Messages:
    425
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    80
    #11
    You will be the reason why everyone on this forum will stop tring to help each other. They will be scared your 2 mins behind them with whatever crap you can gooogle up to try and discredit them with. Please for the sake of this community stop and read the posts you have been making, you don't sound smart at all, you just come off as an ass hole. There is a differance between helping someone and simply putting them down. There are 1000's of ways you could have responded in quoting my post on this thread, but decided to do it in an ass hole way. I hope for everyones sake you are banned from this fourm soon.
    HowDoYou, May 13, 2013 IP
  12. GMF

    GMF Well-Known Member

    Messages:
    856
    Likes Received:
    112
    Best Answers:
    19
    Trophy Points:
    145
    #12
    Oh, scared of a little reading, are we?

    If you would also take the time and googling what deathshadow says, you would realize that he is spot on in 99% of times posting.

    It's also not discrediting, it's trying to help. If you can't take criticism and rather stick your fingers in your ears, you are part of the problem and not the solution.



    So, because he uses "harsh" words, we should burn him on stake and disregard everything he says?

    This isn't a kindergarten, you know?

    I hope for everyones sake that he stays and keeps on doing what he is doing, because the world needs more people like deathshadow.

    People that know what they are talking about, get straight to the point and tell you what's wrong.
    GMF, May 14, 2013 IP
  13. HowDoYou

    HowDoYou Active Member

    Messages:
    425
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    80
    #13
    Yes, There is absolutely no valid reason to use "harsh" words. Even if he was knowledgeable (which he is not), that doesn't give him a license to be rude to other people.
    HowDoYou, May 14, 2013 IP
  14. GMF

    GMF Well-Known Member

    Messages:
    856
    Likes Received:
    112
    Best Answers:
    19
    Trophy Points:
    145
    #14
    :rolleyes:

    So, he should sugar-coat his words instead of going straight to the point?

    Why?
    GMF, May 14, 2013 IP